Welcome to oRPC
oRPC is a powerful combination of RPC and OpenAPI, making it easy to build APIs that are end-to-end type-safe and adhere to OpenAPI standards. Define your procedures once in TypeScript and get fully typed clients, automatic OpenAPI spec generation, and seamless framework integrations — with no code generation required.Quickstart
Get a working oRPC API up and running in minutes.
Why oRPC?
How oRPC compares to tRPC, ts-rest, and similar tools.
Core Concepts
Understand procedures, routers, middleware, and context.
API Reference
Explore the complete API surface.
Key features
End-to-End Type Safety
Type-safe inputs, outputs, and errors from client to server with zero code generation.
First-Class OpenAPI
Built-in OpenAPI spec generation that fully adheres to the standard.
Contract-First Development
Define your API contract before implementation, then share it with clients.
Standard Schema Support
Works out of the box with Zod, Valibot, ArkType, and any Standard Schema library.
Framework Integrations
TanStack Query, SWR, Pinia Colada, and more for seamless data fetching.
Server Actions
Compatible with React Server Actions on Next.js, TanStack Start, and others.
Streaming & SSE
Full type-safe support for Server-Sent Events and streaming responses.
Multi-Runtime Support
Works on Cloudflare Workers, Deno, Bun, Node.js, and beyond.
Packages
| Package | Description |
|---|---|
@orpc/server | Build your API — procedures, routers, middleware |
@orpc/contract | Define your API contract for contract-first development |
@orpc/client | Consume your API with full type safety |
@orpc/openapi | Generate OpenAPI specs and serve OpenAPI-compatible handlers |
@orpc/tanstack-query | TanStack Query integration (React, Vue, Solid, Svelte) |
@orpc/react | React utilities and Server Actions support |
@orpc/otel | OpenTelemetry instrumentation |
@orpc/nest | Deep NestJS integration |
