A modern full-stack e-commerce platform built using the MERN stack, featuring secure authentication, role-based authorization, product and inventory management, customer management, order tracking, coupons, reviews, wishlist, email verification, password recovery, cloud-based image uploads, and admin analytics.
π Live Demo: https://e-commerce-shop-proj.vercel.app
- User Registration & Login
- JWT-based Authentication
- Role-Based Authorization for Admin and Customers
- Password Hashing using bcrypt
- Email Verification using Brevo
- Forgot Password functionality
- Secure Password Reset using token-based verification
- Protected Frontend and Backend Routes
- CORS Configuration
- Helmet Security Middleware
- API Rate Limiting
- Centralized Error Handling
- Customer Registration and Login
- Customer Profile Management
- Profile Image Upload
- Admin Customer Management
- Admin/User Role Management
- Account Verification Status
- Product Creation, Updating and Deletion
- Product Categories
- Product Pricing
- Product Stock Management
- Product Image Upload
- Cloudinary-based Image Storage
- Product Search and Filtering
- Product Details
- Product Ratings and Review Count
- Add Products to Cart
- Update Cart Quantity
- Remove Products from Cart
- Wishlist Management
- Checkout System
- Order Placement
- Order History
- Order Status Tracking
- Shipping Address Management
- Stock Availability Validation
- Automatic Inventory Deduction after Order Placement
- Payment Method and Payment Status Tracking
- Transaction ID Tracking
- Add Product Reviews
- Product Rating System
- Review Management
- Average Product Rating Calculation
- Review Count Aggregation
- Create Coupons
- Update Coupons
- Delete Coupons
- Coupon Validation
- Discount Management
- Admin Coupon Management
- Total Users
- Total Products
- Total Orders
- Total Revenue
- Low Stock Products
- Order Status Analytics
- Product Management
- Customer Management
- Order Management
- Coupon Management
- Responsive Design
- Modern React UI
- Tailwind CSS
- Dark Mode
- Reusable Components
- Protected Routes
- User-Friendly Error Pages
Used for cloud-based image storage instead of storing uploaded images locally on the backend.
- Product Image Uploads
- User Profile Image Uploads
- In-memory file processing using Multer
- Cloudinary-hosted image URLs
- Separate Cloudinary folders for products and user profiles
Used for transactional email functionality.
- Account Verification Emails
- Forgot Password Emails
- Password Reset Links
- React.js
- Vite
- Tailwind CSS
- Axios
- React Router
- Context API
- Recharts
- Node.js
- Express.js
- REST APIs
- JWT
- bcrypt
- Multer
- Helmet
- Morgan
- Express Rate Limit
- CORS
- MongoDB
- Mongoose
- Cloudinary β Image Storage
- Brevo β Transactional Emails
- Vercel
ββββββββββββββββββββββββ
β React + Vite β
β Tailwind Frontend β
ββββββββββββ¬ββββββββββββ
β
Axios
β
βΌ
ββββββββββββββββββββββββ
β Express REST API β
β Node.js β
ββββββββββββ¬ββββββββββββ
β
βββββββββββββββββββββΌββββββββββββββββββββ
β β β
βΌ βΌ βΌ
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β MongoDB β β Cloudinary β β Brevo β
β Database β β Images β β Emails β
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
E_COMMERCE_SHOP_PROJ/
β
βββ frontend/
β βββ public/
β βββ src/
β β βββ components/
β β βββ context/
β β βββ pages/
β β βββ services/
β β βββ App.jsx
β β βββ main.jsx
β βββ package.json
β
βββ server/
β βββ config/
β β βββ cloudinary.js
β β βββ db.js
β β
β βββ controllers/
β β βββ adminController.js
β β βββ authController.js
β β βββ couponController.js
β β βββ orderController.js
β β βββ productController.js
β β βββ reviewController.js
β β βββ wishlistController.js
β β
β βββ middleware/
β β βββ authMiddleware.js
β β βββ errorMiddleware.js
β β βββ profileUploadMiddleware.js
β β βββ roleMiddleware.js
β β
β βββ models/
β β βββ Coupon.js
β β βββ Order.js
β β βββ Product.js
β β βββ Review.js
β β βββ User.js
β β βββ Wishlist.js
β β
β βββ routes/
β β βββ adminRoutes.js
β β βββ authRoutes.js
β β βββ couponRoutes.js
β β βββ orderRoutes.js
β β βββ productRoutes.js
β β βββ reviewRoutes.js
β β βββ uploadRoutes.js
β β βββ userRoutes.js
β β βββ wishlistRoutes.js
β β
β βββ utils/
β β βββ sendEmail.js
β β
β βββ server.js
β βββ package.json
β
βββ screenshots/
β
βββ README.md
User Registration
β
βΌ
Create User
β
βΌ
Hash Password using bcrypt
β
βΌ
Generate Verification Token
β
βΌ
Send Verification Email via Brevo
β
βΌ
User Verifies Account
β
βΌ
Login using Email + Password
β
βΌ
Generate JWT
β
βΌ
Access Protected Resources
Forgot Password
β
βΌ
Generate Reset Token
β
βΌ
Send Reset Email via Brevo
β
βΌ
User Opens Reset Link
β
βΌ
Validate Token
β
βΌ
Set New Password
β
βΌ
Hash Password using bcrypt
β
βΌ
Update User
Product Image
β
βΌ
Multer Memory Storage
β
βΌ
Image Buffer
β
βΌ
Cloudinary Upload
β
βΌ
Secure Cloudinary URL
β
βΌ
Store Image URL with Product
Profile Image
β
βΌ
Multer Memory Storage
β
βΌ
Cloudinary
β
βΌ
Secure Image URL
β
βΌ
User Profile
git clone https://github.com/ARADHYA200/E_COMMERCE_SHOP_PROJ.git
cd E_COMMERCE_SHOP_PROJcd frontend
npm install
npm run devFrontend will run on:
http://localhost:5173
Open another terminal:
cd server
npm install
npm startBackend will run on:
http://localhost:5000
Create a .env file inside the server directory.
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
BREVO_API_KEY=your_brevo_api_keyNever commit
.envfiles or API keys to the repository.
| Module | Functionality |
|---|---|
| Authentication | Registration, Login, JWT, Verification, Password Reset |
| Authorization | Role-based Admin/User access |
| Products | Product CRUD, Categories, Stock, Images |
| Orders | Checkout, Orders, Status, Inventory |
| Coupons | Coupon Creation, Validation, Discounts |
| Reviews | Ratings and Product Reviews |
| Wishlist | Add/Remove Wishlist Products |
| Users | Customer and Profile Management |
| Admin | Dashboard and Business Analytics |
| Uploads | Cloudinary Product Image Uploads |
| Brevo Verification and Password Reset |
- Passwords hashed using bcrypt
- JWT-based authentication
- Role-based authorization
- Protected API routes
- Environment variables for secrets
- CORS configuration
- Helmet security headers
- Express rate limiting
- Centralized error handling
- Input validation and authorization checks
- Online Payment Gateway Integration
- Advanced Admin Reports
- Order Invoice Generation
- Product Recommendation System
- Dockerization
- Automated Testing
- CI/CD Pipeline
- Advanced Search and Filtering
Aradhya Agarwal
B.Tech β Electronics & Communication Engineering Dr. B. R. Ambedkar National Institute of Technology, Jalandhar
GitHub: https://github.com/ARADHYA200



