Skip to Content
👋 Hey there! Welcome to NestJS tRPC.

NestJS
tRPC
Bridge

⚡ Build type-safe APIs with ease!
Bridge NestJS and tRPC for
Type-Safe

TypeScript API development with NestJS, tRPC, and Zod

Tech Stack

Features

Bridge NestJS and tRPC for type-safe, scalable API development.

Automatic Schema Generation

Generate tRPC schema files automatically from NestJS decorators (tRPC v11). No more manual schema definitions.

End-to-End Type Safety

Build fully type-safe APIs with NestJS as your backend framework while getting tRPC's complete type safety.

NestJS Decorators

Use familiar decorator patterns for defining tRPC routers, queries, mutations, subscriptions, and middleware.

Real-time Subscriptions

Built-in WebSocket support for real-time subscriptions with automatic connection management.

Multiple Drivers

Support for Express and Fastify adapters, allowing you to choose your preferred HTTP framework.

Zod Integration

Seamlessly integrated with Zod for robust input validation and schema generation.

Watch Mode Development

Live schema regeneration during development - automatically updates your frontend types when you change decorators.

Dependency Injection

Leverage NestJS's powerful dependency injection system while maintaining tRPC's type safety guarantees.

Middleware Support

Apply authentication, logging, and other middleware to tRPC procedures using NestJS patterns.

Frequently Asked Questions