middleapi/orpc

Typesafe APIs Made Simple πŸͺ„

TypeScript

5,681

1,856 commits

updated Oct 12, 2026

See the code

README

oRPC - Typesafe APIs Made Simple πŸͺ„

Documentation

You can read the documentation here.

Packages

Core

PackagePurposeDocs
@orpc/contractDefine API contract as the single source of truth.Procedure Contract, Contract Router, Implementation, Generate from OpenAPI
@orpc/serverBuild APIs or implement contracts.Procedure, Router, Middleware, Context, RPC Handler
@orpc/clientConsume APIs with end-to-end type safety.Client-Side Clients, Server-Side Clients, RPC Link, Error Handling
@orpc/openapiAdd OpenAPI compatibility to APIs.OpenAPI Handler, OpenAPI Link, Specification, Scalar

Schema validation

PackagePurposeDocs
@orpc/zodJSON Schema converter for Zod.Zod
@orpc/valibotJSON Schema converter for Valibot.Valibot
@orpc/arktypeJSON Schema converter for ArkType.ArkType

Built-in features

PackagePurposeDocs
@orpc/publisherPub/Sub with memory, Redis, and Upstash adapters.Publisher
@orpc/ratelimitRate limiting with memory, Redis, and Upstash adapters.Rate Limit
@orpc/experimental-lockLocking with memory, Redis, and Upstash adapters.Lock
@orpc/hibernationLeverage Hibernation APIs like Cloudflare's Hibernation WebSocket.Hibernation
@orpc/json-schemaSmart coercion for OpenAPI requests.Smart Coercion

Framework & ecosystem integrations

PackagePurposeDocs
@orpc/nextIntegrate with Next.js Server Functions.Next.js
@orpc/ai-sdkTurn contracts and procedures into AI SDK tools.AI SDK
@orpc/tanstack-queryIntegrate with TanStack Query.TanStack Query
@orpc/pinia-coladaIntegrate with Pinia Colada.Pinia Colada
@orpc/swrIntegrate with SWR.SWR
@orpc/experimental-mswMock procedures with Mock Service Worker.MSW
@orpc/experimental-effectIntegrate with Effect.Effect
@orpc/nestImplement your contract with NestJS.NestJS
@orpc/nodeNode.js plugins for static file serving and large uploads.Static File, Tmp File Upload, Batch Response Compression
@orpc/bunAdapters for Bun's Redis.Publisher, Rate Limit, Lock
@orpc/cloudflareAdapters for Cloudflare Workers.Publisher, Rate Limit, Lock, Traces
@orpc/trpcReuse existing tRPC routers within oRPC.tRPC

Observability

PackagePurposeDocs
@orpc/opentelemetryIntegrate with OpenTelemetry for distributed tracing.OpenTelemetry
@orpc/pinoIntegrate with Pino for logging.Pino
@orpc/evlogIntegrate with Evlog for logging.Evlog

Sponsors

Like what we build over at middleapi? You can help keep it going through GitHub Sponsors or Open Collective. Every bit helps! πŸš€

ScreenshotOne.comScreenshotOne.com
The screenshot API for developers
YuzuYuzu
We're hiring NYC based engineers
MisskeyHQMisskeyHQ
Decentralized microblogging SNS born on Earth

Special Sponsors

Premium Sponsors

Organization Sponsors

Sponsors

Backers

With thanks to 38 past sponsors who helped get oRPC here.

References

oRPC is inspired by existing solutions that prioritize type safety and developer experience. Special acknowledgments to:

  • tRPC: For pioneering the concept of end-to-end type-safe RPC and influencing the development of type-safe APIs.
  • ts-rest: For its emphasis on contract-first development and OpenAPI integration, which have greatly inspired oRPC's feature set.

License

Distributed under the MIT License. See LICENSE for more information.

api
bunjs
cloudflare-worker
contract-first
denojs
next-js
nodejs
openapi
pinia-vuejs
react
rpc-api
solidjs
svelte
tanstack
typesafe
typescript
vue

middleapi/orpc

Typesafe APIs Made Simple πŸͺ„

TypeScript

5,681

1,856 commits

updated Oct 12, 2026

