Skip to content
TelegramWhatsApp

Dictionary

tRPC

tRPC is an end-to-end typesafe API framework for TypeScript that enables the frontend to call backend functions directly with full type inference, without generating API clients or writing schema definitions. When a backend procedure changes its input or output types, the frontend immediately sees type errors in the IDE without running any code generation step.

This works because tRPC shares TypeScript types between client and server at build time rather than relying on runtime contracts like REST endpoints or GraphQL schemas. The client infers procedure types directly from the server router definition. Built-in support covers queries, mutations, and subscriptions. For full-stack TypeScript applications, particularly those using Next.js where frontend and backend share a repository, tRPC eliminates an entire category of bugs related to API contract mismatches and significantly reduces the overhead of adding and modifying endpoints.