Profile
Back to NewsBack
GitHub Trending 3 min
Reader Mode
middleapi/orpc: Typesafe APIs Made Simple 🪄

middleapi/orpc: Typesafe APIs Made Simple 🪄

10 hours ago

oRPC - Typesafe APIs Made Simple 🪄

Documentation

You can read the documentation here.

Packages

Core

| Package | Purpose | Docs | | -------------------------------------------------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | @orpc/contract | Define API contract as the single source of truth. | Procedure Contract, Contract Router, Implementation, Generate from OpenAPI | | @orpc/server | Build APIs or implement contracts. | Procedure, Router, Middleware, Context, RPC Handler | | @orpc/client | Consume APIs with end-to-end type safety. | Client-Side Clients, Server-Side Clients, RPC Link, Error Handling | | @orpc/openapi | Add OpenAPI compatibility to APIs. | OpenAPI Handler, OpenAPI Link, Specification, Scalar |

Schema validation

| Package | Purpose | Docs | | ------------------------------------------------------------ | ---------------------------------------------------------- | ----------------------------------------------------- | | @orpc/zod | JSON Schema converter for Zod. | Zod | | @orpc/valibot | JSON Schema converter for Valibot. | Valibot | | @orpc/arktype | JSON Schema converter for ArkType. | ArkType |

Built-in features

| Package | Purpose | Docs | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | | @orpc/publisher | Pub/Sub with memory, Redis, and Upstash adapters. | Publisher | | @orpc/ratelimit | Rate limiting with memory, Redis, and Upstash adapters. | Rate Limit | | @orpc/experimental-lock | Locking with memory, Redis, and Upstash adapters. | Lock | | @orpc/hibernation | Leverage Hibernation APIs like Cloudflare's Hibernation WebSocket. | Hibernation | | @orpc/json-schema | Smart coercion for OpenAPI requests. | Smart Coercion |

Framework & ecosystem integrations

| Package | Purpose | Docs | | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | @orpc/next | Integrate with Next.js Server Functions. | Next.js | | @orpc/ai-sdk | Turn contracts and procedures into AI SDK tools. | AI SDK | | @orpc/tanstack-query | Integrate with TanStack Query. | TanStack Query | | @orpc/pinia-colada | Integrate with Pinia Colada. | Pinia Colada | | @orpc/swr | Integrate with SWR. | SWR | | @orpc/experimental-msw | Mock procedures with Mock Service Worker. | MSW | | @orpc/experimental-effect | Integrate with Effect. | Effect | | @orpc/nest | Implement your contract with NestJS. | NestJS | | @orpc/node | Node.js plugins for static file serving and large uploads. | Static File, Tmp File Upload, Batch Response Compression | | @orpc/bun | Adapters for Bun's Redis. | Publisher, Rate Limit, Lock | | @orpc/cloudflare | Adapters for Cloudflare Workers. | Publisher, Rate Limit, Lock, Traces | | @orpc/trpc | Reuse existing tRPC routers within oRPC. | tRPC |

Observability

| Package | Purpose | Docs | | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------- | | @orpc/opentelemetry | Integrate with OpenTelemetry for distributed tracing. | OpenTelemetry | | @orpc/pino | Integrate with Pino for logging. | Pino | | @orpc/evlog | Integrate 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

Guillermo Rauch
Guillermo Rauch

Premium Sponsors

Nexa
Nexa

Organization Sponsors

LN Markets
LN Markets

Sponsors

Reece McDonald
Reece McDonald
あわわわとーにゅ
あわわわとーにゅ
nk
nk
supastarter
supastarter
herrfugbaum
herrfugbaum
Ryota Murakami
Ryota Murakami
David Cramer
David Cramer
Valerii Petryniak
Valerii Petryniak
Valerii Strilets
Valerii Strilets
Kyle Mistele
Kyle Mistele
christ12938
christ12938
Ryan Soderberg
Ryan Soderberg
shota
shota
Ellis Driscoll
Ellis Driscoll
Hoang Nguyen
Hoang Nguyen
Orestis Ioannou
Orestis Ioannou
Stefan Smiljkovic
Stefan Smiljkovic

Backers

David Walsh
David Walsh
IPv4Addr
IPv4Addr
Robbe Vaes
Robbe Vaes
Aidan Sunbury
Aidan Sunbury
soonoo
soonoo
Kevin Porten
Kevin Porten
Denis
Denis
Christopher Kapic
Christopher Kapic
Tom Ballinger
Tom Ballinger
Sam
Sam
Titoine
Titoine
Igor Makowski
Igor Makowski
hanayashiki
hanayashiki
Lev Dubinets
Lev Dubinets
Kelly Peilin Chan
Kelly Peilin Chan
Guy Ariely
Guy Ariely
PaulSenon
PaulSenon
Shotaro Nakamura
Shotaro Nakamura
Alex
Alex
Andrey Gubanov
Andrey Gubanov

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.

Chat with me