Project Overview
SaleX is a full-featured, multi-vendor e-commerce platform: one storefront where many independent sellers list products, and one admin panel where you control the whole marketplace.
What is SaleX?
SaleX is a marketplace, not just a shop. Three kinds of people use it:
- You (the administrator) β control the whole platform from
/admin: settings, products, vendors, orders, payments, shipping, and reports. - Vendors β sellers who register, get approved by you, and manage their own products and orders from
/vendor. - Customers β shoppers who browse the storefront, add items from one or many vendors to a cart, and check out in a single order that is automatically split per vendor for fulfillment.
One checkout can contain products from several vendors. SaleX creates one customer order with separate per-vendor sub-orders and shipments, and each vendor's shipping charge is calculated separately.
Technology at a glance
| Layer | Technology | What it means for you |
|---|---|---|
| Web framework | Next.js 16 (App Router), React 19, TypeScript | One application serves both the storefront and the admin/vendor panels. |
| Database | PostgreSQL via Prisma ORM | You need a PostgreSQL database (local or hosted, e.g. Supabase). |
| Styling | Tailwind CSS | Visual customization is done with utility classes; no separate CSS build. |
| Authentication | NextAuth (credentials) + bcrypt password hashing | Email + password sign-in out of the box. |
| Payments | Stripe plus configurable gateway providers (PayPal, bKash, Nagad, SSLCOMMERZ, Razorpay, cash on delivery) | Each gateway needs its own merchant credentials before it works (see Payments & Shipping). |
| SMTP via Nodemailer | Configure an SMTP account to send order and account emails. | |
| Images | Sharp processing; files stored on the server (with an optional external-URL mode) | Product images upload through the admin/vendor panels. |
| Testing | Vitest (unit) and Playwright (browser) | Used by developers; not needed for daily operation. |
Feature areas
The storefront includes:
- Product catalog with categories, brands, collections, search, filters, and product comparisons
- Flash deals with countdown timers and per-customer limits
- Auctions with real-time bidding rules, minimum increments, and public bid history
- Pre-orders (presales) with release dates and reservation limits
- Live selling sessions with in-stream product panels
- Vertical βshortsβ product videos and a Discover hub
- Classifieds marketplace (βlocal dealsβ) with categories and seller inquiries
- Coupons, promotions, loyalty points, wallet, affiliates, and B2B features
- Point-of-sale (POS) interface for in-person sales
- Customer accounts: orders, tracking, wishlists, addresses, reviews
The admin panel adds dashboards, analytics, vendor approval, RBAC role management, CMS pages, banners, taxes, currencies, shipping configuration, and more. See Features & Limitations for the verified status of every feature.
How the code is organized
You normally only touch a few of these folders, but it helps to know the map:
salex/
βββ prisma/ Database schema + migration files
βββ public/ Static files served as-is
βββ src/app/ Every page and API route (Next.js App Router)
βββ src/components/ Reusable UI pieces
βββ src/modules/ Business logic, one folder per feature (~77 modules)
βββ src/lib/ Shared utilities (currency formatting, CSRF, β¦)
βββ src/generated/ Prisma-generated database client (do not edit)
βββ docs/ Developer documentation + this buyer documentation
βββ storage/ Uploaded media (local storage mode)
βββ package.json Project name, scripts, dependenciessrc/app and src/components. Feature behavior (for example shipping rules) lives in the matching folder under src/modules. After editing code, restart the dev server to see changes β most pages update instantly, but configuration files need a restart.