Your First Schema: Round-Trip a Type Through JSON
Describe a Scala type once with Schema, then encode it to JSON, decode it back, and read decode errors.
Evolve Your Data: Change Your Types with Into, As and Migration
Validate incoming data with Into, convert between versions both ways with As, and rename stored fields with a compile-checked Migration.
Compile-Time Resource Safety with Scope
Manage resources with Scope so the compiler rejects leaked or misused ones, then share them through dependency injection with Wire.
Build a Typed Configuration Loader
Load a typed case class from YAML, environment overrides and defaults, report every error at once, and see where each value came from.
Getting Started with Async
Learn to create, compose, and run async effects in Scala with the zero-allocation Async[A] type.
Your First Streaming Pipeline: Turn a Sales Log into a Report
Read a bookstore's sales log with a Stream, parse, filter and batch it, sum it with a Sink, and recover from a bad line.
Build Your First Database Repository on SQLite
Connect to SQLite, derive a table and a repository from one schema, write your own queries and roll back a transaction.
Render Your First Server-Side HTML Page
Build a book detail page with the ZIO Blocks HTML DSL, escape user input, add CSS and JSON state, and save it as an HTML file.
Instrument a Program with Logs, Traces and Metrics
Add structured logs, nested spans, a counter and a histogram to a batch job, switch to JSON logs, and test the spans.
Build a Small JSON Backend from Blocks
Combine schema, config, scope, sql, http-model and telemetry into one small bookstore JSON backend, from settings to shutdown.
Navigate and Update Nested Data with Optics
Read and update fields deep inside immutable Scala data with lenses, optionals and traversals, without nested copy calls.
One Type, Many Formats
Derive JSON, YAML, XML, TOON, MessagePack, Avro and CSV codecs from one Schema and round-trip a book catalog through each.
Add Interactivity to a Page with HTMX
Turn a server-rendered book page into a live search with typed hx-* attributes: debounced input, a category filter and HTML fragments.
Build a Live Counter and Dashboard with Datastar
Build a Datastar weather station: a button that posts its signals, a server that patches the page, and a dashboard streamed over one open connection.
Getting Started with Mux
Learn how to manage multiplexed bidirectional message streams with capacity limits.
Generate Scala Code from a Smithy Model
Build a small generator that parses a Smithy model, maps its shapes to Scala types and emits Schema-ready source for Scala 3 and Scala 2.