Phases is a shift marketplace, connecting workplaces with workers to provide manage, and complete work shifts.
This the server application for Phases, exposing an API for managing Phases' users and data.
This project uses three env files test, development, and production, and supplies a file .env.example with the variables necessary for the project to run. Copy this file to the three envs described using the script npm run envinit.
# install dependencies
npm install
# create, migrate, and seed database
npm run db:dev:init
# clear and re-seed database
npm run db:dev:reseed
# start server in watch mode
npm run start:devResponse payloads are exclusively in JSON.
General payload: payload.schema
This API utilizes a JSON Web Token to authenticate users. For 🔑 protected routes, a JWT must be sent as a bearer token.
Client accounts are represented by User objects.
Create a User.
- Body:
signup.dto - Success payload:
signup-success.schema
Authenticate self as a User and obtain a token.
- Body:
login.dto - Success payload:
login-success.schema
Get details of own User.
- Payload:
get-account.schema
Update details of own User.
- Body:
update.dto - Success payload:
update-success.schema