This is a task created to Slash comapany that is basically an OSM (Order System Management) using tech stack: Nestjs, Prisma as ORM and PostgreSQL database.
The modules implemented are :
- User
- Order
- Cart
- Product
- Coupon *As a bonus
Futher details about the endpoints can be found in the api documentation in postman.
Link to documentation: https://documenter.getpostman.com/view/33222407/2sA3XV8eic
You will need to run your database locally and add your connection string to a .env file. Example:
DATABASE_URL="postgresql://username:password@localhost:5432/dbname?schema=public"
$ prisma migrate dev --name <migration-name>
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
The server will run by default on : http://localhost:3000
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov