Search

Search pages, services, tech stack, and blog posts

oRPC BackendEnd-to-end type-safe RPC with OpenAPI support

oRPC combines the DX of tRPC with OpenAPI spec generation — define your procedures once and get type-safe client calls and an auto-generated OpenAPI schema. Best of both worlds for APIs consumed by both internal clients and external partners.

oRPC combines the developer experience of tRPC with OpenAPI specification generation — define your procedures once and get type-safe client calls for internal consumers and a standards-compliant OpenAPI schema for external partners. At A Major, we recommend oRPC for teams that want tRPC-style DX but also need to expose documented REST APIs. oRPC supports Zod and Valibot for validation, generates OpenAPI 3.1 schemas automatically, and integrates with Next.js, Hono, and Fastify. Its React Query client provides typed query and mutation hooks — the same ergonomics as tRPC with broader interoperability.

Quick start

bash
npm init -y
npm install @orpc/server @orpc/client zod
npx tsx src/server.ts

Read the full documentation at orpc.unnoq.com

Type-safe from day one

Input and output types inferred from your procedure definitions — TypeScript errors if you break the contract.

OpenAPI spec generation

Automatic OpenAPI 3.1 schema from your router — Swagger UI and partner integrations without extra work.

Zod / Valibot validation

Bring your own validation library — oRPC handles the plumbing, you write the schema.

Middleware pipeline

Composable middleware for auth, rate limiting, tracing, and error formatting.

Framework adapters

Next.js, Hono, Fastify, and Node.js HTTP — plug oRPC into your existing server.

React Query client

First-class TanStack Query integration — oRPC procedures become typed query/mutation hooks.

Why it's hard

Early-stage ecosystem

oRPC is newer than tRPC with a smaller community. Expect fewer third-party plugins, tutorials, and Stack Overflow answers.

Migration from tRPC

While conceptually similar, migrating from tRPC to oRPC requires rewriting router definitions and updating client code.

OpenAPI schema complexity

Auto-generated OpenAPI schemas can become large and require manual refinement for clean public documentation.

Best practices

Use Zod for input/output schemas

Zod schemas provide runtime validation, TypeScript types, and feed directly into OpenAPI generation — one schema does triple duty.

Organize procedures by domain

Group related procedures into routers by domain feature — keeps the API surface navigable as it grows.

Generate typed clients for external consumers

Use the auto-generated OpenAPI spec to produce typed SDKs in TypeScript, Python, and Go for external partners.

Use middleware for cross-cutting concerns

Auth, rate limiting, and logging belong in oRPC middleware — not duplicated across individual procedures.

Frequently asked questions




Want to build with oRPC?

Talk to our engineering team about your oRPC architecture. We'll respond within 24 hours.

1 spot available in May 2026Apr 2026 fully booked

We limit intake each month so every project gets the focus it deserves.