Skip to content

Local development

Prereqs: Node LTS, pnpm, Docker.

Terminal window
pnpm install
docker compose -f infra/docker/compose.yaml up -d --wait # Postgres · Valkey · MinIO · Mailpit
pnpm db:migrate
pnpm dev # api + web + worker via turbo
Terminal window
pnpm lint && pnpm typecheck && pnpm test
pnpm test:integration # needs the compose stack
pnpm --filter @scopekite/web e2e # builds served by next start — run pnpm build first
pnpm build && pnpm check:api

Port conflicts: if another Postgres owns 5432, run the compose file with an override mapping ScopeKite’s Postgres elsewhere and point DATABASE_URL / TEST_DATABASE_URL / E2E_DATABASE_URL at it — the test harnesses read all three.

Test suites never share the development database:

  • Integration tests create a disposable scopekite_test_<timestamp> per run.
  • E2E uses a dedicated scopekite_e2e, dropped and recreated by pnpm --filter @scopekite/db provision:e2e (which pnpm --filter @scopekite/web e2e runs for you) so every run starts from an empty schema.

Setting E2E_DATABASE_URL explicitly opts out of the recreate: that database is migrated but never dropped, because it is not one this repository owns.

Full details: README and TEST_STRATEGY.