From a small Chronicle process to a React application composed with Arc, Components, and Aspire.
Explore the samples · Run locally · Browse the documentation
| Sample | Experience | Products | Start here |
|---|---|---|---|
| Chronicle Backend | HTTP API | Chronicle | Append one immutable fact and read an event source's history. |
| Chronicle Processing | HTTP API | Chronicle, Fundamentals | Compare a projection, reducer, and reactor on one event stream. |
| Idea Loom — Arc + React | React | Arc, Components, Fundamentals | Follow a typed command and observable query from C# to a polished UI. |
| Chronicle Multi-Tenancy | HTTP API | Arc, Chronicle, Fundamentals | Isolate the same typed workflow across tenant namespaces. |
| Chronicle Cross-Store | HTTP API | Chronicle, Fundamentals | Connect two event stores through an outbox, inbox, and local translation. |
| Chronicle Operations Diagnosis | CLI + Workbench | Chronicle, CLI, Fundamentals | Create one known failure and learn to inspect it before repair. |
| Chronicle with ASP.NET Core | HTTP API | Chronicle | Host Chronicle through dependency injection and expose focused endpoints. |
| Model-First Library | Executable model | Screenplay, Stage | Compile one modeled workflow and run its accepted and rejected examples. |
| Library | React + APIs | Arc, Chronicle, Components | Explore separate lending and membership applications under one local composition. |
Tip
Start with Chronicle Backend for the smallest HTTP path, then open Chronicle Processing to compare projections, reducers, and reactors. Move to Library when you want generated TypeScript contracts and React.
Arc: command → current-state store → observable query → React
Chronicle: append → event history → projections / reactions → views
Model-first: .play model → Screenplay compiler → Stage specifications
Choose the path matching what you want to learn. The focused samples keep one idea in view; Library brings several paths together in a larger application.
- .NET 10 SDK
- Docker or another compatible container runtime
- Node.js 23 or newer for the React applications
- Corepack/Yarn for frontend work
Clone the repository and validate the catalog:
git clone https://github.com/Cratis/Samples.git
cd Samples
corepack enable
yarn install
yarn samples:validate
yarn lint:ci
yarn buildBuild the .NET samples:
dotnet restore Samples.slnx
dotnet build Samples.slnx --configuration Debug
dotnet test Samples.slnx --configuration Debug --no-build
dotnet build Samples.slnx --configuration Release -p:CratisProxiesOutputPath=Each sample README contains its own infrastructure and run commands, a short tour of the code, and ideas to try next.
Arc/ standalone Arc and React samples
Chronicle/ focused Chronicle samples
ModelFirst/ executable Screenplay and Stage samples
Library/ the larger React and multi-service showcase
samples.json the catalog used by repository checks and the documentation site
scripts/ catalog and repository checks
The catalog is deliberately machine-readable. The Cratis documentation sample roster is generated from it so descriptions and source links stay aligned with the runnable projects. A sample can add previewUrl and previewLabel when a real read-only experience, such as an event-model viewer, is available.
These projects favor clarity and visible behavior. They demonstrate exact, documented combinations of Cratis packages and local infrastructure; they are not production templates or support commitments. Every sample calls out the pieces it intentionally leaves out.
A sample should be enjoyable to explore and easy to understand:
- Give it one clear learning goal.
- Keep it independently runnable.
- Include an inviting
README.mdwith an architecture sketch, exact commands, expected behavior, and a few ideas to try. - Add tests for the behavior the sample teaches.
- Add the entry to
samples.json. - Run
yarn samples:validateand the sample's own build and test commands.
Build something, change it, and watch the model and runtime tell the same story.