Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Nexus Commerce β€” Production MERN E-Commerce Platform

A modern, full-stack, production-ready e-commerce platform built using the MERN stack with TypeScript, real-time capabilities, secure authentication, role-based access control, advanced shopping workflows, and enterprise-grade architecture.


🌐 Live Demo

Service URL
Frontend (Vercel) Nexus Commerce Frontend
Backend API (Render) Nexus Commerce Backend API

✨ Key Features

Category Features
Authentication JWT Authentication, Refresh Tokens, Google OAuth, GitHub OAuth, Email OTP Verification
Authorization Role-Based Access Control (User, Seller, Admin)
Shopping Product Variants, Flash Sales, Cart, Wishlist, Coupons, Multi-Address Checkout
Payments Stripe, Razorpay, Cash on Delivery, Wallet Support
Real-Time Socket.io Notifications, Live Order Updates, Inventory Sync
Dashboards User Dashboard, Seller Analytics Dashboard, Admin Management Dashboard
Admin Panel User Management, Product Moderation, Category Management, Coupon CRUD
Media Uploads Cloudinary Integration with Multi-Image Upload Support
Security Helmet, CORS, Rate Limiting, Secure JWT Handling
DevOps Docker, Docker Compose, GitHub Actions CI/CD, Vercel + Render Deployment
Developer Experience TypeScript, Modular Architecture, Reusable APIs, Clean Folder Structure

πŸ› οΈ Tech Stack

Frontend

  • React 18
  • Vite
  • TypeScript
  • Tailwind CSS
  • Zustand
  • TanStack Query
  • Framer Motion
  • Socket.io Client
  • Recharts
  • React Hook Form + Zod

Backend

  • Node.js
  • Express.js
  • TypeScript
  • MongoDB + Mongoose
  • Passport.js
  • JWT Authentication
  • Socket.io
  • Cloudinary
  • Nodemailer
  • Stripe + Razorpay

πŸ“ Project Structure

nexus-commerce/
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/
β”‚   β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   └── server.ts
β”‚   β”‚
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ tsconfig.json
β”‚   └── package.json
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ stores/
β”‚   β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”œβ”€β”€ types/
β”‚   β”‚   └── utils/
β”‚   β”‚
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ vite.config.ts
β”‚   └── package.json
β”‚
β”œβ”€β”€ docker-compose.yml
└── .github/workflows/

πŸš€ Getting Started

Prerequisites

  • Node.js 20+
  • npm 10+
  • MongoDB Atlas or Local MongoDB
  • Cloudinary Account
  • Stripe/Razorpay Account

βš™οΈ Installation

1️⃣ Clone Repository

git clone https://github.com/YOUR_USERNAME/nexus-commerce.git
cd nexus-commerce

2️⃣ Backend Setup

cd backend
cp .env.example .env
npm install

Configure all environment variables inside .env

Required Backend Environment Variables

PORT=
NODE_ENV=
MONGO_URI=

JWT_ACCESS_SECRET=
JWT_REFRESH_SECRET=

CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=

SMTP_HOST=
SMTP_PORT=
SMTP_USER=
SMTP_PASS=

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=

STRIPE_SECRET_KEY=
RAZORPAY_KEY_ID=
RAZORPAY_KEY_SECRET=

3️⃣ Frontend Setup

cd ../frontend
cp .env.example .env
npm install

Required Frontend Environment Variables

VITE_API_URL=https://nexus-commerce-backend-yhqp.onrender.com
VITE_RAZORPAY_KEY_ID=your_key

▢️ Run Locally

Backend

cd backend
npm run dev

Frontend

cd frontend
npm run dev

Frontend runs on:

http://localhost:5173

🐳 Docker Setup

Run Using Docker Compose

docker compose up -d --build

Stop Containers

docker compose down

☁️ Deployment

Frontend Deployment β€” Vercel

  • Root Directory: frontend
  • Build Command:
npm run build
  • Output Directory:
dist

Required Environment Variables

VITE_API_URL=https://nexus-commerce-backend-yhqp.onrender.com

Backend Deployment β€” Render

Build Command

npm install && npm run build

Start Command

npm start

Root Directory

backend

πŸ” User Roles

Role Permissions
User Browse products, add to cart, checkout, wishlist
Seller Manage products, inventory, orders
Admin Full platform management and analytics

πŸ“‘ API Modules

Module Endpoint
Auth /api/auth
Users /api/users
Products /api/products
Categories /api/categories
Cart /api/cart
Orders /api/orders
Payments /api/payments
Wishlist /api/wishlist
Reviews /api/reviews
Upload /api/upload
Notifications /api/notifications
Admin /api/admin
Seller /api/seller

πŸ”„ CI/CD Pipeline

Configured using GitHub Actions for:

  • Automated Build
  • TypeScript Validation
  • Frontend Deployment
  • Backend Deployment
  • Continuous Integration

πŸ“Š Features Implemented

  • βœ… Authentication & Authorization
  • βœ… Protected Routes
  • βœ… Product Variants
  • βœ… Cart & Wishlist
  • βœ… Coupon System
  • βœ… Cloudinary Image Upload
  • βœ… Address Management
  • βœ… Seller Dashboard
  • βœ… Admin Dashboard
  • βœ… Real-Time Notifications
  • βœ… Responsive UI
  • βœ… Secure APIs
  • βœ… Production Deployment

🧠 Skills Demonstrated

  • Full Stack Development
  • MERN Stack Architecture
  • REST API Design
  • Authentication & Authorization
  • State Management
  • Real-Time Communication
  • Cloud Deployment
  • Docker & CI/CD
  • TypeScript Backend Development
  • Production-Level Project Structuring

πŸ—οΈ Production Highlights

  • Enterprise-Level Folder Structure
  • Modular Architecture
  • Type-Safe Backend APIs
  • Reusable Frontend Components
  • Secure Authentication Flow
  • Optimized API Communication
  • Scalable Codebase Design

πŸ“„ License

MIT License Β© 2026


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

Developed by Yogeshwaran S


About

Production-grade MERN e-commerce platform with React, TypeScript, Node.js, MongoDB, real-time updates, role-based dashboards, Stripe/Razorpay payments, Docker, CI/CD, and enterprise architecture.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages