Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
N

nestjs-trpc

> 后端框架
Open source

Providing native support for decorators and implement an opinionated approach that aligns with NestJS conventions.

339 stars0 likes3 views
WebsiteGitHub

About

Providing native support for decorators and implement an opinionated approach that aligns with NestJS conventions.

Introduction

NestJS tRPC is a library designed to integrate the capabilities of tRPC into the NestJS framework. It aims to provide native support for decorators and implement an opinionated approach that aligns with NestJS conventions.

Features

  • Fast Rust-based CLI for type generation with rich error messages
  • Full static typesafety & autocompletion on the client, for inputs, outputs, and errors
  • Implements the NestJS opinionated approach to how tRPC works
  • Watch mode for auto-regeneration during development
  • Out of the box support for Dependency Injection within the routes and procedures
  • Native support for express, fastify, and zod with more drivers to come
  • Examples are available in the ./examples folder

Quickstart

Installation

To install NestJS tRPC with your preferred package manager, you can use any of the following commands:

bash
# bun
bun add nestjs-trpc zod @trpc/server

# npm
npm install nestjs-trpc zod @trpc/server

# pnpm
pnpm add nestjs-trpc zod @trpc/server

# yarn
yarn add nestjs-trpc zod @trpc/server

Generate Types

Run the CLI to generate your AppRouter types:

bash
# Generate types (one-time)
npx nestjs-trpc generate

# Watch mode for development
npx nestjs-trpc watch

How to use

Here's a brief example demonstrating how to use the decorators available in NestJS tRPC:

…

** See full documentation on NestJS-tRPC.io. **

All contributors

NestJS tRPC is developed by Kevin Edry, which taken a huge inspiration from both NestJS and tRPC inner workings.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustapiexpressnestjstrpc

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架