Backend Core Kit
February 14, 2026 ยท View on GitHub
Production-ready backend boilerplate with opinionated defaults (NestJS + Fastify, Postgres/Prisma, Redis/BullMQ, OpenTelemetry, OpenAPI contract gates).
Documentation is in docs/README.md (source of truth).
What you get
- Two-process baseline: API (
apps/api) + worker (apps/worker) - API contract discipline:
- success envelope
{ data, meta? } - errors are RFC7807 (
application/problem+json) with stablecode+traceId - generated OpenAPI snapshot committed at
docs/openapi/openapi.yamland linted by Spectral
- success envelope
- Auth + sessions (password + OIDC), RBAC, idempotency keys, email infra, admin control-plane + audits
Quickstart (local)
- Prereqs:
- Node
>=22 <23 - Docker (for local deps and e2e)
- Node
cp env.example .envnpm run deps:up(Postgres + Redis via Docker Compose)npm installnpm run prisma:migrate && npm run prisma:generatenpm run start:dev(API onhttp://127.0.0.1:4000, Swagger UI at/docsin dev)npm run start:worker:dev(worker onhttp://127.0.0.1:4001)npm run verify(format/lint/typecheck/boundaries/tests/openapi gates)- Optional:
npm run verify:e2e(brings up local deps and runs e2e)
WSL note (repo on Windows mount)
If this repo lives on a Windows filesystem mount (e.g. /mnt/c/...), prefer running commands via the wrappers:
bash tools/agent/npmw ...(runs npm on Windows to avoid OS-specific artifacts)bash tools/agent/dockw ...
Avoid running npm install/ci in WSL for this repo.
Pointers
- Docs index:
docs/README.md - Engineering notes (integration contracts):
docs/engineering/README.md
Using this as a template
Checklist:
- Follow
docs/guide/personalizing-a-project.mdand createdocs/core/project-profile.md - Update
package.jsonname/description/versioning as needed - Set
OTEL_SERVICE_NAME(andOTEL_EXPORTER_OTLP_ENDPOINTin staging/prod) - Review
docs/README.md+docs/standards/README.mdfor the non-negotiables - Keep
env.examplein sync; never commit.env