Reference application

The nest-native stack, end to end.

A production-shaped multi-tenant work-tracking SaaS that puts all nine nest-native libraries under realistic backend pressure 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 nine 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

Nine libraries, nine chapters.

01 @nest-native/drizzle wired Persistence — orgs, users, projects, tasks, activity. Repositories, transactions, multi-tenant scoping.
02 @nest-native/trpc wired The typed API — task CRUD, project queries, the activity feed, typesafe end to end into the client smoke check.
03 @nest-native/messaging wired Reliable domain events — a transactional outbox (emit in-tx) plus an idempotent inbox (dedup on consume).
04 @nest-native/kafka wired The event backbone — set KAFKA_BROKERS and the same domain code relays through KafkaOutboxTransport to a real cluster.
05 @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.
06 @nest-native/asyncapi wired The event catalog — an AsyncAPI 3.0 document at /asyncapi so another team could subscribe to your streams.
07 @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.
08 @nest-native/cache wired Read caching without Redis — expensive reads cached with tags; mutations evict by tag and TTL is only the backstop.
09 @nest-native/lockout wired Brute-force defense — failed logins lock an identity by email or source IP before the credential is ever checked.