Skip to content

LABS-EU3/wt_backend

Repository files navigation

Build Status Coverage Status

wt_backend

About Trackdrills

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.

Meet the Team

Ezekiel Ekunola Amira Adediran Modurotolu Olokode Folasade Agbaje Melquisedeque Pereira
Sandrava Philips Oluwafemi Anjorin

Getting Started

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.example file and create your own .env using the same key variables.
Environment Variables

Project Overview

Trello Board
Product Canvas
UX Design files
Landing Page
API

API

Table of Contents

Query

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!

Mutation

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!

Objects

Dashboard

Field Argument Type Description
graphs [Graph!]!
stats Stats!
streak Float
user User

Exercise

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

Graph

Field Argument Type Description
name String
data [GraphData!]!

GraphData

Field Argument Type Description
date Float
value Float

Message

Field Argument Type Description
id String
sender String
receiver String
message String
sent Float

Notification

Field Argument Type Description
userId String
message String
topic String

A informative field describing relevant content and its ID

Schedule

Field Argument Type Description
id String
userId String
workoutId Workout
startDate Float
routine String

Stats

Field Argument Type Description
reps Float
sets Float
amountLifted Float

Subscription

Field Argument Type Description
_ Boolean
scheduledWorkoutAlert Notification
newMessage Message!
receiver String!

Unit

Application measurement units

Field Argument Type Description
id ID!
name String!
type String!

User

Application user

Field Argument Type Description
id String!
firstname String
lastname String
email String!
password String
height Float
heightUnit Unit
weight Float
weightUnit Unit
goal String
equipment Boolean
experience String
google UserPlatform
facebook UserPlatform
photo String
reminderType String
gallery [WorkoutSession]!
messages [Message!]

UserAuthResponse

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

UserPlatform

Application user login platform

Field Argument Type Description
id String
token String

Workout

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

WorkoutSession

Field Argument Type Description
id String
userId String
workoutId Workout
exerciseId String
exerciseTimer Float
startDate Float
endDate Float
pause Boolean
picture String
weight Float

Inputs

Filter

Field Type Description
search String!
fields [String!]!

NotificationInput

Field Type Description
userId String
message String
topic String
subscription String

ScheduleInput

Field Type Description
workoutId String
startDate Float
reminderTime Float
routine String

UpdateCompletedWorkoutInput

Field Type Description
sessionId String!
file Upload
weight Float

UserFormLoginInput

Object parameter for user login

Field Type Description
email String
password String
remember Boolean

UserPlatformAuthInput

Object parameter for user platform authentication

Field Type Description
accessToken String
idToken String

UserPlatformInput

Field Type Description
id String
token String

UserSignupInput

Object parameter for creating user

Field Type Description
firstname String!
lastname String!
email String!
password String!
rePassword String!

UserUpdateInput

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
google UserPlatformInput
facebook UserPlatformInput
photo Upload
reminderType String

WorkoutInput

Field Type Description
name String!
workoutId String
description String!
intensity String!
picture Upload
remove Boolean
exercises [String!]!

WorkoutSessionInput

Field Type Description
userId String!
workoutId String!
exerciseId String!
exerciseTimer Float!
pause Boolean
end Boolean

resetPasswordInput

Field Type Description
password String!
rePassword String!

Scalars

Boolean

The Boolean scalar type represents true or false.

Float

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

ID

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.

String

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.

Upload

The Upload scalar type represents a file upload.

About

Developed with Node, Express, MongoDB and GraphQl. Back End for Trackdrills; a workout tracker

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors