Foundation
eridu-tech is a modular, adapter-first TypeScript library for building
production-ready backend applications. Every component ships with in-memory
adapters for fast, deterministic testing — and pluggable adapters to swap in
real infrastructure without touching your business logic.
The building blocks that power the rest of the ecosystem.
- Execution Context — Type-safe, composable context propagation for request IDs, user info, and tracing metadata across async boundaries, without manual context passing.
- Transaction Context — Coordinate database transactions across components with support for the after-commit pattern, joining existing transactions, and pluggable adapters (Kysely, MongoDB).
- Middleware and AOP — Composable middleware pipeline with before/after hooks and error handling, the foundation for every component's plugin system.
- Serde — Serialize and deserialize data with a built-in SuperJSON adapter and custom serializers, the backbone for all data interchange across the ecosystem.
- Codec — Encode and decode data with a unified, type-safe interface that includes a built-in Base64 codec and lets you build custom codecs for any protocol.
- Typed Config Access — Standardized type-safe access to domain configuration variables, with optional schema validation and full TypeScript inference.
- Typed Env Access — Type-safe environment variable access from multiple sync/async sources with parsing, defaults, and validation.
- DI Container — A lightweight, type-safe dependency injection container for wiring application components without tight coupling.