A full-stack e-commerce application built with the MERN stack (MongoDB, Express.js, React, Node.js).
- 🔐 User authentication (Register/Login)
- 🛍️ Browse products by category, gender, and collections
- 🔍 Search and filter products
- 🛒 Shopping cart with guest cart support
- 💳 Checkout process
- 📦 Order tracking and history
- 📊 Admin dashboard
- 📦 Product management (CRUD)
- 👥 User management
- 📋 Order management
| Frontend | Backend |
|---|---|
| React 19 | Node.js |
| Redux Toolkit | Express.js |
| React Router | MongoDB |
| Tailwind CSS | JWT Auth |
| Vite | Cloudinary |
├── backend/
│ ├── config/ # Database & Cloudinary config
│ ├── controllers/ # Route controllers
│ ├── middleware/ # Custom middleware
│ ├── models/ # Mongoose models
│ ├── routes/ # API routes
│ └── utils/ # Utility functions
│
├── frontend/
│ └── src/
│ ├── components/ # React components
│ ├── pages/ # Page components
│ └── redux/ # Redux store & slices
- Node.js (v18+)
- MongoDB
-
Clone the repository
git clone <repository-url>
-
Install dependencies
# Backend cd backend && npm install # Frontend cd frontend && npm install
-
Set up environment variables
Create
backend/.env:PORT=7000 MONGO_URI=mongodb://localhost:27017/ecommerce JWT_SECRET=your_secret_key JWT_EXPIRE=30d FRONTEND_URL=http://localhost:5173
Create
frontend/.env:VITE_BACKEND_URL=http://localhost:7000
-
Seed the database
cd backend && node seeder.js
-
Run the application
# Backend cd backend && npm run dev # Frontend cd frontend && npm run dev
-
Access the app
- Frontend:
http://localhost:5173 - Backend:
http://localhost:7000
- Frontend:
Email: admin@example.com
Password: 1234567890
MIT License