Development

Boot the whole stack

The normal loop runs every service together under Docker Compose:

npm run setup       # once: install deps, generate .env, reset stale volumes
npm run docker:dev  # bring all services + their DBs and Redis up

With the default config, auth is on :8888 (admin dashboard :3333) and core on :8080.

Run a single service

You can also run one service's backend directly against a host-mode database — useful for a fast inner loop:

cd core/backend
npm run dev:rest-api      # Fastify REST API (watch mode)
npm run dev:event-queue   # BullMQ workers (if the service has an event queue)

Per-service backend scripts

ScriptWhat it does
dev:rest-apiRun the Fastify API in watch mode
dev:event-queueRun BullMQ workers (if enabled)
buildtsc build
lint / typecheckESLint (max-warnings 0) / tsc --noEmit
checklint + typecheck
test / test:coverageVitest component tests

Database (ORM) scripts

The scripts are the same names regardless of ORM; they call Drizzle Kit or Prisma under the hood depending on what the monorepo is locked to:

ScriptDrizzlePrisma
db:generatedrizzle-kit generateprisma generate
db:migratedrizzle-kit migrateprisma migrate dev
db:pushdrizzle-kit pushprisma db push
db:studiodrizzle-kit studioprisma studio

After a schema change from stackr add entity, run the printed migrate command then stackr migrations ack <service>.

Root scripts

ScriptWhat it does
setupInstall workspace deps, generate .env, reset stale volumes
docker:dev / docker:prodBring the stack up (dev / prod overlay)
test / test:e2eComponent tests / cross-service e2e tests
lint:sgRun the ast-grep convention rules
check:auth-tablesEnforce the auth-table boundary (Prisma)

Code quality & conventions

Every service ships ESLint + Prettier, and typecheck runs in strict mode. Beyond that, the context harness carries the architectural conventions — run npm run lint:sg to check them structurally, and let the PostToolUse hook catch backend violations at edit-time if you use Claude Code.