Skip to content

Data-Stalkers/Timder-Users

Repository files navigation

Tinder App - Users Service

User service for Tinder App. Handles and stores all the user information

Roadmap

View the project roadmap here

Contributing

See CONTRIBUTING.md for contribution guidelines.

Table of Contents

  1. Usage
  2. API Usage
    1. Input
    2. Output
  3. Requirements
  4. Development
    1. Installing Dependencies
    2. Tasks

Usage

API Usage

Input

Query will happen with one of two unique keys

{
  query: NUMBER or STRING,
  gender: STRING,
  filter: ARRAY
}
  • query Used with type user. User ID num or zone string. Returns random user when empty
  • gender Used with type user when querying by location. [OPTIONAL]. The gender of users to retrieve
  • filter Used with type user when querying by location. [OPTIONAL]. An array of user IDs to omit from results, e.g. swiped users
Example User Request Parameters

Get full information on user with ID #7443

{
  query: 7443
}

Get a random user

{
}

Get all females from "Zone A" except userIDs AV9LofjhxcHrw1GRCa9Z and AV9LjC3EKmvG0ooIGY4T

{
  query: 'A',
  gender: 'F',
  filter: ['AV9LofjhxcHrw1GRCa9Z', 'AV9LjC3EKmvG0ooIGY4T']
}

Output

[{
  id: NUMBER,
  name: STRING,
  email: STRING,
  gender: STRING,
  location: STRING,
  photoCount: NUMBER,
  dob: NUMBER,
  traits: ARRAY
}]

The return object has been built to include information irrelevant to the MVP, for future expansion opportunity

  • id The user's ID number
  • name The user's name
  • email The user's email count
  • gender The user's gender
  • location Which zone the user is located in
  • photoCount The number of photos the user has uploaded
  • dob Represents year the user was born
  • traits An array of objective terms that can be used to describe the user's physical appearance. Represents a photo of user.

Requirements

  • 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

Development

Installing Dependencies

Run npm install

Tasks

Simulation

  • Simulate new user sign-ups
  • Simulate account deletions
  • Simulate user information pulls

Monitoring/Testing

  • Time for insertion saved
  • Time for retrieve saved
  • Time for remove saved
  • Errors logged out into log directory

Other Information

Run npm run document to generate a JSDoc documentation directory

Schema

Users

col type
name VARCHAR
traits VARCHAR
gender VARCHAR
photo_count INT
email VARCHAR
location VARCHAR

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •