A progressive Node.js framework for building efficient and scalable server-side applications.
Hello every one 👋
This is a simple order management system 🧑💼
Implmented using:
Backend framework: NestJS
ORM: Prisma
Database: PostgreSQL
- Clone the repository
- Install dependencies:
npm install
(Make sure you are in order-management-system directly before running this command) - Set up PostgreSQL and create a database
- Configure
.env
file with the database URL - Run Prisma migrations:
npx prisma migrate dev
- To seed your database run:
npm run seed
- Start the server:
npm run start
- To view API documentation on swagger use this link 👉 http://localhost:3000/api
- Add to Cart:
POST /api/cart/add
- View Cart:
GET /api/cart/:userId
- Update Cart:
PUT /api/cart/update
- Remove From Cart:
DELETE /api/cart/remove
- Create Order:
POST /api/orders
- Get Order by ID:
GET /api/orders/:orderId
- Update Order Status:
PUT /api/orders/:orderId/status
- Get Orders by User ID:
GET /api/orders/user/:userId
- Apply Coupon:
POST /api/orders/apply-coupon