Skip to content

Scenarios

These are recipes: “I need to do X — how?” Each one is short and assumes you’ve built a slice or two (the tutorial is the long way round). For the why and the full set of options, follow the links into the reference. The default recipes use standalone Arc over configured providers or application services. Start with standalone setup for C#, Kotlin or Java, or the TypeScript source preview; each recipe labels additional prerequisites and illustrative fragments. Check the preview’s capability reference before relying on a shared example. Chronicle-only behavior is explicitly separated.

RecipeWhen you reach for it
Validate a commandReject malformed or duplicate input before it writes state
Return a result or an errorA command needs to hand back more than “it worked” — a value, or a typed failure
Provide data to a command handlerA decision needs data you must fetch — keep the fetch out of Handle so it stays testable
Use current state in a commandA decision depends on provider-owned state — resolve it by an explicit command key
Query data across slicesA screen needs data that spans more than one feature
Execute a command from ReactWire a form or button to a command through the generated proxy
Test a commandProve a slice works through the real pipeline — no HTTP, no database
Authorize a command or queryRestrict who may run a command or read a query

Event-sourced Arc slices have their own Chronicle-specific recipes, starting with React to an event and Add event sourcing to an Arc slice.

Missing a recipe you expected? The backend options and Frontend guides cover the long tail, and Troubleshooting catches the common snags.