Sample 00: Showcase

June 13, 2026 ยท View on GitHub

@nest-native/trpc full production-style sample demonstrating end-to-end NestJS integration.

What It Demonstrates

FeatureFile(s)
Aliased sub-routerscats.router.ts, users.router.ts
Flat root procedureshealth.router.ts
Query/mutation/subscription procedurescats.router.ts, users.router.ts, health.router.ts
Async module configuration (forRootAsync)app.module.ts
Zod input/output schemascats.schema.ts, users.schema.ts, health.schema.ts
Auto-generated typed AppRouterapp.module.ts + generate-types.ts
Type-safe query/mutation clientclient.ts
Type-safe subscription clientsubscription-client.ts
Compile-time client typecheckclient.typecheck.ts + typecheck:client
Nest guards/interceptors/pipesauth.guard.ts, logging.interceptor.ts, trim.pipe.ts
Class-validator DTO validationusers.router.ts, users/create-user.dto.ts
Exception filter remappingremap-bad-request.filter.ts, users.router.ts
Request-scoped DI with REQUEST injectionusers/request-meta.service.ts, users.router.ts
Decorator param extraction@Input() and @TrpcContext()
Express and Fastify entrypointsmain.ts, main-fastify.ts

Run

npm run start
npm run client
npm run client:subscription
npm run start:fastify

CI-Oriented Checks

npm run typecheck:client
npm run smoke:express
npm run smoke:fastify

For the full reviewer checklist across package tests, docs, showcase, and focused samples, see website/docs/samples/how-to-review.md.