Created using the framework NestJs with the following major libraries and purposes:
- passport - login local strategy
- jwt - user identification
- prisma - db interaction
- bcryptjs - password encryption
(Don't)s for simplicity:
- Didn't added the auditing columns or history tables;
- Bearer authentication with JWT with salted password;
- Prisma for data access layer (services), but understand the perf issues it might have;
- bcryptjs to be able to run both host and docker
Auth
- POST /signup - create user account
- POST /login - returns a access token to interact with the tasks endpoints
Tasks
- POST /tasks - create a new task
- GET /tasks - retrive current logged in user tasks
- PATCH /tasks/:taskId - update the tasks with id
User 1 -> * Tasks
- docker and docker-compose
- node >18
- npm
cd task-manager-api
docker-compose up -d
OpenApi generated interface in the browser
build and run
npm install && npm run build && npm run start
run dev env
npm install && npm run start:dev
After installation can interact with OpenApi generated interface in the browser