What problem does it solve?
Reduce friction building and maintaining Effect-TS applications by providing concrete patterns for typed errors, dependency injection via Layers, concurrency primitives, and safe resource management so developers avoid common anti-patterns and runtime defects.
Core Features & Use Cases
- Typed Error Design & Recovery: How to model domain errors with tagged errors, recover with catchTag/catchAll, and convert to Either/Option.
- Dependency Injection with Layers: Defining Context.Tags, composing Layer.succeed/Layer.effect/scoped layers, and providing dependencies at the composition root.
- Concurrency & Fibers: Forking, joining, racing, bounded parallelism, semaphores, queues, and graceful interruption and finalizers.
- Testing, Schema, and Streams: Using TestClock and test layers, Schema validation for inputs and config, and Stream patterns for batched or rate-limited processing.
- Use Case Example: Refactor a service to provide a typed UserRepository Layer, run concurrent fetches with bounded concurrency, and ensure deterministic tests with mock layers.
Quick Start
Refactor a TypeScript handler to use Effect.gen with tagged errors, provide a UserRepository Layer at the composition root, and limit concurrent background tasks with a semaphore.