Multi-Vendor E-Commerce Marketplace
Dynamic Cart Syncing β’ PostgreSQL & Prisma β’ Multi-Vendor Management β’ Razorpay Integration
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.
| 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. |
ββββββββββββββββββββββββββββββββββββββββ
β Web Frontend β
β Next.js 15 / Redux RTK β
ββββββββββββββββββββ¬ββββββββββββββββββββ
β HTTP / API Requests
βΌ
ββββββββββββββββββββββββββββββββββββββββ
β Node.js Backend β
β Express Server / JWT β
ββββββββββββββββββββ¬ββββββββββββββββββββ
β_________β΄_________β
βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ
β PostgreSQL β β Razorpay β
β Prisma Client β β Payment Gateway β
βββββββββββββββββββ βββββββββββββββββββ
- 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
- 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
- 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
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_..."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_..."git clone https://github.com/alokspacy/ReDragon-Ecommerce.git
cd ReDragon-Ecommerce- Navigate to the backend directory:
cd backend - Install dependencies:
npm install
- Initialize the database schema and generate Prisma client:
npx prisma db push npx prisma generate
- Run the seed script to populate default admin, products, and images:
npx prisma db seed
- Start the backend development server:
npm run dev
- Open a new terminal in the root directory and navigate to the frontend directory:
cd frontend - Install dependencies:
npm install
- Start the Next.js development server:
npm run dev
- Access the web interface at
http://localhost:3000.
- Register Admin: Register a user with email
admin@redragon.com. The system automatically elevates this account to the Admin role. - Submit Store Request: Go to
/create-storeas any regular logged-in customer and submit a store registration form. - Approve Store: Log in as
admin@redragon.com, navigate to the Admin Panel (/admin), and approve the store request under the Approve Stores tab. - 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!
- 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