alchemy-domain

Installation
SKILL.md

Building with @alchemy.run/domain

@alchemy.run/domain models a backend as typed messages and pure state transitions. Commands are decided by aggregates, which record events. Views fold events into read models. Policies react to events. Sagas run long processes. Projections write outside the model, and queries serve what they wrote. The same model runs in memory for tests and on Cloudflare, Rivet or Effect Cluster Durable Objects in production.

Docs: https://alchemy.run/domain, with every page listed in https://alchemy.run/llms.txt. Every section here and in the reference files ends with a More link to the docs page that covers it in depth. A complete reference project: examples/cloudflare-domain in the alchemy repo (a bank with a foldkit app).

Workflow

Work in this order. Each step has a reference file with templates.

  1. Break the requirements down into building blocks. See references/modeling.md.
  2. Lay out the monorepo: a domain package, a server package, a web package, with one kind-suffixed file per block. See references/layout.md.
  3. Write each block from its template. See references/building-blocks.md.
  4. Specify behavior with stories before and while you implement it. See references/testing.md.
  5. Host the model on Cloudflare from the server package, export its traces, and deploy with one alchemy stack. See references/hosting.md.
  6. Drive it from foldkit in the web package. See references/frontend.md.

More: Tutorial, part 1.

Installs
119
GitHub Stars
1.9K
First Seen
Oct 16, 2026