User service for Tinder App. Handles and stores all the user information
View the project roadmap here
See CONTRIBUTING.md for contribution guidelines.
Query will happen with one of two unique keys
{
type: STRING,
query: NUMBER or STRING,
gender: STRING,
filter: ARRAY,
startDate: STRING,
endDate: STRING
}
-
type
Can be either user or stat. Defaults to user. -
query
Used with type user. User ID num or zone string. Can accept an array -
gender
Used with type user. OPTIONAL. The gender of users to retrieve -
filter
Used with type user. OPTIONAL. An array of userIDs to omit from results, e.g. swiped users -
startDate
Used with stat. Start of period to query for stats. Takes formats supported by PostgreSQL. Defaults at first entry -
endDate
Used with stat. End of period to query for stats. Takes formats supported by PostgreSQL. Defaults at last entry
Get full information on user with ID #7443
{
type: 'user',
query: 7443
}
Get all females from "Zone A" except userIDs 56 and 69
{
type: 'user',
query: 'A',
gender: 'F',
filter: [65, 69]
}
Get stats from Oct 31 1984 to Dec 25 1984
{
type: 'stat',
startDate: '1984-10-31'
endDate: '1984-12-25'
}
[{
userId: NUMBER,
name: STRING,
email: STRING,
gender: STRING,
location: STRING,
photoCount: NUMBER,
traits: ARRAY
}]
The return object has been built to include information irrelevant to the MVP, for future expansion opportunity
userId
The user's ID numbername
The user's nameemail
The user's email countgender
The user's genderlocation
Which zone the user is located inphotoCount
The number of photos the user has uploadedtraits
An array of objective terms that can be used to describe the user's physical appearance. Represents a photo of user
{
errorsCounted: NUMBER,
entries: NUMBER,
averageEntryTime: NUMBER,
averageRetrieveTime: NUMBER
}
errorsCounted
The number of insertion/read errors generated in the databaseentries
Number of entries in the databaseaverageEntryTime
Average time it takes to insert in millisecondsaverageRetrieveTime
Average time it takes to retrieve in milliseconds
- Node 6.9.x
- Postgresql 9.6.x
- express 4.16.2
- faker 4.1.0
- mocha 4.0.1
- chai 4.1.2
- pg 7.3.0
- pg-hstore 2.3.2
- sequelize 5.15.0
Run npm install
- Simulate new user sign-ups
- Simulate account deletions
- Simulate user information pulls
- Time for insertion saved
- Time for retrieve saved
- Time for remove saved
- Errors logged out into log directory
Users
col | type |
---|---|
name | VARCHAR |
traits | VARCHAR |
gender | VARCHAR |
photo_count | INT |
VARCHAR | |
location | VARCHAR |