Local development
Prerequisites
- Node 20.x (use
nvmormise) - pnpm 9.x —
npm i -g pnpm - PostgreSQL 14+ — local install or Docker
- Redis 7+ — local install or Docker
- Git with submodule support
Clone
git clone --recurse-submodules https://github.com/duabalabs/duaba.git
cd duabaIf you already cloned without submodules:
git submodule update --init --recursiveInstall dependencies
pnpm installThis installs every workspace, including apps/sellub/*.
Start the database
Easiest path — Docker:
cd apps/sellub
docker compose -f docker-compose.dev.yml up -dThis brings up Postgres on 5432 and Redis on 6379.
Configure env
cd apps/sellub/sellub-server
cp .env.example .envSet:
DB_*— Postgres connectionREDIS_*— Redis connectionSUPERADMIN_USERNAME/SUPERADMIN_PASSWORD— initial credentialsPAYSTACK_PUBLIC_KEY/PAYSTACK_SECRET_KEY— sandbox keys for testingCOOKIE_SECRET— random string
Run the server
cd apps/sellub/sellub-server
pnpm dev # GraphQL on http://localhost:3000
pnpm dev:worker # job queue (separate terminal)Run the dashboard
cd apps/sellub/sellub-dashboard
pnpm dev # http://localhost:3002Sign in with the SuperAdmin credentials from your .env.
Run a storefront
cd apps/sellub/sellub-storefront
pnpm dev # http://localhost:3001Run the docs site
cd apps/sellub-docs
pnpm install
pnpm dev # http://localhost:3110Useful scripts
| Command | What it does |
|---|---|
pnpm sync-admins | Sync admins.json to the DB |
pnpm migration:run | Run pending TypeORM migrations |
pnpm migration:generate -- -n MyChange | Generate a new migration |
pnpm seed | Load demo data (dev only) |
pnpm test | Unit tests |
pnpm test:e2e | E2E tests (spins up in-memory server) |