Trackdrills is an application that gives you access to over 500 workouts and exercises to choose from to suit your fitness goals. It is a health-focused app that also gives you the ability to create your own customized workout plans and track your progress.
| Ezekiel Ekunola | Amira Adediran | Modurotolu Olokode | Folasade Agbaje | Melquisedeque Pereira |
|---|---|---|---|---|
| |
|
|
|
|
| Sandrava Philips | Oluwafemi Anjorin | |||
| |
|
Follow the instructions below:
- Create a folder for this project and open it in your terminal -
cd <folder-name>. - Clone the project files -
git clone https://github.com/LABS-EU3/wt_backend.git . - Install dependencies -
npm i. - Open
.env.examplefile and create your own.envusing the same key variables.
Environment Variables
- PORT - The server port to run on.
- MONGO_CONNECT - Connection string to a production mongo database.
- MONGO_CONNECT_TEST - Connection string to a testing mongo database.
- FACEBOOK_APP_ID - Facebook application id.
- FACEBOOK_APP_SECRET - Facebook application secret.
- GOOGLE_APP_ID - Google application id.
- GOOGLE_APP_SECRET - Google application secret.
- JWT_SECRET - A random secret string to generate user passwords.
- GRAPHIQL_PLAYGROUND - A boolean value that enables/disables the graphiql playground.
- CLOUD_NAME - A cloudinary folder for image uploading.
- CLOUDINARY_API_KEY - A cloudinary api key.
- CLOUDINARY_API_SECRET - A cloudinary api secret.
- SMTP_USERNAME - A google email account.
- SMTP_PASSWORD - That same account's password
- NOTIFICATIONS_CRON_TIMER - A string indicating the frequency of the cron that schedules user reminders before their workouts - See https://www.npmjs.com/package/node-cron for format details.
Trello Board
Product Canvas
UX Design files
Landing Page
API
| Field | Argument | Type | Description |
|---|---|---|---|
| _ | Boolean | ||
| authForm | UserAuthResponse! |
Login - Authenticates a user with a json web token |
|
| input | UserFormLoginInput! | ||
| user | User! |
find user from token |
|
| accountRecovery | UserAuthResponse! |
Send email to user with link to password reset page |
|
| input | String! | ||
| unitById | Unit! |
Get a specific Unit's data |
|
| id | String! | ||
| units | [Unit!]! |
Get an array of Unit objects |
|
| exercises | [Exercise!]! |
Get a list of exercises |
|
| input | Filter | ||
| exercise | Exercise! |
Get a specific of exercise |
|
| id | String! | ||
| workouts | [Workout!]! | ||
| input | Filter | ||
| workout | Workout! | ||
| id | String! | ||
| completedWorkouts | [WorkoutSession!]! | ||
| completedWorkoutsGallery | [User!]! | ||
| userSchedule | [Schedule!]! | ||
| suggestionsByExperience | [Workout!]! | ||
| notifications | [Notification!]! | ||
| dashboard | Dashboard | ||
| friends | [User!]! | ||
| friendRequests | [User!]! | ||
| findFriends | [User!]! | ||
| input | Filter | ||
| friendChat | [Message!]! | ||
| receiver | String! | ||
| Field | Argument | Type | Description |
|---|---|---|---|
| _ | Boolean | ||
| addUser | UserAuthResponse! |
Sign up - Creates a new user |
|
| input | UserSignupInput! | ||
| updateUser | User! |
Update user data by id |
|
| input | UserUpdateInput! | ||
| authFacebook | UserAuthResponse! |
Login with Facebook account - Authenticates a user with a json web token |
|
| input | UserPlatformAuthInput! | ||
| authGoogle | UserAuthResponse! |
Login with Google account - Authenticates a user with a json web token |
|
| input | UserPlatformAuthInput! | ||
| resetPassword | UserAuthResponse! |
Edits the password for users with reset token |
|
| input | resetPasswordInput | ||
| workoutSession | WorkoutSession | ||
| input | WorkoutSessionInput! | ||
| updateCompletedWorkout | WorkoutSession! | ||
| input | UpdateCompletedWorkoutInput! | ||
| customWorkout | Workout | ||
| input | WorkoutInput! | ||
| pushNotification | Notification! | ||
| input | NotificationInput! | ||
| scheduleWorkout | Schedule! | ||
| input | ScheduleInput! | ||
| manageFriends | Boolean! | ||
| userId | String! | ||
| task | String! | ||
| sendMessage | Message! | ||
| receiver | String! | ||
| message | String! | ||
| Field | Argument | Type | Description |
|---|---|---|---|
| graphs | [Graph!]! | ||
| stats | Stats! | ||
| streak | Float | ||
| user | User | ||
Object parameter for fetching exercises
| Field | Argument | Type | Description |
|---|---|---|---|
| id | ID! | ||
| video | String | ||
| difficulty | String | ||
| pictureOne | String | ||
| pictureTwo | String | ||
| rating | String | ||
| equipment | String | ||
| type | String | ||
| muscle | String | ||
| name | String | ||
| description | String | ||
| time | Float | ||
| Field | Argument | Type | Description |
|---|---|---|---|
| name | String | ||
| data | [GraphData!]! | ||
| Field | Argument | Type | Description |
|---|---|---|---|
| date | Float | ||
| value | Float | ||
| Field | Argument | Type | Description |
|---|---|---|---|
| id | String | ||
| sender | String | ||
| receiver | String | ||
| message | String | ||
| sent | Float | ||
| Field | Argument | Type | Description |
|---|---|---|---|
| userId | String | ||
| message | String | ||
| topic | String |
A informative field describing relevant content and its ID |
|
| Field | Argument | Type | Description |
|---|---|---|---|
| id | String | ||
| userId | String | ||
| workoutId | Workout | ||
| startDate | Float | ||
| routine | String | ||
| Field | Argument | Type | Description |
|---|---|---|---|
| reps | Float | ||
| sets | Float | ||
| amountLifted | Float | ||
| Field | Argument | Type | Description |
|---|---|---|---|
| _ | Boolean | ||
| scheduledWorkoutAlert | Notification | ||
| newMessage | Message! | ||
| receiver | String! | ||
Application measurement units
| Field | Argument | Type | Description |
|---|---|---|---|
| id | ID! | ||
| name | String! | ||
| type | String! | ||
Application user
| Field | Argument | Type | Description |
|---|---|---|---|
| id | String! | ||
| firstname | String | ||
| lastname | String | ||
| String! | |||
| password | String | ||
| height | Float | ||
| heightUnit | Unit | ||
| weight | Float | ||
| weightUnit | Unit | ||
| goal | String | ||
| equipment | Boolean | ||
| experience | String | ||
| UserPlatform | |||
| UserPlatform | |||
| photo | String | ||
| reminderType | String | ||
| gallery | [WorkoutSession]! | ||
| messages | [Message!] | ||
Object response for authentication requests
| Field | Argument | Type | Description |
|---|---|---|---|
| id | String | ||
| firstname | String | ||
| lastname | String | ||
| token | String | ||
| isNewUser | Boolean |
A boolean value that determines if a new user was created |
|
Application user login platform
| Field | Argument | Type | Description |
|---|---|---|---|
| id | String | ||
| token | String | ||
| Field | Argument | Type | Description |
|---|---|---|---|
| id | ID! | ||
| userId | String | ||
| name | String | ||
| description | String | ||
| intensity | String | ||
| picture | String | ||
| exercises | [Exercise!]! | ||
| avgTime | String | ||
| equipment | String | ||
| muscles | String | ||
| types | String | ||
| session | WorkoutSession | ||
| experience | String | ||
| Field | Argument | Type | Description |
|---|---|---|---|
| id | String | ||
| userId | String | ||
| workoutId | Workout | ||
| exerciseId | String | ||
| exerciseTimer | Float | ||
| startDate | Float | ||
| endDate | Float | ||
| pause | Boolean | ||
| picture | String | ||
| weight | Float | ||
| Field | Type | Description | |
|---|---|---|---|
| search | String! | ||
| fields | [String!]! | ||
| Field | Type | Description | |
|---|---|---|---|
| userId | String | ||
| message | String | ||
| topic | String | ||
| subscription | String | ||
| Field | Type | Description | |
|---|---|---|---|
| workoutId | String | ||
| startDate | Float | ||
| reminderTime | Float | ||
| routine | String | ||
| Field | Type | Description | |
|---|---|---|---|
| sessionId | String! | ||
| file | Upload | ||
| weight | Float | ||
Object parameter for user login
| Field | Type | Description | |
|---|---|---|---|
| String | |||
| password | String | ||
| remember | Boolean | ||
Object parameter for user platform authentication
| Field | Type | Description | |
|---|---|---|---|
| accessToken | String | ||
| idToken | String | ||
| Field | Type | Description | |
|---|---|---|---|
| id | String | ||
| token | String | ||
Object parameter for creating user
| Field | Type | Description | |
|---|---|---|---|
| firstname | String! | ||
| lastname | String! | ||
| String! | |||
| password | String! | ||
| rePassword | String! | ||
Object parameter for updating user
| Field | Type | Description | |
|---|---|---|---|
| firstname | String | ||
| lastname | String | ||
| height | Float | ||
| heightUnit | String | ||
| weight | Float | ||
| weightUnit | String | ||
| goal | String | ||
| equipment | Boolean | ||
| experience | String | ||
| UserPlatformInput | |||
| UserPlatformInput | |||
| photo | Upload | ||
| reminderType | String | ||
| Field | Type | Description | |
|---|---|---|---|
| name | String! | ||
| workoutId | String | ||
| description | String! | ||
| intensity | String! | ||
| picture | Upload | ||
| remove | Boolean | ||
| exercises | [String!]! | ||
| Field | Type | Description | |
|---|---|---|---|
| userId | String! | ||
| workoutId | String! | ||
| exerciseId | String! | ||
| exerciseTimer | Float! | ||
| pause | Boolean | ||
| end | Boolean | ||
| Field | Type | Description | |
|---|---|---|---|
| password | String! | ||
| rePassword | String! | ||
The Boolean scalar type represents true or false.
The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.
The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.
The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
The Upload scalar type represents a file upload.