A scalable ecommerce platform built with the MERN stack, featuring secure authentication, payment processing, analytics dashboards, media management, and modern deployment workflows.
Overview β’ Features β’ Architecture β’ Quick Start β’ API
This project is a production-focused ecommerce platform designed around secure authentication, scalable order processing, and modern payment workflows.
The application uses a React + Vite frontend for high-performance rendering and an Express/MongoDB backend for API management, business logic, and analytics.
Core integrations include:
- Razorpay for payment processing
- Cloudinary for media storage
- Google OAuth for authentication
- Resend for transactional email delivery
- JWT-based authentication
- Refresh token session handling
- Google OAuth login
- Protected admin routes
- OTP verification system
- Secure password hashing with bcrypt
- Product catalog & category management
- Cart & wishlist system
- Coupon engine
- Wallet integration
- Product reviews & ratings
- Order management pipeline
- Side-by-side product comparison
- Sales analytics dashboard
- Revenue insights
- Order tracking
- Product management
- User management
- Inventory monitoring
- Cloudinary media uploads
- Dockerized backend deployment
- RESTful API architecture
- Environment-based configuration
- Centralized error handling
| Layer | Technologies |
|---|---|
| Frontend | React, Vite, TailwindCSS |
| Backend | Node.js, Express.js |
| Database | MongoDB, Mongoose |
| Authentication | JWT, Google OAuth |
| Payments | Razorpay |
| Media Storage | Cloudinary |
| Email Service | Resend |
| Infrastructure | Docker |
Client (Browser)
β
βΌ
React Frontend (Vite)
β
REST API / JWT
β
βΌ
Express Backend
β
βββββββΌβββββββββ¬ββββββββββ
βΌ βΌ βΌ βΌ
MongoDB Cloudinary Resend Razorpay
ecommerce-app/
β
βββ backend/
β βββ config/
β βββ controllers/
β βββ middleware/
β βββ models/
β βββ routes/
β βββ utils/
β
βββ frontend/
β βββ public/
β βββ src/
β βββ components/
β βββ pages/
β βββ redux/
β βββ services/
β
βββ .env.example
βββ README.md- Modular MVC backend architecture
- Role-based access control (RBAC)
- Optimized MongoDB query structure
- Centralized API error handling
- Secure token-based authentication flow
- Reusable frontend component system
- Scalable REST API organization
- HTTP-only secure cookies
- JWT access & refresh token flow
- Password hashing with bcrypt
- Protected admin APIs
- Input validation & sanitization
- Secure Razorpay payment verification
- Vite-powered frontend builds
- Lazy-loaded frontend routes
- Optimized Cloudinary image delivery
- Pagination for product queries
- Aggregation pipelines for analytics
- Debounced search functionality
- Node.js
- MongoDB instance
- Docker (optional)
git clone https://github.com/yourusername/ecommerce-app.git
cd ecommerce-appcd backend
npm installcd frontend
npm installCreate environment files using .env.example.
PORT=5000
MONGO_URI=
JWT_SECRET=
RAZORPAY_KEY_ID=
RAZORPAY_KEY_SECRET=
CLOUDINARY_CLOUD_NAME=VITE_SERVER_URL=http://localhost:5000
VITE_GOOGLE_CLIENT_ID=
VITE_RAZORPAY_KEY=cd backend
npm run devcd frontend
npm run devhttp://localhost:5000/api| Endpoint | Description |
|---|---|
/users |
Authentication & profile management |
/products |
Product CRUD & listings |
/category |
Category management |
/orders |
Order processing |
/cart |
Shopping cart |
/wallet |
Wallet transactions |
/coupons |
Coupon management |
/reviews |
Product reviews |
/sales |
Analytics & reporting |
/admin |
Admin utilities |
docker build -t ecommerce-backend ./backenddocker run --name ecommerce-backend \
-p 5000:5000 \
--env-file backend/config/.env \
ecommerce-backend| Service | Platform |
|---|---|
| Frontend | Vercel |
| Backend | Render / Railway / EC2 |
| Database | MongoDB Atlas |
| Media Storage | Cloudinary |
| Payments | Razorpay |
- Redis caching layer
- Microservices architecture
- Elasticsearch product search
- Automated testing pipeline
- CI/CD integration
- Multi-vendor support
Released under the MIT License.

