Quick Start
import { Steps, Code } from ‘@astrojs/starlight/components’;
Quick Start
Section titled “Quick Start”Prerequisites
Section titled “Prerequisites”- Node.js 22 LTS —
node --versionmust showv22.x.x - npm 10+ — included with Node.js 22
- Git
No Docker required for local development. ecommus uses pglite — an in-process PostgreSQL-compatible database.
Installation
Section titled “Installation”-
Clone the repository
Terminal window git clone https://github.com/MDLABS-cmd/ecommus.gitcd ecommus -
Install all dependencies
Terminal window npm installThis installs all workspace packages:
packages/*,apps/*,plugins/*. -
Configure environment
Terminal window cp .env.example .envThe defaults work for local development. Set the two JWT signing secrets (each 32+ random chars):
.env JWT_ACCESS_SECRET=your-access-secret-32-chars-minJWT_REFRESH_SECRET=your-refresh-secret-32-chars-minDATABASE_MODE=pgliteIn production, the API refuses to boot if either secret is missing or starts with
dev-. See Environment Variables for the full list. -
Start the dev servers
Terminal window node scripts/dev.mjsThis starts all four servers concurrently:
Server URL Description API http://localhost:4000 Fastify REST API Admin http://localhost:3001 Next.js Admin Panel Super-admin http://localhost:3002 Next.js Operator Console Storefront http://localhost:3000 Astro Storefront -
Seed the database (optional)
Terminal window node --experimental-strip-types scripts/seed.tsCreates a demo tenant, admin user, and sample products.
-
Open the admin panel
Navigate to http://localhost:3001 and log in with the seeded credentials:
- Email:
admin@demo.local - Password:
admin123
- Email:
Project Structure
Section titled “Project Structure”ecommus/├── apps/│ ├── api/ # Fastify REST API│ ├── admin/ # Next.js 15 admin panel│ ├── super-admin/ # Next.js 15 operator console│ └── storefront-astro/ # Astro 5 public storefront├── packages/│ ├── core/ # Business logic (pricing, tax, events)│ ├── db/ # Drizzle schema + migrations│ ├── client/ # @ecommus/client — JavaScript SDK│ ├── plugin-sdk/ # @ecommus/plugin-sdk — plugin framework│ └── testing/ # @ecommus/testing — mock factories├── plugins/ # Plugin packages (auto-discovered)├── themes/ # Theme packages (auto-discovered)└── scripts/ # Dev utilitiesNext Steps
Section titled “Next Steps”- Environment Variables — full configuration reference
- Architecture Overview — understand the layers
- Create your first plugin — extend ecommus