Skip to content

Ecommerce-App is a full-stack MERN e-commerce website with user and admin dashboards. It features product listings, cart, order placement, and admin controls. πŸ›οΈ [Frontend](https://forever-frontend-orcin.vercel.app) πŸ› οΈ [Admin Panel](https://forever-admin-ten-gamma.vercel.app)

Notifications You must be signed in to change notification settings

Reet-Kamlay/Ecommerce-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›’ Ecommerce-App – Full Stack MERN E-commerce Platform

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

🌍 Live Deployments

Interface Link
πŸ›’ Frontend https://forever-frontend-orcin.vercel.app
πŸ§‘β€πŸ’Ό Admin Panel https://forever-admin-ten-gamma.vercel.app

🧰 Tech Stack

  • 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)

πŸ“¦ Major Features (Implemented)

βœ… User Features

  • πŸ”Ž 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 Panel Features

  • πŸ” Admin-only login with protected routes
  • πŸ—‚οΈ Manage product list (Create, Edit, Delete)
  • πŸ›οΈ Manage customer orders (view status, update status)
  • πŸ‘₯ Manage users (view registered customers)

🧾 Folder Structure

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

πŸ” Authentication & Security

  • 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 isAdmin field.

🌐 API Endpoints Overview

πŸ”— Auth Routes

Method Endpoint Description
POST /api/users/register Register new user
POST /api/users/login User login
GET /api/users/profile Get logged-in user

πŸ“¦ Product Routes

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)

πŸ“‘ Order Routes

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)

πŸš€ Getting Started (Local Setup)

1. Clone the repo

git clone https://github.com/Reet-Kamlay/Ecommerce-App.git
cd Ecommerce-App

2. Setup Backend

cd backend
npm install

Create .env:

PORT=5000
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_secret

Run backend:

npm run server

3. Setup Frontend

cd ../frontend
npm install
npm start

4. Setup Admin Panel

cd ../admin
npm install
npm start

🎯 Future Improvements (Optional)

  • 🧾 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

πŸ‘¨β€πŸ’» Author

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.

About

Ecommerce-App is a full-stack MERN e-commerce website with user and admin dashboards. It features product listings, cart, order placement, and admin controls. πŸ›οΈ [Frontend](https://forever-frontend-orcin.vercel.app) πŸ› οΈ [Admin Panel](https://forever-admin-ten-gamma.vercel.app)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages