Challenge Overview
General Requirements
1. Initial PG schema will provided to you (in codebase's app/dbmigrations sub directory).
2. Create 4 endpoints as specified in the swagger doc.
3. Both GET endpoints are open to all.
4. POST & PUT endpoints require user to be logged in and have “administrator” role in the JWT. The readme.md in the archive explains how to generate your own JWT. The provided codebase uses a middleware for JWT verification.
5. The inputs in all APIs should be properly validated.
6. Connection pooling: service should initialize a connection pool (configurable params) during startup. Each request should request a connection from the pool to perform its database transaction
7. Support for transactions: we will need support for transactions
8. Using ORMs: if you use an ORM please provide data around the benefits of using ORM and also the different ORMs evaluated
9. Promises: Use promises over callbacks. If library doesn’t provide promise support consider wrapping it using bluebird (http://bluebirdjs.com/docs/getting-started.html)
Codebase
The codebase will be provided to you in the forum, which has most parts implemented.
Testing
We use docker & docker compose for all local dependencies. ( refer to the README.md in provided codbase)
Note to the reviewers, that the review time is 24hours.
Final Submission Guidelines
1. Updated code base with proper documentation2. Deployment Guide with detailed Verification Steps