ts-rest/ts-rest
RPC-like client, contract, and server implementation for a pure REST API observed · 2026-08-28
Health v2 · maintenance only
64/100
- Activity 66
- Release rhythm 40
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 11.0
- age_days: 1502
- days_rel: 547
- days_push: 208
- n_releases_24m: 3
Adoption not part of the score
3334 stars · 178 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
ts-rest is a TypeScript library for defining a shared API contract that both client and server consume, providing end-to-end type safety for REST APIs without code generation. It supports Zod and other Standard Schema validation libraries, optional OpenAPI generation, and integrations with NestJS, Next.js, Express, Fastify, and React Query.
Use cases
- add end-to-end type safety to a REST API between frontend and backend
- share an API contract between client and server in a monorepo
- generate OpenAPI specs from a typed API definition
- build a type-safe API client without code generation
- validate request and response bodies at runtime with Zod
- replace tRPC when a REST API or separate contract package is needed
- integrate typed API calls with React Query
When to choose
- you want tRPC-like type safety but must keep a plain REST/HTTP API
- you need a separately publishable API contract shared across teams or packages
- you use NestJS, Next.js, Express, or Fastify and want typed routers
- you want OpenAPI documentation generated from your contract
- you want incremental adoption of type safety in an existing codebase
When to avoid
- your client and server live in a single Next.js or Express app where tRPC is simpler
- your API consumers are third parties who cannot use TypeScript
- you need a non-REST protocol like gRPC or GraphQL
- your stack is not TypeScript
Facets
library · maturity active
rpc http-client http-server api-framework middleware routing serialization api-documentation web-development backend frontend apis developer-tools cross-platform end-to-end-type-safety api-contract zod openapi trpc-alternative rest-client react-query nestjs nextjs fastify standard-schema nodejs typescript web-server
5 sources
- readme: https://github.com/ts-rest/ts-rest · fetched 2026-08-28 · d6636705bfc7
- homepage: https://ts-rest.com · fetched 2026-08-29 · 786e7f56265e
- site_page: https://ts-rest.com/quickstart · fetched 2026-08-29 · 8fbba1068318
- site_page: https://ts-rest.com/changelog · fetched 2026-08-29 · 9d1a8f2eddd1
- site_page: https://ts-rest.com/faq · fetched 2026-08-29 · fc02534f3d02
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| ts-rest/ts-rest | main | 64 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem