Comprehensive, real-world focused guides for 110 modules in the Effect ecosystem, including core modules, platform abstractions, and experimental features. Each guide is crafted with practical examples, testing strategies, and integration patterns that developers can immediately apply to production applications.
Current Progress: 42/110 modules documented (38% complete) with 68 modules remaining.
effect-by-example/
βββ effect/ # Core module guides (29/97 guides)
β βββ Effect-Guide.md # Essential computation type
β βββ Schema-Guide.md # Type-safe validation
β βββ ... # All other core modules
βββ @effect/
β βββ platform/ # Platform module guides (13 guides)
β β βββ HttpClient-Guide.md
β β βββ HttpServer-Guide.md
β β βββ ... # All platform modules
β βββ experimental/ # Experimental module guides
β βββ VariantSchema-Guide.md
βββ CLAUDE.md # Documentation template
π§ Project In Progress: 42/110 Modules Documented (38% Complete)
| Tier | Category | Status | Count |
|---|---|---|---|
| Tier 1 | Foundation Modules | 8/20 | |
| Tier 2 | Data Structures | 9/25 | |
| Tier 3 | Advanced Features | 9/18 | |
| Tier 4 | STM Modules | β Missing | 0/12 |
| Tier 5 | System & Infrastructure | 3/15 | |
| Tier 6 | Specialized & Advanced | β Missing | 0/7 |
| Core Total | All Effect Core Modules | π§ In Progress | 29/97 |
| Tier | Category | Status | Count |
|---|---|---|---|
| Tier 1 | Core Platform | β Complete | 5/5 |
| Tier 2 | System Integration | β Complete | 5/5 |
| Tier 3 | Specialized | β Complete | 3/3 |
| Platform Total | All Platform Modules | β Complete | 13/13 |
Remaining Work: 68 modules to document
- 68 Core Effect modules requiring comprehensive guides
- Target completion: Q2 2025
Currently Documented:
- Effect - Core computation type for async operations with proper error tracking
- Schema - Type-safe schema validation and data transformation
- Stream - Async streaming data processing for large datasets
- Layer - Dependency injection and service management system
- Option - Safe handling of optional values without null/undefined
- Either - Explicit error handling with Left/Right pattern
- Array - Functional array operations with safe transformations
- Context - Type-safe dependency management and service configuration
Advanced modules for sophisticated use cases, concurrency, and performance optimization.
- Fiber - Lightweight concurrency primitives and green threads
- Schedule - Retry and repeat patterns with exponential backoff strategies
- Queue - Concurrent message passing and producer-consumer patterns
- STM - Software Transactional Memory for atomic operations
- Exit - Effect completion handling and result analysis
- FiberRef - Fiber-local state management and context propagation
- Scope - Resource management and automatic cleanup
- Config - Configuration management with environment variables
- Channel - Low-level streaming primitives and channel operations
Specialized data structures, time operations, and utility modules for specific use cases.
- Chunk - High-performance immutable sequences with array-like operations
- HashMap - Immutable hash-based key-value collections
- HashSet - Immutable hash-based unique value collections
- List - Immutable linked lists with functional operations
- SortedMap - Ordered key-value collections with custom comparators
- SortedSet - Ordered unique value collections with range operations
- Duration - Type-safe time span handling with arithmetic operations
- DateTime - Date/time operations with timezone support
- Clock - Time operations and virtual time for testing
- Random - Pseudo-random generation with reproducible seeds
- Runtime - Effect execution environment configuration
- Function - Function composition and utility operations
Cross-platform abstractions for building applications that run consistently across Node.js, Deno, Bun, and browsers.
Essential platform modules for HTTP communication, file operations, and storage.
- HttpClient - HTTP client requests with authentication, retries, and caching
- HttpServer - HTTP server creation, middleware, and request handling
- FileSystem - Cross-platform file system operations and streaming
- KeyValueStore - Unified key-value storage with multiple backend implementations
- Path - Safe cross-platform file path operations and manipulation
Advanced modules for system-level operations, process management, and infrastructure.
- Terminal - Terminal input/output, CLI applications, and interactive interfaces
- Command - Process execution, build automation, and system command integration
- Socket - TCP/UDP networking, real-time communication, and inter-process messaging
- Worker - Parallel processing, CPU-intensive tasks, and background job management
- Runtime - Application lifecycle management, graceful shutdown, and error handling
Specialized modules for advanced HTTP patterns, API design, and logging.
- HttpRouter - Advanced HTTP routing, middleware composition, and REST API patterns
- HttpApi - Declarative API definition, OpenAPI generation, and type-safe client generation
- PlatformLogger - File-based logging, structured logging, and log rotation strategies
π Predicate, Struct, Record, String, Number, Boolean, Tuple, Types, Equal, Equivalence, Order, Match
π Iterable, NonEmptyIterable, RedBlackTree, Trie, MutableHashMap, MutableHashSet, MutableList, MutableQueue, MutableRef, Ref, SynchronizedRef, SubscriptionRef, ScopedRef, Deferred, PubSub, Pool
π TArray, TMap, TQueue, TRef, TSet, TDeferred, TPubSub, TPriorityQueue, TSemaphore, TReentrantLock, TSubscriptionRef, TRandom, KeyedPool, RateLimiter, Cache
π ScopedCache, Logger, LogLevel, LogSpan, Tracer, Metric, MetricKey, MetricLabel, Resource, Reloadable, ManagedRuntime, Cause, Data, Brand, Supervisor
π Secret, Redacted, Pretty, Encoding, RegExp, BigInt, BigDecimal, Cron, Take, Sink
Next Phase: Creating foundation modules (Predicate, Struct, Record, String) starting immediately.
Start Here β Build Foundation β Practice
Master Advanced Patterns β Handle Concurrency β Optimize Performance
Specialized Data Structures β System Integration β Performance Tuning
- Data-Heavy Applications: Chunk β HashMap β SortedMap
- Time-Sensitive Systems: Duration β DateTime β Clock
- Testing & Debugging: Random β Runtime β Exit
Cross-Platform Applications β System Integration β Infrastructure
- Web Development: HttpServer β HttpClient β HttpRouter β HttpApi
- System Integration: FileSystem β Path β Command β Terminal
- Infrastructure & Performance: KeyValueStore β Socket β Worker β Runtime
- Web APIs: Effect β Schema β HttpServer β HttpRouter β HttpApi
- Data Processing: Array β Stream β Chunk β FileSystem β Worker
- Real-time Systems: Fiber β Queue β STM β Socket β Clock
- CLI Tools: Effect β Terminal β Command β FileSystem β Config
- System Integration: Layer β Context β KeyValueStore β Runtime β PlatformLogger
- Testing: Random β Clock β Runtime β Function β Channel
Each guide follows a rigorous standard designed for immediate practical application:
- Problem-Solution Pattern: Starts with real problems developers face before introducing solutions
- Progressive Complexity: Simple β Intermediate β Advanced examples that build upon each other
- Real-World Focus: Every example solves actual production problems with realistic domains
- Heavy Code Examples: 60-70% executable code with comprehensive inline documentation
- β Complete & Runnable: All 400+ examples include imports and are immediately executable
- β Effect Best Practices: Follows official Effect patterns and idiomatic usage
- β Comprehensive Error Handling: Proper error management patterns throughout
- β Type-Safe: Full TypeScript integration with inference demonstrations
- β Production-Ready: Realistic domain models (User, Product, Order, Event, etc.)
- Basic Usage Patterns: 3+ fundamental patterns for getting started
- Real-World Examples: 3-5 comprehensive scenarios demonstrating practical applications
- Advanced Features: Deep dive into powerful capabilities and edge cases
- Practical Patterns: Reusable helpers, abstractions, and utility functions
- Integration Examples: Working with other Effect modules and popular external libraries
- Testing Strategies: Unit testing, property-based testing, and mocking approaches
Essential Learning Sequence:
- Effect - Master the core computation type
- Option - Handle optional values safely
- Either - Manage errors explicitly
- Schema - Validate and transform data
Application Development Track:
- Layer - Structure your application with dependency injection
- Context - Manage services and configuration
- Config - Handle environment-specific settings
- HttpServer - Build web applications and APIs
Platform Development Track:
- FileSystem - Handle files and directories across platforms
- HttpClient - Consume APIs and external services
- KeyValueStore - Implement caching and storage
- Worker - Process intensive tasks in the background
Advanced Patterns Track:
- Fiber - Implement lightweight concurrency
- Schedule - Add resilience with retry patterns
- Queue - Enable async communication
- STM - Coordinate concurrent state changes
The guides include comprehensive examples from these production scenarios:
- REST APIs: HttpServer routing, HttpClient consumption, rate limiting, retry logic, circuit breakers
- HTTP Services: Middleware composition, request validation, response transformation, error handling
- GraphQL: Query building, schema validation, resolver patterns, subscription handling
- Database Operations: CRUD with transactions, connection pooling, migration handling
- Authentication: JWT handling, session management with KeyValueStore, multi-factor auth flows
- ETL Pipelines: Stream processing, data transformation, error recovery
- File Processing: FileSystem operations, log analysis, CSV parsing, large file streaming with Worker
- Analytics: Real-time metrics, aggregation patterns, PlatformLogger integration, reporting systems
- Message Queues: Producer-consumer patterns with Socket, dead letter handling, backpressure
- E-commerce: Shopping cart logic, inventory management, order processing, payment flows
- Multi-tenant SaaS: Tenant isolation, feature flags, usage billing, plan management
- Real-time Systems: WebSocket handling, live updates, event sourcing, CQRS
- Form Validation: Progressive enhancement, field-level errors, complex business rules
- Configuration Management: Environment variables with Config, feature toggles, A/B testing
- Command Line Tools: Terminal interfaces, Command execution, cross-platform Path handling
- Process Management: Worker coordination, Runtime lifecycle, graceful shutdown patterns
- Testing: Unit tests, integration tests, property-based testing, snapshot testing
- Monitoring: Health checks, metrics collection, PlatformLogger, distributed tracing, alerting
- Deployment: Blue-green deployments, canary releases, rollback strategies
Every guide includes comprehensive testing strategies:
- Unit Testing: Testing individual module functions with Effect's testing utilities
- Property-Based Testing: Using generators for comprehensive input coverage
- Integration Testing: Testing module interactions and real-world scenarios
- Performance Testing: Benchmarking and optimization techniques
- Mock Strategies: Creating testable abstractions and dependency injection
These guides represent the most comprehensive Effect documentation available. Contributions are welcome!
- Improvement Suggestions: Open issues for areas that need clarification
- Additional Examples: Submit PRs with new real-world scenarios
- Bug Reports: Report any incorrect examples or outdated patterns
- Template Usage: Use CLAUDE.md for creating additional guides
All contributions must maintain the established quality standards:
- Follow the documented template structure
- Include complete, runnable examples
- Focus on real-world, practical applications
- Maintain consistency with existing guides
- Official Effect Documentation - Core reference documentation
- Effect GitHub Repository - Source code and issues
- Effect Discord Community - Community support and discussions
- Documentation Template - Template for creating consistent guides
- Example Code - Standalone executable examples by module
- Platform Guides - Complete guides for all Effect Platform modules
- Experimental Guides - Guides for experimental Effect modules
- Beginner: Start with Effect β Option β Either β Array sequence
- Intermediate: Focus on Stream β Fiber β Schedule β Layer progression
- Advanced: Explore STM β Channel β Runtime β specialized data structures
- Testing: Random β Clock β comprehensive testing patterns across all modules