tRPC is a framework for building strongly typed RPC APIs with TypeScript. Alternatively, you can think of it as a way to avoid APIs altogether.
- 🧙♂️ Automatic type-safety & autocompletion inferred from your API-paths, their input data, outputs, & errors.
- 🐎 Snappy DX. No code generation, run-time bloat, or build pipeline.
- 🍃 Light. tRPC has zero deps and a tiny client-side footprint.
- 🐻 Easy to add to your existing brownfield project.
- 🔋 Batteries included. React-library + Next.js/Express adapters. (But tRPC is not tied to React - reach out if you want to make a Svelte/Vue/... lib)
- 🥃 Simple to use APIs for queries & mutations + experimental subscriptions support.
- 👀 Quite a few examples in the ./examples-folder
- ✅ Well-tested & running in production.
- tRPC requires TypeScript > 4.1 because of Template Literal Types, but you can get some benefits with autocompletion etc even if you use raw JS.