ts-rest
A TypeScript toolkit for defining a REST API contract once and getting a typed client and server from it. It works with frameworks like NestJS, Fastify and Next.js.
Pick a small issue you can reproduce, then fix it with your AI coding agent.
Share on XLicense: MIT
Overview
ts-rest is a TypeScript toolkit for defining a REST API contract once and using it on both client and server. The contract gives end-to-end type safety without code generation, and you can adopt it step by step in an existing app. It offers an RPC-like client, optional Zod validation, and optional OpenAPI output, and it works with frameworks such as NestJS, Fastify and Next.js.
Key features
- Shared API contract with end-to-end type safety
- RPC-like client side API
- No code generation and a small bundle size
- Zod support for runtime validation
- Optional OpenAPI integration
Best for
TypeScript teams that want typed REST endpoints shared between frontend and backend while keeping a plain REST API. It can be adopted incrementally.
- Upstream
- ts-rest/ts-rest
- Fork on GitHub
- Guo-astro/ts-rest
- Upstream stars
- 3.3k
- Category
- Developer tools and infrastructure
- Language
- TypeScript
- License
- MIT
- Forked
- 2023-04-24
- Sync status
- In syncLast synced 2026-10-19
More in Developer tools and infrastructure
An open-source TypeScript engine for calculating Zi Wei Dou Shu charts and consulting traditional references. It helps developers build charting and interpretation tools.
Forked 2026-10-18Last synced 2026-10-19License: MITDeveloper tools and infrastructureGitHub
ImHex is a hex editor for inspecting and editing binary files. Reverse engineers, programmers, and forensic users can search and patch bytes or describe file structures with its pattern language.
Forked 2026-10-17Last synced 2026-10-19License: GPL-2.0Developer tools and infrastructureGitHub
Numa is a portable DNS resolver for local development and privacy. It blocks ads, gives local services names like frontend.numa, and runs without depending on a cloud account.
Forked 2026-10-17Last synced 2026-10-19License: MITDeveloper tools and infrastructureGitHub
Handwired turns ordinary JavaScript logic into differentiable neural-network-style calculations, so programs can run as matrix operations in JavaScript or WebGPU. It is for experimenting with GPU execution and optimization of code written in a traditional style.
Forked 2026-10-16Last synced 2026-10-19License: MITDeveloper tools and infrastructureGitHub