Skip to content

Choose a Chronicle hosting model

Chronicle can feel like several things at once: a client library, a .NET host integration, and a kernel process your applications connect to. The trick is to separate those choices. Your application code can run in a console app, a worker, ASP.NET Core, or Arc. The Chronicle kernel can run locally in Docker, inside an Aspire AppHost, or as infrastructure managed by your platform.

Pick the smallest layer that answers the question you have today. You can move up the layers without changing your events, projections, reducers, or reactors.

Chronicle kernel runtime

Your application host

Console app

explicit client

Worker service

generic host + DI

ASP.NET Core

web endpoints + DI

Arc application

commands, queries, proxies

Local Docker / Compose

Aspire AppHost

Managed by your platform

The app host decides how much wiring you own

Section titled “The app host decides how much wiring you own”
LayerWhat you writeWhat Chronicle wiresUse it when
Consolenew ChronicleClient(...), GetEventStore(...), append events yourselfNothing hidden. You see the client and event store directly.You are learning, debugging a small reproduction, or writing a script.
Worker ServiceHost.CreateApplicationBuilder, AddCratisChronicle(...), a BackgroundServiceDI registration and artifact discovery for reactors, reducers, and projections.You process events, run background workflows, or keep derived state updated.
ASP.NET CoreWebApplication.CreateBuilder, AddCratisChronicle(...), UseCratisChronicle()DI registration, artifact discovery, and request-pipeline integration.You expose HTTP endpoints, controllers, or minimal APIs that append events.
Arc + ChronicleArc commands and queries; Chronicle-backed command return values and projectionsArc’s command/query pipeline plus Chronicle event appending, identity, tenancy, and read-model integration.You want a typed full-stack CQRS app with generated TypeScript proxies.

The domain artifacts stay the same across these hosts. A BookRegistered event, a BookStatus projection, and a NotifyWaitingList reactor can start in a console sample and later run unchanged in a worker, web API, or Arc application.

The kernel runtime decides who operates Chronicle

Section titled “The kernel runtime decides who operates Chronicle”
RuntimeWhat it gives youUse it when
Local DockerOne kernel reachable at chronicle://localhost:35000, with the workbench on port 8080.You need the fastest local feedback loop.
Docker ComposeChronicle and storage as named services in a local or CI topology.You want repeatable local infrastructure for a team or pipeline.
Aspire AppHostChronicle as an Aspire resource with endpoints and storage references wired into dependent projects.Your .NET solution already uses Aspire to compose services locally.
Production-managed kernelA Chronicle container, durable storage, TLS, secrets, health checks, and versioned deployment owned by your platform.The application should only know the Chronicle connection string and credentials.

There is no special “managed client” mode in your application. Managed means the kernel and its storage are operated outside the app: Kubernetes, Docker, cloud infrastructure, or your internal platform owns the process; your app gets a connection string.

If you are…Start withThen move to
Learning Chronicle from scratchGet started, then ConsoleTutorial
Adding events to an existing web APIRun Chronicle locally and ASP.NET CoreProduction hosting
Building background event processorsWorker ServiceReactors and Reducers
Building a full-stack Cratis appArc + ChronicleBuild a full-stack feature
Preparing a team environmentDocker Compose or AspireProduction hosting and Data Protection Key Encryption

If you are unsure, use this rule: learn in a console app, ship user-facing endpoints in ASP.NET Core or Arc, run background work in a worker, and let your platform own the production kernel.