Skip to content

Zallu4435/commercecore-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›’ Full-Stack Ecommerce Platform

Production-Ready MERN Commerce Infrastructure

A scalable ecommerce platform built with the MERN stack, featuring secure authentication, payment processing, analytics dashboards, media management, and modern deployment workflows.

React Vite Node.js Express MongoDB Docker

Overview β€’ Features β€’ Architecture β€’ Quick Start β€’ API


πŸ“Œ Overview

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

πŸš€ Features

πŸ‘€ Authentication & Security

  • JWT-based authentication
  • Refresh token session handling
  • Google OAuth login
  • Protected admin routes
  • OTP verification system
  • Secure password hashing with bcrypt

πŸ›οΈ Ecommerce Functionality

  • Product catalog & category management
  • Cart & wishlist system
  • Coupon engine
  • Wallet integration
  • Product reviews & ratings
  • Order management pipeline
  • Side-by-side product comparison

πŸ“Š Admin & Analytics

  • Sales analytics dashboard
  • Revenue insights
  • Order tracking
  • Product management
  • User management
  • Inventory monitoring

☁️ Media & Infrastructure

  • Cloudinary media uploads
  • Dockerized backend deployment
  • RESTful API architecture
  • Environment-based configuration
  • Centralized error handling

πŸ› οΈ Tech Stack

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

πŸ—οΈ System Architecture

Client (Browser)
       β”‚
       β–Ό
React Frontend (Vite)
       β”‚
 REST API / JWT
       β”‚
       β–Ό
Express Backend
       β”‚
 β”Œβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β–Ό     β–Ό        β–Ό         β–Ό
MongoDB Cloudinary Resend Razorpay

πŸ“‚ Project Structure

ecommerce-app/
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ controllers/
β”‚   β”œβ”€β”€ middleware/
β”‚   β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ routes/
β”‚   └── utils/
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ public/
β”‚   └── src/
β”‚       β”œβ”€β”€ components/
β”‚       β”œβ”€β”€ pages/
β”‚       β”œβ”€β”€ redux/
β”‚       └── services/
β”‚
β”œβ”€β”€ .env.example
└── README.md

⚑ Engineering Highlights

  • 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

πŸ”’ Security Features

  • HTTP-only secure cookies
  • JWT access & refresh token flow
  • Password hashing with bcrypt
  • Protected admin APIs
  • Input validation & sanitization
  • Secure Razorpay payment verification

πŸ“ˆ Performance Optimizations

  • Vite-powered frontend builds
  • Lazy-loaded frontend routes
  • Optimized Cloudinary image delivery
  • Pagination for product queries
  • Aggregation pipelines for analytics
  • Debounced search functionality

🏁 Quick Start

Prerequisites

  • Node.js
  • MongoDB instance
  • Docker (optional)

1️⃣ Clone Repository

git clone https://github.com/yourusername/ecommerce-app.git

cd ecommerce-app

2️⃣ Install Dependencies

Backend

cd backend
npm install

Frontend

cd frontend
npm install

3️⃣ Configure Environment Variables

Create environment files using .env.example.

Backend

PORT=5000
MONGO_URI=
JWT_SECRET=
RAZORPAY_KEY_ID=
RAZORPAY_KEY_SECRET=
CLOUDINARY_CLOUD_NAME=

Frontend

VITE_SERVER_URL=http://localhost:5000
VITE_GOOGLE_CLIENT_ID=
VITE_RAZORPAY_KEY=

4️⃣ Run Development Servers

Backend

cd backend
npm run dev

Frontend

cd frontend
npm run dev

πŸ“‘ API Reference

Base URL

http://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 Deployment

Build Backend Image

docker build -t ecommerce-backend ./backend

Run Container

docker run --name ecommerce-backend \
  -p 5000:5000 \
  --env-file backend/config/.env \
  ecommerce-backend

πŸš€ Deployment Stack

Service Platform
Frontend Vercel
Backend Render / Railway / EC2
Database MongoDB Atlas
Media Storage Cloudinary
Payments Razorpay

πŸ“Έ Screenshots

Home Page Admin Dashboard


πŸ§ͺ Future Improvements

  • Redis caching layer
  • Microservices architecture
  • Elasticsearch product search
  • Automated testing pipeline
  • CI/CD integration
  • Multi-vendor support

πŸ“ License

Released under the MIT License.

About

Comprehensive e-commerce transaction platform implementing OAuth 2.0, Redux Toolkit, and Razorpay webhook integrations.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages