NOTE: This repo only contains the back-end of our project. The interface used can be found at Perfect-Personnel-Placement/frontend.
The Serverless Training planner is a serverless mobile app that Revature managers can use to look at important information regarding clientele demands and batch output for the company. This service visualizes all current batches planned along with any associated information. It also visualizes that batch output alongside the client demand for associates. Managers may input information for clients, their demands, and batches which consist of a curriculum composed of skills, the number of associates, a trainer, and the dates for the batch. This service helps ease the management of supply and demand for the company and is an organizational aid.
- AWS SAM
- AWS CloudFormation
- AWS Lambda
- AWS API Gateway
- AWS S3
- AWS CodePipeline
- AWS RDS
- PostgreSQL
- NodeJS
- Jest
See STARTUP.md (in the current folder) for instructions on how to get the application up and running. Once running, use according to the instructions below.
Potential improvements have been noted in IMPROVE.md (in the current folder).
The following API calls can be made. The list below applies to ALL endpoints:
- A
:in front of a portion of the path means to replace that section with your desired value. - Unless otherwise indicated, no body should be included.
- All request/response bodies must be in JSON.
- Any dates must be sent as a string in
ISO 8601 format.
For example, Friday 6 August 2021 would be sent as
'2021-08-06'.
| Code | Meaning | Usage |
|---|---|---|
| 200 | OK | Should be returned on everything but POST requests |
| 201 | Created | Should only be returned on POST requests) |
| 400 | Bad Request | Will be returned if there is an error with your syntax, an error in the types you used in the body of the message, or if you violated a database constraint (such as a foreign key relationship) |
| 500 | Internal Server Error | Will be returned if the database is unreachable |
Any code returned not in this list indicates that something has gone wrong.
GETto/batchwill get all batchesPOSTto/batchwill create a new batch (will be unconfirmed); requires the following body:{ "batchSize": number, "curriculumId": number, "endDate": string, "startDate": string, "trainerId": number | null, "clientId": number | null }PUTto/batchwill update an existing batch; requires the following body:{ "batchSize": number, "batchId": number, "curriculumId": number, "endDate": string, "startDate": string, "trainerId": number | null, "clientId": number | null }GETto/batch/curriculum/:curriculumIdwill get all batches with the specified curriculumGETto/batch/id/:batchIdwill get the batch with the specified IDPATCHto/batch/id/:batchIdwill confirm a batch. (Note: Make sure a trainer has been assigned to a batch first. ThePUTto/batchrequest can be used for this if necessary.)DELETEto/batch/id/:batchIdwill delete the specified batchGETto/batch/trainer/:trainerIdwill get all the batches assigned to a specified trainer
GETto/clientwill get all clientsPOSTto/clientwill create a new client; requires the following body:{ "clientName": string }GETto/client/id/:clientIdwill get a specific client by idGETto/client/name/:clientNamewill get a specific client by name
GETto/curriculumwill get all curriculaPOSTto/curriculumwill create a new curriculum; requires the following body:{ "createdby": string, "createdon": string (in ISO 8601 format -- see above), "curriculumname": string, "skillIdArr": number[] }GETto/curriculum/id/:curriculumIdwill get a specific curriculumDELETEto/curriculum/id/:curriculumIdwill delete a specific curriculum
GETto/demandwill get all demandsPOSTto/demandwill create a new demand; requires the following body:{ "clientid": number, "curriculumid": number, "needby": string, "quantitydemanded": number }GETto/demand/client/:clientIdwill get all demand from a specific clientGETto/demand/curriculum/:curriculumIdwill get all demand for a specific curriculumGETto/demand/curriculum/:curriculumId/:startDate/:endDatewill get all demand for a specific curriculum within the specified date rangeGETto/demand/date/:startDate/:endDatewill get all demand within the specified date rangeGETto/demand/id/:demandIdwill get a specific demand
GETto/skillwill get all skillsPOSTto/skillwill create a new skill; requires the following body:{ "skillName": string }GETto/skill/id/:skillIdwill get a specific skill by idDELETEto/skill/id/:skillIdwill delete a specific skillGETto/skill/name/:skillNamewill get a specific skill by name
GETto/trainerwill get all trainersPOSTto/trainerwill create a new trainer; requires the following body:{ "email": string, "trainerfirst": string, "trainerlast": string }PUTto/trainerwill update a trainer's information; requires the following body:{ "trainerid": number, "email": string, "trainerfirst": string, "trainerlast": string, "curriculaIdArr": number[] }GETto/trainer/id/:trainerIdwill get the information about a specific trainerDELETEto/trainer/id/:trainerIdwill delete a specific trainerGETto/trainer/firstname/:trainerFirstNamewill get all trainers with the requested first nameGETto/trainer/lastname/:trainerLastNamewill get all trainers with the requested last name