See the code

README

oRPC - Typesafe APIs Made Simple πŸͺ„

Documentation

You can read the documentation here.

Packages

Core

PackagePurposeDocs
@orpc/contractDefine API contract as the single source of truth.Procedure Contract, Contract Router, Implementation, Generate from OpenAPI
@orpc/serverBuild APIs or implement contracts.Procedure, Router, Middleware, Context, RPC Handler
@orpc/clientConsume APIs with end-to-end type safety.Client-Side Clients, Server-Side Clients, RPC Link, Error Handling
@orpc/openapiAdd OpenAPI compatibility to APIs.OpenAPI Handler, OpenAPI Link, Specification, Scalar

Schema validation

PackagePurposeDocs
@orpc/zodJSON Schema converter for Zod.Zod
@orpc/valibotJSON Schema converter for Valibot.Valibot
@orpc/arktypeJSON Schema converter for ArkType.ArkType

Built-in features

PackagePurposeDocs
@orpc/publisherPub/Sub with memory, Redis, and Upstash adapters.Publisher
@orpc/ratelimitRate limiting with memory, Redis, and Upstash adapters.Rate Limit
@orpc/experimental-lockLocking with memory, Redis, and Upstash adapters.Lock
@orpc/hibernationLeverage Hibernation APIs like Cloudflare's Hibernation WebSocket.Hibernation
@orpc/json-schemaSmart coercion for OpenAPI requests.Smart Coercion

Framework & ecosystem integrations

PackagePurposeDocs
@orpc/nextIntegrate with Next.js Server Functions.Next.js
@orpc/ai-sdkTurn contracts and procedures into AI SDK tools.AI SDK
@orpc/tanstack-queryIntegrate with TanStack Query.TanStack Query
@orpc/pinia-coladaIntegrate with Pinia Colada.Pinia Colada
@orpc/swrIntegrate with SWR.SWR
@orpc/experimental-mswMock procedures with Mock Service Worker.MSW
@orpc/experimental-effectIntegrate with Effect.Effect
@orpc/nestImplement your contract with NestJS.NestJS
@orpc/nodeNode.js plugins for static file serving and large uploads.Static File, Tmp File Upload, Batch Response Compression
@orpc/bunAdapters for Bun's Redis.Publisher, Rate Limit, Lock
@orpc/cloudflareAdapters for Cloudflare Workers.Publisher, Rate Limit, Lock, Traces
@orpc/trpcReuse existing tRPC routers within oRPC.tRPC

Observability

PackagePurposeDocs
@orpc/opentelemetryIntegrate with OpenTelemetry for distributed tracing.OpenTelemetry
@orpc/pinoIntegrate with Pino for logging.Pino
@orpc/evlogIntegrate with Evlog for logging.Evlog

Sponsors

Like what we build over at middleapi? You can help keep it going through GitHub Sponsors or Open Collective. Every bit helps! πŸš€

ScreenshotOne.comScreenshotOne.com
The screenshot API for developers
YuzuYuzu
We're hiring NYC based engineers
MisskeyHQMisskeyHQ
Decentralized microblogging SNS born on Earth

Special Sponsors

Premium Sponsors

Organization Sponsors

Sponsors

Backers

With thanks to 38 past sponsors who helped get oRPC here.

References

oRPC is inspired by existing solutions that prioritize type safety and developer experience. Special acknowledgments to:

  • tRPC: For pioneering the concept of end-to-end type-safe RPC and influencing the development of type-safe APIs.
  • ts-rest: For its emphasis on contract-first development and OpenAPI integration, which have greatly inspired oRPC's feature set.

License

Distributed under the MIT License. See LICENSE for more information.

api
bunjs
cloudflare-worker
contract-first
denojs
next-js
nodejs
openapi
pinia-vuejs
react
rpc-api
solidjs
svelte
tanstack
typesafe
typescript
vue

Significant stargazers

(top 24 of 126)

Neko

1,681 followers Β· starred Jun 2025

EGOIST

13,582 followers Β· starred Jun 2025

0xflotus

496 followers Β· starred May 2025

Jovi De Croock

771 followers Β· starred Sep 2026