Skip to content

Latest commit

Β 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‰ ReDragon

Multi-Vendor E-Commerce Marketplace

Dynamic Cart Syncing β€’ PostgreSQL & Prisma β€’ Multi-Vendor Management β€’ Razorpay Integration


πŸ“– Overview

ReDragon is a full-stack multi-vendor e-commerce marketplace branded and developed by Alok Singh. The platform allows users to browse products, apply discount coupons, save multiple shipping addresses, checkout using secure Razorpay payments or Cash on Delivery (COD), register their own seller stores, and manage products and order fulfillment via a dedicated Seller Dashboard.

An Admin Panel is also provided to review store applications, monitor system statistics, and manage platform coupons.


✨ Features

Feature Description
πŸ”‘ JWT Authentication Local login and signup with secure bcrypt password hashing and session authorization.
πŸ‰ Multi-Vendor Store Regular users can submit a store request. Approved stores can list and sell products on the platform.
πŸ”„ Cart & Address Sync Client-side Redux cart states automatically sync to the PostgreSQL database in real-time.
🎟️ Coupon System Admin-manageable coupon codes with validations (expiry checks, new-user filters).
πŸ’³ Razorpay Checkout Fully integrated Razorpay checkout flows supporting both live key verification and offline simulation.
πŸ› οΈ Simulated Sandbox Mode Out-of-the-box local testing capabilities. When keys are omitted, checkouts route to local mock APIs.
πŸ“Š Seller Dashboard Earnings summary, total product/order count, ratings list, add/manage products, toggle inStock, update fulfillment status.
πŸ‘‘ Admin Dashboard System-wide revenue charts, store applications verification, coupon managers.

πŸ— Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚             Web Frontend             β”‚
β”‚        Next.js 15 / Redux RTK        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚ HTTP / API Requests
                   β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           Node.js Backend            β”‚
β”‚         Express Server / JWT         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”Œ_________β”΄_________┐
         β–Ό                   β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   PostgreSQL    β”‚ β”‚    Razorpay     β”‚
β”‚   Prisma Client β”‚ β”‚ Payment Gateway β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Frontend

  • Next.js 15: React 19 App Router & Server actions
  • Redux Toolkit: Client-side cart sync, session handling, and store states
  • Tailwind CSS: Modern, elegant, fully responsive designs with ReDragon's crimson red theme accents
  • Axios & JWT: Clean service integrations and token managers

Backend

  • Node.js: Asynchronous backend server
  • Express.js: REST API controllers and middleware routers
  • Prisma ORM: Relational schema handling and fluent queries
  • Multer: Static product photo upload handling
  • Crypto & HMAC-SHA256: Secure verification of Razorpay webhooks and hashes

Database

  • PostgreSQL: Managed Neon PostgreSQL cluster with relational database structure
ReDragon-Ecommerce
β”œβ”€β”€ backend
β”‚   β”œβ”€β”€ controllers        # Request handlers & logic (Auth, Orders, Coupons, Products, Stores)
β”‚   β”œβ”€β”€ middleware         # JWT & role verification filters
β”‚   β”œβ”€β”€ prisma             # Schema file (`schema.prisma`) & database seed scripts
β”‚   β”œβ”€β”€ uploads            # Static assets and product image uploads
β”‚   β”œβ”€β”€ .env.example       # Example environment configuration
β”‚   β”œβ”€β”€ server.js          # API entry point & configuration
β”‚   └── package.json       # Backend dependencies & script tasks
β”‚
└── frontend
    β”œβ”€β”€ app                # Next.js App Router (Public routes, User panel, Admin panel, Seller dashboard)
    β”œβ”€β”€ assets             # Brand logos & static site graphics
    β”œβ”€β”€ components         # Shared UI controls (Navbar, Footer, OrderSummary, Charts)
    β”œβ”€β”€ lib                # Core API routing client definitions
    └── package.json       # Frontend dependencies & next tasks

πŸš€ Getting Started

Environmental Variables

Backend Configuration (/backend/.env)

Create a .env file in the /backend directory:

PORT=5000
DATABASE_URL="postgresql://username:password@host:port/database?sslmode=require"
JWT_SECRET="your_secure_jwt_secret"
CLIENT_URL="http://localhost:3000"

# Razorpay Configs (Fallback to simulation if keys are missing)
RAZORPAY_KEY_ID="rzp_test_..."
RAZORPAY_KEY_SECRET="your_secret_..."

Frontend Configuration (/frontend/.env.local)

Create a .env.local file in the /frontend directory:

NEXT_PUBLIC_BACKEND_URL="http://localhost:5000"
NEXT_PUBLIC_CURRENCY_SYMBOL="β‚Ή"
NEXT_PUBLIC_RAZORPAY_KEY_ID="rzp_test_..."

Installation & Setup

Clone Repository

git clone https://github.com/alokspacy/ReDragon-Ecommerce.git
cd ReDragon-Ecommerce

1. Set Up the Backend

  1. Navigate to the backend directory:
    cd backend
  2. Install dependencies:
    npm install
  3. Initialize the database schema and generate Prisma client:
    npx prisma db push
    npx prisma generate
  4. Run the seed script to populate default admin, products, and images:
    npx prisma db seed
  5. Start the backend development server:
    npm run dev

2. Set Up the Frontend

  1. Open a new terminal in the root directory and navigate to the frontend directory:
    cd frontend
  2. Install dependencies:
    npm install
  3. Start the Next.js development server:
    npm run dev
  4. Access the web interface at http://localhost:3000.

πŸ› οΈ Testing Admin & Seller Roles

  1. Register Admin: Register a user with email admin@redragon.com. The system automatically elevates this account to the Admin role.
  2. Submit Store Request: Go to /create-store as any regular logged-in customer and submit a store registration form.
  3. Approve Store: Log in as admin@redragon.com, navigate to the Admin Panel (/admin), and approve the store request under the Approve Stores tab.
  4. Seller Dashboard: Log back in as the store owner. You will now see the Seller Dashboard link in your account menu, allowing you to list products, manage inventory, and fulfill orders!

πŸ‘₯ Support & Contact

  • Developer/Brand: Alok Singh
  • GitHub: alokspacy

If you found this project useful, please consider giving it a star.

⭐ Star the repository to support future development.

Built with ❀️ using Next.js, Express, and PostgreSQL © 2026 ReDragon

About

A modern full-stack eCommerce platform featuring secure authentication, product management, shopping cart, order processing, and an intuitive admin dashboard for seamless online shopping.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages