tRPC Server

Build end-to-end typesafe APIs in TypeScript with no schemas, no code generation, and zero runtime bloat.

Framework
npm
v11.18.0
40,525stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
78/100Good
Development Activity72
Maintenance76
Community64
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
91/100Excellent
Architecture90
Code Quality90
Innovation95
Learning Curve80

tRPC Server is the backend half of tRPC, a framework for building fully typesafe APIs in TypeScript. You define routers of procedures on the server, and their input and output types flow directly to the client through TypeScript inference alone, with no schemas, code generation, or build step in between.

It ships with adapters for Next.js, Express, Fastify, AWS Lambda, the Fetch API, standalone Node HTTP, and WebSockets, plus first-class support for input validation, middleware, context, data transformers, request batching, and subscriptions. The package has zero runtime dependencies and works with any validation library.

What You Get

  • A router and procedure API for defining queries, mutations, and subscriptions on the server
  • Adapters for Next.js, Express, Fastify, AWS Lambda, Fetch, standalone Node HTTP, and WebSockets
  • Composable middleware, request context, and pluggable data transformers
  • Input and output validation that works with Zod, Valibot, or any compatible parser
  • Automatic request batching and end-to-end type inference with zero runtime dependencies

Common Use Cases

  • Powering the API layer of a full-stack Next.js or React application
  • Adding a typesafe backend to an existing Node.js server with Express or Fastify
  • Building realtime features with typed WebSocket subscriptions
  • Deploying serverless API endpoints on AWS Lambda or edge runtimes via the Fetch adapter

Under The Hood

Architecture The core lives in packages/server/src/unstable-core-do-not-import/, where initTRPC.ts builds a runtime config that produces the router, procedure, and middleware factories via procedureBuilder.ts, router.ts, and middleware.ts. Procedures are plain objects describing input/output parsers and a resolver; routers compose them into a nested tree that the HTTP layer (http/) resolves per request. Framework-specific entry points in adapters/ (Next.js, Express, Fastify, AWS Lambda, Fetch, node-http, standalone, ws) adapt each host’s request/response model onto the shared core resolver, while type inference flows from the server’s router type to the client with no serialized schema.

Tech Stack The library is written entirely in TypeScript (84% of the repo), built with tsdown and organized as a pnpm + Turborepo + Lerna monorepo alongside the client, react-query, next, and openapi packages. It publishes dual ESM/CJS output with separate type declarations per entry point and ships zero production dependencies, relying only on the consumer’s chosen validation library.

Code Quality Testing is thorough: the monorepo contains over 100 .test.ts files, with core units like procedureBuilder.test.ts, router.test.ts, and initTRPC.test.ts colocated next to their sources and covered by Vitest with Codecov reporting. The codebase leans heavily on advanced TypeScript generics and inference helpers (types.ts, utils.ts), enforced with ESLint and Prettier.

API Design The public API is the project’s defining strength: a single initTRPC entry point yields a fluent, chainable builder for procedures and middleware, so getting started requires minimal boilerplate. Documentation on trpc.io is extensive, the repo ships dozens of runnable examples across runtimes, and naming (query, mutation, subscription, input, use) maps cleanly to intuitive concepts.

Used by 35 apps in this directory

TypeScript
76%
AGPL 3.0

Abby

Developer Tools · Product Management

167

Statically typed feature flags, remote config, and A/B testing with framework-native SDKs for TypeScript teams.

View details
30
Repo Health
70
Technical
63
Dependency
Built with
TypeScript76%
MDX18%
Updated 1 years ago
TypeScript
84%
MIT

Amical

Note Taking · AI Assistants

1,495

Local-first AI dictation that understands your active app — private, offline, and built for speed.

View details
79
Repo Health
82
Technical
67
Dependency
Built with
TypeScript84%
Updated 3 weeks ago
TypeScript
92%
GPL 3.0

Blinko

Knowledge Management · Note Taking

10,880

A self-hosted, AI-powered card note-taking tool that lets you capture fleeting thoughts instantly and retrieve them with natural language search.

View details
83
Repo Health
69
Technical
65
Dependency
Built with
TypeScript92%
Updated 2 weeks ago
Rust
67%
MIT

Bun

Developer Tools

95,452

An all-in-one JavaScript and TypeScript toolkit — one Rust-and-JavaScriptCore binary that replaces Node.js, npm, a bundler, and a test runner with faster equivalents.

View details
92
Repo Health
91
Technical
66
Dependency
Built with
Rust67%
C++19%
Updated today
TypeScript
96%
Other

Cal.diy

Scheduling

47,796

The 100% MIT-licensed, community-driven scheduling platform — self-host your own booking infrastructure with no enterprise strings attached.

View details
93
Repo Health
86
Technical
66
Dependency
Built with
TypeScript96%
Updated 1 weeks ago
TypeScript
92%
AGPL 3.0

Documenso

Digital Signiture

14,603

Self-hosted, open-source DocuSign alternative with legally binding PDF signatures, multi-party workflows, and a full REST and tRPC API.

View details
93
Repo Health
79
Technical
72
Dependency
Built with
TypeScript92%
Updated today
TypeScript
99%
Other

Dokploy

Devops · Hosting Control Panel · Security

36,702

Self-hosted PaaS that deploys apps and databases on your own VPS using Docker, Traefik, and multi-build-system orchestration

View details
89
Repo Health
76
Technical
65
Dependency
Built with
TypeScript99%
Updated yesterday
MDX
50%
Apache 2.0

Formizee

Forms Surveys

183

An open-source form backend and builder platform — design forms, collect submissions, and get analytics without hosting your own server, positioned as an alternative to Formspree and Typeform.

View details
28
Repo Health
59
Technical
68
Dependency
Built with
MDX50%
TypeScript49%
Updated 1 years ago
TypeScript
71%
Other

highlight.io

Developer Tools · Analytics · Monitoring

9,367

Open-source full-stack monitoring that unifies session replay, error tracking, logging, and distributed tracing so you can stop context-switching between tools.

View details
69
Repo Health
78
Technical
66
Dependency
Built with
TypeScript71%
Go16%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search