# trpc/trpc

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/trpc-trpc).**

39,569 stars · 1,490 forks · TypeScript · mit

## Links

- GitHub: https://github.com/trpc/trpc
- Homepage: https://tRPC.io
- awesome-repositories: https://awesome-repositories.com/repository/trpc-trpc.md

## Topics

`api` `next` `nextjs` `prisma` `react` `typescript`

## Description

This project is an end-to-end type-safe API framework designed to synchronize data structures between frontend and backend codebases without the need for manual code generation. By leveraging TypeScript’s type inference, it allows developers to invoke server-side functions directly from the client as if they were local methods. This remote procedure call approach abstracts away the complexities of HTTP verbs and URL structures, streamlining the full-stack development workflow into a unified experience.

The framework distinguishes itself through a modular router architecture that organizes backend logic into hierarchical, composable structures. It incorporates a schema-driven validation layer that enforces strict data integrity on incoming request payloads before they reach core application logic. Furthermore, the system utilizes a runtime-agnostic adapter layer, ensuring that backend logic remains portable across traditional servers, serverless functions, and edge computing environments without requiring modifications.

Beyond its core communication capabilities, the project provides a middleware-based request pipeline for handling cross-cutting concerns like authentication and logging. It includes native integrations for common frontend state management and routing patterns, enabling developers to fetch remote data and manage application state with full type safety. The library also supports AI-assisted development by allowing developers to link its capabilities and documentation directly into AI agents for context-aware implementation guidance.

## Tags

### Networking & Communication

- [Remote Procedure Calls](https://awesome-repositories.com/f/networking-communication/remote-procedure-calls.md) — Allows developers to invoke server-side functions directly from client-side code as if they were local methods.
- [Remote Procedure Execution](https://awesome-repositories.com/f/networking-communication/remote-procedure-execution.md) — Calls server-side functions from a client as if they were local, hiding complex HTTP implementation details. ([source](https://trpc.io/docs/concepts))
- [Type-Safe Communication](https://awesome-repositories.com/f/networking-communication/type-safe-communication.md) — Synchronizes data structures between frontend and backend automatically without manual code generation.
- [API Gateways](https://awesome-repositories.com/f/networking-communication/api-gateways.md) — Connects router logic to web servers to make functionality accessible over standard network protocols. ([source](https://trpc.io/docs/quickstart))

### Web Development

- [API Frameworks](https://awesome-repositories.com/f/web-development/api-frameworks.md) — Provides a complete framework for building end-to-end type-safe APIs.
- [API Routers](https://awesome-repositories.com/f/web-development/api-routers.md) — Organize backend logic into modular structures that group related procedures together for easier maintenance and better code reuse across the application. ([source](https://trpc.io/docs/quickstart))
- [Type-Safe Clients](https://awesome-repositories.com/f/web-development/type-safe-clients.md) — Ensures frontend requests automatically match expected server data structures through shared type definitions. ([source](https://trpc.io/docs/quickstart))
- [Full-Stack Frameworks](https://awesome-repositories.com/f/web-development/full-stack-frameworks.md) — Streamlines full-stack development by treating remote server functions as local methods.
- [Type-Safe API Clients](https://awesome-repositories.com/f/web-development/type-safe-api-clients.md) — Creates a type-safe API client by importing server router definitions and configuring network links. ([source](https://trpc.io/docs/client/vanilla/setup))
- [Mutation Procedures](https://awesome-repositories.com/f/web-development/mutation-procedures.md) — Creates server-side operations that modify data or trigger side effects by processing incoming requests. ([source](https://trpc.io/docs/quickstart))
- [Next.js App Router Integrations](https://awesome-repositories.com/f/web-development/next-js-app-router-integrations.md) — Connects server-side routing to prefetch data, stream responses, and handle loading states using standard component boundaries. ([source](https://trpc.io/docs/client/nextjs))
- [Query Procedures](https://awesome-repositories.com/f/web-development/query-procedures.md) — Fetches data from the server using read-only operations that retrieve information without changing the underlying state. ([source](https://trpc.io/docs/quickstart))
- [Remote Data Fetching Hooks](https://awesome-repositories.com/f/web-development/remote-data-fetching-hooks.md) — Executes type-safe queries and mutations to integrate directly with standard data-fetching hooks. ([source](https://trpc.io/docs/client/tanstack-react-query/setup))
- [State Management Providers](https://awesome-repositories.com/f/web-development/state-management-providers.md) — Creates a type-safe provider to manage API state and caching for complex full-stack application architectures. ([source](https://trpc.io/docs/client/tanstack-react-query/setup))
- [Next.js Pages Router Integrations](https://awesome-repositories.com/f/web-development/next-js-pages-router-integrations.md) — Connects server-side rendering and static site generation to an application by wrapping components with necessary providers. ([source](https://trpc.io/docs/client/nextjs))

### Programming Languages & Runtimes

- [Type Inference Systems](https://awesome-repositories.com/f/programming-languages-runtimes/type-inference-systems.md) — Uses the language compiler to extract and share backend function signatures with the frontend without requiring manual code generation.
- [Runtime Adapters](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-adapters.md) — Provides a compatibility interface allowing backend logic to execute across diverse runtime environments.

### Security & Cryptography

- [Input Validation Schemas](https://awesome-repositories.com/f/security-cryptography/input-validation-schemas.md) — Enforces data integrity on incoming request payloads by applying defined validation rules before execution reaches the core procedure logic.
- [Data Integrity Layers](https://awesome-repositories.com/f/security-cryptography/data-integrity-layers.md) — Enforces strict input rules on incoming request payloads before they reach core application logic.
- [Input Validation](https://awesome-repositories.com/f/security-cryptography/input-validation.md) — Enforces data integrity by checking incoming request payloads against defined rules before processing. ([source](https://trpc.io/docs/quickstart))
- [Schema Validation](https://awesome-repositories.com/f/security-cryptography/schema-validation.md) — Enforces strict data integrity on incoming request payloads to ensure valid information reaches core logic.

### Software Engineering & Architecture

- [Router Architectures](https://awesome-repositories.com/f/software-engineering-architecture/router-architectures.md) — Organizes API endpoints into hierarchical, nested structures that allow for granular control and reusable logic.
- [Middleware Pipelines](https://awesome-repositories.com/f/software-engineering-architecture/middleware-pipelines.md) — Processes incoming requests through a chain of composable functions that handle authentication, logging, and data transformation.
- [Modular Architectures](https://awesome-repositories.com/f/software-engineering-architecture/modular-architectures.md) — Uses a hierarchical organization pattern to group related API endpoints for improved maintenance.

### DevOps & Infrastructure

- [Serverless Adapters](https://awesome-repositories.com/f/devops-infrastructure/serverless-adapters.md) — Enables backend logic to run portably across traditional servers, serverless functions, and edge environments.
- [Deployment Adapters](https://awesome-repositories.com/f/devops-infrastructure/deployment-adapters.md) — Decouples core application logic from specific network environments to enable deployment across traditional servers, serverless functions, and edge runtimes.
