eridu-tech — the backend infrastructure behind your TanStack Start app
#7953
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 TanStack Start — keep using its server functions and API routes.
eridu-techprovides the backend infrastructure behind them: caches, locks, rate limiters, event buses, typed config, and resilience primitives. While TanStack Start's API routes don't ship built-in request/response validation, you can optionally useeridu-tech's HttpRouter instead — typed endpoints, schema validation, and a ready-made middleware chain, all framework-agnostic. Keep TanStack Start for the app layer; adderidu-techwhen the backend behind those routes grows complex.Links: GitHub · Docs · API reference · NPM
What problem does it solve?
TanStack Start is great at routing, rendering, and deployment (with Vinxi under the hood) — but as the backend of an app grows beyond simple CRUD, you keep reaching for the same infrastructure over and over: caches, distributed locks, rate limiting, circuit breakers, event buses, typed config and env access, retries and timeouts.
Those pieces usually come from hand-rolled code or disconnected single-purpose libraries, each with its own conventions. Or you reach for a monolithic backend framework that doesn't fit well inside a full-stack app. Some teams even split the backend into a separate service — hosted and deployed on its own, sometimes in another repository — which usually means setting up a monorepo. That can become a real headache when you just want to develop fast.
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 full-stack framework you already chose.
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
TanStack Start handles the app layer;
eridu-techhandles the backend — routing via HttpRouter, plus caching, locking, events, and more: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
TanStack Start's server functions are your RPC layer —
eridu-techprovides the backend infrastructure behind them, with the same API in tests (memory) and production (Redis):TanStack Start defines what the API looks like;
eridu-techprovides how the backend behaves — caching, rate limiting, locking, events — behind a consistent, swappable interface.The architecture: TanStack Start owns the app;
eridu-techowns the backend — caching, locking, events, and more behind your server functions, all swappable independently. Prefer typed, framework-agnostic HTTP routing? The optional HttpRouter component plugs right in.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
TanStack Start already solved "build the whole app in one codebase." 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 can grow a heavy backend directly inside TanStack Start without switching to a separate backend framework.
I'd love feedback — especially from people building growing backends with TanStack Start. 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