Reference application

The nest-native stack, end to end.

A production-shaped reference application that demonstrates how nest-drizzle-native and nest-trpc-native compose under realistic backend pressure: feature modules, multi-tenant auth context, cross-service transactions, real-database integration tests, an outbox-pattern worker for post-commit side effects, and a typed tRPC client smoke check.

API NestJS 11.x
RPC tRPC 11.x
ORM Drizzle 0.45.x
DB better-sqlite3
Transactions @Transactional()
Side effects outbox + worker

What it is

Serves the libraries.

The reference app exists to demonstrate the two libraries this organization publishes — not to become a product of its own. Two implicit deliverables:

  • A credible demo a team could adapt for a real backend.
  • A feedback loop on the libraries themselves — if a pattern feels awkward here, that's signal to add API upstream.

All eight milestones from the implementation brief are complete. Every commit landed via PR with a security and dependency review. npm run ci passes on Node 20 and Node 22.

Status

Eight milestones, eight PRs, one tag.

01 Bootstrap done Repo skeleton, governance, CI on Node 20+22, Nest scaffold, Drizzle and tRPC wired.
02 Database wired done Drizzle with better-sqlite3, ephemeral local DB, smoke test exercising the connection.
03 Schema + seed done Six tables, drizzle-kit migrations, idempotent seed (one org, one admin, one starter project).
04 Auth + request context done scrypt passwords, real HS256 JWT, AuthGuard, request-scoped CURRENT_USER / CURRENT_ORGANIZATION.
05 Core modules done organizations, users, projects — repositories + services + tRPC routers, scoped by current org.
06 Transactional workflow done inviteUser writes 5 rows in one @Transactional. Happy-path, rollback-safety, worker-crash-recovery tests.
07 Outbox worker done Long-running OutboxClaimer poller with graceful shutdown over SIGTERM/SIGINT.
08 Polish done Typed client-smoke (AppRouter), Dockerfile + docker-compose, this site, finalized README.