Documentation

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.

On this page

What is SaleX?

SaleX is a marketplace, not just a shop. Three kinds of people use it:

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

LayerTechnologyWhat it means for you
Web frameworkNext.js 16 (App Router), React 19, TypeScriptOne application serves both the storefront and the admin/vendor panels.
DatabasePostgreSQL via Prisma ORMYou need a PostgreSQL database (local or hosted, e.g. Supabase).
StylingTailwind CSSVisual customization is done with utility classes; no separate CSS build.
AuthenticationNextAuth (credentials) + bcrypt password hashingEmail + password sign-in out of the box.
PaymentsStripe 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).
EmailSMTP via NodemailerConfigure an SMTP account to send order and account emails.
ImagesSharp processing; files stored on the server (with an optional external-URL mode)Product images upload through the admin/vendor panels.
TestingVitest (unit) and Playwright (browser)Used by developers; not needed for daily operation.

Feature areas

The storefront includes:

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, dependencies
Customization tip Storefront text, colors, and layout live under src/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.