Local development
Run the tutorial locally
This site is the static view of a repository of runnable tests. Clone it, run the suites, and every lesson becomes code you can edit and execute in your editor.
One source tree, two views
Lessons live under steps/ — each folder has a README.md (the explanation) and an index.test.ts (the exercises). The static site and the interactive TutorialKit edition are both generated from that directory.
Quick start
# clone and install
git clone https://github.com/jreehal/effect-examples.git
cd effect-examples/step-by-step
pnpm install
# run the full suite
pnpm test
# run a single lesson
pnpm test 05-effect-basics
# serve the static site locally
pnpm site:install # one-time
pnpm site:dev # http://localhost:4321Effect 4
This tutorial targets effect@4 — the same version used on effect.website. Import from effect and effect/testing; unstable modules live under effect/unstable/*.
All lessons
- 01-the-problemThe Problem
- 02-description-vs-executionDescription vs Execution
- 03-result-typesResult Types
- 04-error-typesError Types
- 05-effect-basicsEffect Basics
- 06-pipe-and-flowPipe & Flow
- 07-effect-genEffect.gen
- 08-sync-vs-async-constructorsSync vs Async Constructors
- 09-error-handlingError Handling
- 10-error-accumulationError Accumulation
- 11-option-eitherOption & Result
- 12-combining-effectsCombining Effects
- 13-async-operationsAsync Operations
- 14-runnersRunners
- 15-dataData
- 16-branded-typesBranded Types
- 17-pattern-matchingPattern Matching
- 18-schema-modelingSchema Modeling
- 19-schema-classesSchema Classes
- 20-schema-transformationsSchema Transformations
- 21-context-basicsContext Basics
- 22-layersLayers
- 23-service-drivenService-Driven Development
- 24-advanced-diAdvanced DI
- 25-configConfig
- 26-loggerLogger & Effect.log
- 27-effect-fnEffect.fn
- 28-testing-basicsTesting Basics
- 29-test-layersTest Layers
- 30-test-clockTestClock
- 31-schedulesSchedules
- 32-retry-and-timeoutRetry & Timeout
- 33-source-patternsSource Patterns
- 34-streamsStreams
- 35-concurrencyConcurrency
- 36-fibersFibers
- 37-interruptionInterruption
- 38-semaphoreSemaphore
- 39-refRef
- 40-synchronized-refSynchronizedRef
- 41-subscription-refSubscriptionRef
- 42-queueQueue
- 43-deferredDeferred
- 44-latchLatch
- 45-pubsubPubSub
- 46-scopeScope
- 47-cacheCache
- 48-cause-and-sandboxCause & Sandbox
- 49-payment-systemPayment System
- 50-ecommerce-checkoutE-commerce Checkout
- 50a-swapi-api-clientSWAPI API Client
- 51-project-setupProject Setup
- 52-tsconfigtsconfig
- 53-project-structureProject Structure
- 54-incremental-adoptionIncremental Adoption
- 55-use-patternUse Pattern
- 56-redactedRedacted
- 57-http-client-patternsHTTP Client Patterns
- 58-observabilityObservability
- 59-cli-patternsCLI Patterns
- 60-runtimeRuntime