🚧 Create .env
file & add your own ENV_VARIABLES
as mentioned in .env.example
file.
PORT=3000
MONGODB_URI = <Your MongoDB URI>
JWT_SECRET = <Your JWT Secret>
- 💻 Run Project Locally (bun should be installed):
bun i
bun dev
You can replace bun
by any other package manager like pnpm
, yarn
or npm
- 🐋 Run with Docker:
docker build -t ecommerce .
docker compose up
Base URL: http://localhost:3000
- POST
/auth/register
or/auth/signup
- Body:
name
(string)email
(string)password
(string)admin
(boolean)
- Body:
- POST
/auth/login
or/auth/signin
- Body:
email
(string)password
(string)
- Body:
- GET
/category/
- POST
/category/add
- Body:
title
(string)slug
(string)
- Body:
- POST
/category/upload
- GET
/products/
- GET
/products/product/:productId
- POST
/products/add
- Body:
pName
(string)description
(string)price
(number)category
(string)stock
(boolean)
- Body:
- PUT
/products/update/:productId
- Body:
pName
(string)description
(string)price
(number)category
(string)stock
(boolean)
- Body:
- POST
/product/upload
- DELETE
/products/:productId
- GET
/products/filter/?category=string&search=string
- Query:
category
(string)search
(string)
- Query:
- GET
/cart/
- POST
/cart/add
- Body:
productId
(string)qty
(number)
- Body:
- PUT
/cart/update
- Body:
productId
(string)qty
(number)
- Body:
- GET
/cart/checkout
- GET
/order/all
- GET
/order/get
- PUT
/order/update-status
- Body:
orderId
(string)status
(string)
- Body: