eridu-tech — the backend infrastructure behind your Hono app
#5190
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.
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 a replacement for Hono and not another HTTP framework. It's the layer that sits behind your Hono routes: the caches, locks, rate limiters, event buses, typed config, and resilience primitives your endpoints call into. Use Hono for lightweight routing and middleware — add
eridu-techfor the reusable infrastructure those handlers need as your backend grows.Links: GitHub · Docs · API reference · NPM
What problem does it solve?
Hono is excellent at routing, middleware, and running anywhere. But as an app's backend grows beyond simple CRUD, you keep reaching for the same things over and over: caches, distributed locks, rate limiting, circuit breakers, event buses, typed config and env access, retries and timeouts.
Those usually come from hand-rolled code or disconnected single-purpose libraries (each with its own API and conventions) — or you reach for a monolithic backend framework that wants to own your whole application and pulls you away from Hono.
eridu-techsits in the middle:Cache) and add more only when 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 HTTP layer you already chose — including Hono.
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
Hono handles HTTP;
eridu-techhandles the infrastructure behind the endpoints. One choice shouldn't prevent another: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
A Hono app where the route handler uses an
eridu-techcache — same API in tests (memory) and production (Redis):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
Hono already solved "lightweight HTTP." The question I keep asking is: what do you reach for when the backend behind those routes grows complex? My answer was a set of composable building blocks with adapters — so you never have to leave Hono to get caching, locking, rate limiting, and the rest.
I'd love feedback — especially from people running growing backends on Hono. 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