SellubDevelopersLocal development

Local development

Prerequisites

  • Node 20.x (use nvm or mise)
  • 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 duaba

If you already cloned without submodules:

git submodule update --init --recursive

Install dependencies

pnpm install

This installs every workspace, including apps/sellub/*.

Start the database

Easiest path — Docker:

cd apps/sellub
docker compose -f docker-compose.dev.yml up -d

This brings up Postgres on 5432 and Redis on 6379.

Configure env

cd apps/sellub/sellub-server
cp .env.example .env

Set:

  • DB_* — Postgres connection
  • REDIS_* — Redis connection
  • SUPERADMIN_USERNAME / SUPERADMIN_PASSWORD — initial credentials
  • PAYSTACK_PUBLIC_KEY / PAYSTACK_SECRET_KEY — sandbox keys for testing
  • COOKIE_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:3002

Sign in with the SuperAdmin credentials from your .env.

Run a storefront

cd apps/sellub/sellub-storefront
pnpm dev          # http://localhost:3001

Run the docs site

cd apps/sellub-docs
pnpm install
pnpm dev          # http://localhost:3110

Useful scripts

CommandWhat it does
pnpm sync-adminsSync admins.json to the DB
pnpm migration:runRun pending TypeORM migrations
pnpm migration:generate -- -n MyChangeGenerate a new migration
pnpm seedLoad demo data (dev only)
pnpm testUnit tests
pnpm test:e2eE2E tests (spins up in-memory server)