eridu-tech — the server-side infrastructure behind your oRPC procedures
#1788
yousif-khalil-abdulkarim
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
eridu-techis a collection of 17 composable backend infrastructure components for TypeScript — caching, locking, event buses, rate limiting, circuit breaking, file storage, and more — built around one idea:It's not an RPC framework and not a replacement for oRPC. oRPC handles the type-safe client↔server contract;
eridu-techprovides the reusable server-side infrastructure that lives behind your procedures — caches, rate limiters, distributed locks, event buses, typed config, and resilience primitives. Use them together.Links: GitHub · Docs · API reference · NPM
What problem does it solve?
oRPC gives you beautifully typed procedures and OpenAPI integration. But the endpoints themselves usually need more than type safety — caching to avoid repeated work, rate limiting to protect a route, a distributed lock to coordinate a mutation, an event bus to publish side effects, typed config and env access.
Those pieces usually come from hand-rolled code or disconnected single-purpose libraries, each with its own API and conventions — or a monolithic backend framework that pulls you away from oRPC's model.
eridu-techsits in the middle:Cache) and add more as you need them.Why I built it
The origin is a concrete frustration: I wanted a NestJS-style backend architecture inside a full-stack framework like Next.js, and it didn't work — NestJS modules are tightly coupled to the NestJS runtime and DI container, so they're hard to reuse anywhere else.
That led to a simple design decision:
So instead of building another framework, I built composable, framework-independent modules that plug into whatever transport you already chose — including oRPC.
Design principles
1. Adapter-first — the application owns the architecture
Every module depends on a stable contract; infrastructure differences live behind adapters. A cache is a
Cachewhether it's Redis, an in-memory store, or MongoDB. Your business logic never imports a vendor SDK directly:2. Composable modules — useful alone, powerful together
The shared Serde engine shows this best: on its own it's a complete serialization library, but because
Cache,LockFactory, andEventBusall accept the sameSerdeinstance, they share one serialization engine — so aLockobject can be stored in theCacheand read back perfectly, with no glue code between components.3. Frameworks are integration points, not boundaries
oRPC handles the typed boundary;
eridu-techhandles the infrastructure behind the handlers:4. Unified architecture
Components are independent but share a consistent architecture — no glue code:
ConfigAccessorprovides a standardized, type-safe way to read domain configuration variables, with optional schema validation.EnvAccessorprovides type-safe environment variable access from any source (process.env, secrets managers, and more), with optional schema validation.Key features
A quick taste
An oRPC procedure whose handler uses an
eridu-techcache — same API in tests (memory) and production (Redis):oRPC defines what the API looks like;
eridu-techprovides how the backend behaves — caching, rate limiting, locking, events — behind a consistent, swappable interface.Components available today (17)
Every component ships with multiple built-in adapters (in-memory, Redis, S3, local disk, and more) and its own in-memory testing adapter.
View all component docs →
Getting started
Closing thoughts
oRPC solved the typed-contract problem really well. The question I keep asking is: what do you reach for behind those procedures when the backend grows complex? My answer was a set of composable building blocks with adapters — so you can keep oRPC's model and still get caching, locking, rate limiting, and events without hand-rolling them.
I'd love feedback — especially from people building growing backends with oRPC. What infrastructure do you reach for first? What's missing? I'm happy to discuss trade-offs (abstraction layers aren't free). ⭐ Starring the repo also helps others discover it.
All reactions