End-to-end typesafe APIs built quicker & easier
Note
This project is still in heavy development, please be mindful of breaking changes.
oRPC is a powerful combination of RPC and OpenAPI, offering an exceptional developer experience powered by TypeScript. It's designed to be simple and straightforward to use.
- Type-safe 🔒: oRPC is built on top of TypeScript, which means you get full type safety out of the box.
- Easy to use ✍️: oRPC is designed to be simple and straightforward to use.
- Contract first 📝: Take advantage of a "contract first" approach to developing your API.
- Built-in plugins 🔌: Easily implement into your favourite frameworks.
You can find the full documentation & examples here.
@orpc/contract
: Build your API contract.@orpc/server
: Build your API or implement API contract.@orpc/client
: Consume your API on the client with type-safety.@orpc/react
: High level integration with React Query.@orpc/react-query
: Low level integration with React Query.@orpc/vue-query
: Low level integration with Vue Query.@orpc/openapi
: Generate OpenAPI specs and provide OpenAPI handler for@orpc/server
.@orpc/next
: Helpers and hooks for Next.JS.@orpc/zod
: More schemas that Zod doesn't support yet.
This comparison table helps you understand how oRPC differs from other popular TypeScript RPC and REST solutions.
- ✅ First-class, built-in support.
- 🟡 Lacks features, or requires third-party integrations.
- 🛑 Not supported or not documented.
Feature | oRPC | tRPC | ts-rest | Description |
---|---|---|---|---|
End-to-end Type Safety | ✅ | ✅ | ✅ | Full TypeScript type inference from backend to frontend. |
SSR Support | ✅ | ✅ | ✅ | Server-side rendering compatibility. |
React Query Integration | ✅ | ✅ | 🟡 | Native support for React Query/TanStack Query. |
Vue Query Integration | ✅ | 🛑 | 🟡 | Native support for Vue Query/TanStack Query. |
Contract-First Development | ✅ | 🛑 | ✅ | API definitions before implementation. |
File Operations | ✅ | 🟡 | 🟡 | Built-in support for file uploads/downloads. |
OpenAPI Support | ✅ | 🟡 | 🟡 | Generation and consumption of OpenAPI specs. |
Server Actions Support | ✅ | ✅ | 🛑 | React/Next.js Actions compatibility. |
Distributed under the MIT License. See LICENSE for more information.