How academind/you-must-use-effect works
This repository is a set of standalone TypeScript demos teaching the Effect library, not an application with one end-to-end business workflow. The principal workflow is an engineer running an individual snippet and observing how Effect models a value, failure, dependency, or runtime capability. The snippets cover error handling, service construction, concurrency, queues, rate limiting, schemas, and configuration. The README and filenames support these capability branches; sampled source confirms only some implementations and their wiring. The README’s resource-safety entry does not match the supplied tree, so it is omitted.
Main entry points: fake-clients.ts Fake clients · 01b-typed-errors-with-effect.ts Typed errors · 02-handling-errors.ts Error handling · 12b-structured-concurrency-with-effect.ts Structured concurrency
Components 18
Effects and errors
- Lazy effects
src/00-effect-is-a-value.ts - Promise errors
src/01a-typed-errors-without-effect.ts - Typed errors
src/01b-typed-errors-with-effect.ts - Error handling
src/02-handling-errors.ts - Defects
src/03-errors-vs-defects.ts
Services and layers
- Services
src/04-services.ts - Dependency layers
src/05-layers.ts
Runtime capabilities
- Retry and timeout
src/06-retry-and-timeout.ts - Concurrency
src/07-concurrency.ts - Back-pressure queue
src/08-queue.ts - Rate limiting
src/09-rate-limiter.ts - Schema validation
src/10-schema.ts - Typed configuration
src/11-config.ts - Promise concurrency
src/12a-structured-concurrency-without-effect.ts - Structured concurrency
src/12b-structured-concurrency-with-effect.ts - Effect diagnostics
src/13-effect-language-service.ts
Demo support
- Fake clients
src/lib/fake-clients.ts
Other components
- Engineer
Connections 19
- Engineer → Lazy effects: runs
- Engineer → Promise errors: runs
- Engineer → Typed errors: runs
- Engineer → Error handling: runs
- Engineer → Defects: runs
- Engineer → Services: runs
- Engineer → Dependency layers: runs
- Engineer → Retry and timeout: runs
- Engineer → Concurrency: runs
- Engineer → Back-pressure queue: runs
- Engineer → Rate limiting: runs
- Engineer → Schema validation: runs
- Engineer → Typed configuration: runs
- Engineer → Promise concurrency: runs
- Engineer → Structured concurrency: runs
- Engineer → Effect diagnostics: runs
- Typed errors → Fake clients: calls database
- Error handling → Fake clients: calls database
- Structured concurrency → Fake clients: calls moderation and storage