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.
| Recipe | When you reach for it |
|---|---|
| Validate a command | Reject malformed or duplicate input before it writes state |
| Return a result or an error | A command needs to hand back more than “it worked” — a value, or a typed failure |
| Provide data to a command handler | A decision needs data you must fetch — keep the fetch out of Handle so it stays testable |
| Use current state in a command | A decision depends on provider-owned state — resolve it by an explicit command key |
| Query data across slices | A screen needs data that spans more than one feature |
| Execute a command from React | Wire a form or button to a command through the generated proxy |
| Test a command | Prove a slice works through the real pipeline — no HTTP, no database |
| Authorize a command or query | Restrict 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.