Simple inventory management system made as a task. Written in Nest.js for scalability and maintaining assigment boundaries.
All checks are implemented accordingly. Every endpoint and service is fully tested.
Most of the needed validations are done via class-validator
using DTO's. Always returning proper error codes and messages.
In folder bruno there is collection of API endpoints ready to use. These were made by: Bruno API client
To launch local environment use prodvided docker-compose
for database connection, or use your own.
URI for database should be inserted into .env
file in root of this repository. The default is:
MONGODB_URI=mongodb://localhost:27017/coffeemugims
To launch the app use your package manager of choice, I used pnpm: pnpm start:dev
. Be sure that database is running before that.
For unit tests please run: pnpm test