Reference application

The nest-native stack, end to end.

A production-shaped multi-tenant work-tracking SaaS that puts all seven nest-native libraries under realistic backend pressure, on the official @nestjs/drizzle module for persistence and the official @nestjs/outbox module for reliable domain events, and composes them the way a real product would: feature modules, multi-tenant auth context, cross-service transactions, reliable domain events over an event backbone, deferred and scheduled jobs, a documented event catalog, a streaming AI assistant, tag-invalidated read caching, login lockout, real-database integration tests, 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 seven 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.

Every library is a chapter of one story — an org invites a teammate, the team works tasks, the events flow, a reminder fires, the contracts are published, the AI reads the feed. Every commit lands via PR with a security and dependency review, and npm run ci passes on Node 22.

The roster

Seven libraries, seven chapters.

01 @nest-native/trpc wired The typed API — task CRUD, project queries, the activity feed, typesafe end to end into the client smoke check.
02 @nest-native/kafka wired The event backbone — set KAFKA_BROKERS and the same domain code relays the official outbox through an OutboxTransport over @nest-native/kafka to a real cluster.
03 @nest-native/jobs wired Deferred work — an assignment reminder enqueued in the same transaction as its projection, plus a DB-stored cron sweep. No Redis.
04 @nest-native/asyncapi wired The event catalog — an AsyncAPI 3.0 document at /asyncapi so another team could subscribe to your streams.
05 @nest-native/ai-sdk wired AI over your data — a streaming assistant that turns a project's recent activity into a status update, token by token.
06 @nest-native/cache wired Read caching without Redis — expensive reads cached with tags; mutations evict by tag and TTL is only the backstop.
07 @nest-native/lockout wired Brute-force defense — failed logins lock an identity by email or source IP before the credential is ever checked.