This project is a full-featured ecommerce web application built using the MERN Stack (MongoDB, Express, React, Node.js). It includes:
- π§βπ» A user-facing frontend with product browsing, shopping cart, and checkout
- π User authentication using JWT
- βοΈ A complete backend API with product, order, and user management
- π οΈ A secure admin dashboard for managing users, orders, and products
| Interface | Link |
|---|---|
| π Frontend | https://forever-frontend-orcin.vercel.app |
| π§βπΌ Admin Panel | https://forever-admin-ten-gamma.vercel.app |
- Frontend: React, React Router DOM, Context API, Axios, CSS
- Backend: Node.js, Express.js, MongoDB (Mongoose)
- Authentication: JWT with HTTP-only cookies
- Admin: React-based admin dashboard
- Deployment: Vercel (frontend/admin) & Render/Heroku (backend)
- π Browse products on the homepage
- π¦ View product details on individual product pages
- π Add/remove products from shopping cart
- π€ User registration & login (with JWT)
- π Access protected routes (e.g., placing orders)
- π§Ύ View personal order history
- π‘ Simple and responsive UI
- π Admin-only login with protected routes
- ποΈ Manage product list (Create, Edit, Delete)
- ποΈ Manage customer orders (view status, update status)
- π₯ Manage users (view registered customers)
Ecommerce-App/
βββ frontend/ # Public-facing React UI
β βββ src/
β β βββ components/ # Navbar, ProductList, Cart, etc.
β β βββ pages/ # HomePage, ProductPage, CartPage, etc.
β β βββ context/ # CartContext & user context
β β βββ App.js # Frontend routing logic
β βββ package.json
β
βββ backend/ # Node.js + Express REST API
β βββ models/ # Mongoose schemas (User, Product, Order)
β βββ routes/ # API routes: /api/users, /api/products, /api/orders
β βββ controllers/ # Logic for user/product/order routes
β βββ middleware/ # Auth middleware, error handling
β βββ config/ # DB connection (MONGO_URI, dotenv)
β βββ server.js # Main server entry point
β
βββ admin/ # React Admin Dashboard
β βββ src/
β β βββ pages/ # Orders, Products, Users, Dashboard
β β βββ App.js # Admin routes
β βββ package.json
βββ README.md
- JWT token is stored in HTTP-only cookies for security.
- Auth middleware (
authMiddleware.js) protects user/admin routes. - Users and Admins have separate roles managed via
isAdminfield.
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/users/register |
Register new user |
| POST | /api/users/login |
User login |
| GET | /api/users/profile |
Get logged-in user |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/products |
Get all products |
| GET | /api/products/:id |
Get single product detail |
| POST | /api/products |
Add new product (admin) |
| PUT | /api/products/:id |
Edit product (admin) |
| DELETE | /api/products/:id |
Delete product (admin) |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/orders |
Create new order |
| GET | /api/orders/my |
Get current user's orders |
| GET | /api/orders |
Get all orders (admin) |
| PUT | /api/orders/:id |
Update order status (admin) |
git clone https://github.com/Reet-Kamlay/Ecommerce-App.git
cd Ecommerce-Appcd backend
npm installCreate .env:
PORT=5000
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_secretRun backend:
npm run servercd ../frontend
npm install
npm startcd ../admin
npm install
npm start- π§Ύ Invoice download or PDF receipts
- π³ Stripe/PayPal integration
- βοΈ Email notifications (e.g., order confirmation)
- π¦ Pagination and search for product catalog
- ποΈ File uploads with image previews
Reet Kamlay
π GitHub: @Reet-Kamlay
This full-stack MERN project is built from scratch to understand and practice real-world e-commerce functionality, both from a user and admin perspective. Feel free to fork, clone, and enhance it for your own use.