# tRPC

🧙‍♀️  Move Fast and Break Nothing. End-to-end typesafe APIs made easy.

Repository: https://github.com/trpc/trpc
Canonical: https://ross.abutalabs.com/products/trpc
Homepage: https://tRPC.io
Language: TypeScript
License: MIT
License Family: permissive
Topics: typescript, api, nextjs, prisma, next, react
Last push: 2026-08-13T21:58:09+00:00
Link (homepage): https://tRPC.io
Link (site_page): https://trpc.io/docs
Link (site_page): https://trpc.io/docs/quickstart
Link (site_page): https://trpc.io/docs/community/awesome-trpc
Link (site_page): https://trpc.io/docs/client/nextjs

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 89, longevity 100
- inputs: {"age_days": 2238, "days_push": 20, "days_rel": 76, "gap_med": 7.0, "n_releases_24m": 39}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 40548, forks 1653 (observed 2026-08-28T04:12:08.253072+00:00)

## What it is
tRPC is a TypeScript library for building and consuming fully typesafe APIs without schemas or code generation, leveraging TypeScript type inference to share API contracts between client and server. It ships adapters for React, Next.js, Express, Fastify, and more, with features like subscriptions, request batching, and middleware.

## Use cases
- build end-to-end typesafe APIs in a full-stack TypeScript app
- share API types between client and server without code generation
- replace GraphQL or REST with a typesafe RPC layer
- add typesafe data fetching to a Next.js app
- add real-time subscriptions with type safety
- batch multiple API requests into one
- add an API layer to an existing brownfield TypeScript project

## When to choose
- your whole stack is TypeScript and you want API contracts checked at build time
- you want a lightweight alternative to GraphQL with no codegen or build step
- you use React/Next.js and want integrated typed data-fetching hooks
- you want subscriptions and request batching out of the box

## When to avoid
- your clients are not written in TypeScript (e.g. mobile or third-party consumers) unless you add an OpenAPI layer
- you need a language-agnostic API contract for polyglot teams
- your project cannot use strict TypeScript mode or the required TypeScript version

## Facets
- artifact type: library
- maturity: stable
- function: api-framework, rpc, http-server, http-client, middleware, websocket, type-system
- domain: web-development, backend, frontend, apis, developer-tools
- platform: browser, cross-platform
- tags: end-to-end-typesafety, full-stack-typescript, no-codegen, react, nextjs, request-batching, subscriptions, alternative-to-graphql, typescript, nodejs, web-server

## Member repositories
- trpc/trpc (main) score 95
- trpc/trpc-openapi (plugin) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:12:08.253072+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:24:03.822970+00:00, confidence not recorded.
  - readme: https://github.com/trpc/trpc (fetched 2026-08-28T04:12:08.253072+00:00, sha dd610991d30e)
  - homepage: https://tRPC.io (fetched 2026-08-29T07:47:15.452269+00:00, sha 02ba9291f1d4)
  - site_page: https://trpc.io/docs (fetched 2026-08-29T07:47:15.461804+00:00, sha 4ef001e09c15)
  - site_page: https://trpc.io/docs/quickstart (fetched 2026-08-29T07:47:15.465364+00:00, sha 9649d852ef87)
  - site_page: https://trpc.io/docs/community/awesome-trpc (fetched 2026-08-29T07:47:15.468165+00:00, sha 22db9725ae67)
  - site_page: https://trpc.io/docs/client/nextjs (fetched 2026-08-29T07:47:15.470630+00:00, sha 5b11b2ded3c8)
  - site_page: https://trpc.io/docs/v10 (fetched 2026-08-29T07:47:15.472494+00:00, sha 520a281d3724)
  - site_page: https://trpc.io/docs/v9 (fetched 2026-08-29T07:47:15.474318+00:00, sha 02820abe5a74)
  - site_page: https://trpc.io/docs/faq (fetched 2026-08-29T07:47:15.476122+00:00, sha 9badb1808bad)
- Data as of 2026-08-30T08:39:29.467469+00:00.
