Skip to content

Event sourcing you can actually be productive with

We treat event sourcing as the default architecture for information systems: capture what happened as immutable facts, project exactly the read models you need, and ship a full-stack, type-safe app — identity, tenancy, backend, React, storage choice, and operations — without the boilerplate.

Install the .NET templates and spin up your first full-stack Cratis app — Chronicle, Arc, and a React frontend, all wired up — in minutes.

  1. Install the Cratis templates. Add the official project templates to your .NET CLI. You only need to do this once.

    Terminal window
    dotnet new install Cratis.Templates
  2. Create your application. Scaffold a new app complete with Chronicle, Arc, and a React frontend.

    Terminal window
    dotnet new cratis -n MyApp --allow-scripts Yes
  3. Run it. Start the supporting services, then the backend and the frontend from your new app folder.

    Terminal window
    cd MyApp && docker compose up -d
    dotnet run
    yarn dev

Prefer a guided path? The Chronicle getting-started walkthrough takes one event through a projection and a reactor, step by step.

One feature, every layer

See the full-stack loop before you choose a product

Cratis is most different when you follow one behavior all the way through: model the domain, resolve identity and tenant at the edge, build the slice, record the event, render the React screen, then inspect the running system with tools and AI.

Cratis is for teams that want the domain model to be the running system, not a diagram beside it. The big win is fit: Chronicle, Arc, Components, AuthProxy, Studio, the CLI, and the AI tooling are opinionated in the same direction, so codebases stay consistent, predictable, and easier for both developers and agents to work in.

One feature, one slice — typed end to end

Section titled “One feature, one slice — typed end to end”

You write the behavior once in C#. Arc generates the TypeScript proxies. The React side can’t drift — rename a property in C#, rebuild, and the frontend stops compiling until you fix it.

// Command, event, and read model for one feature — in one file.
[Command]
public record RegisterAuthor(AuthorId Id, AuthorName Name)
{
public AuthorRegistered Handle() => new(Name); // returns the fact that happened
}
[EventType]
public record AuthorRegistered(AuthorName Name);
[ReadModel, FromEvent<AuthorRegistered>]
public record Author([property: Key] AuthorId Id, AuthorName Name)
{
// This static method *is* the query — exposed over HTTP automatically.
public static ISubject<IEnumerable<Author>> AllAuthors(IMongoCollection<Author> c) => c.Observe();
}

Cratis is modular. For a new information system, the default path is Chronicle + Arc + Components. For an existing system, a bounded CRUD slice, or a frontend/backend contract problem, you can adopt the pieces separately and still keep the same conventions.

If you need…Start here
A durable history of what happenedChronicle
A language-neutral event-store boundaryChronicle architecture
MongoDB, PostgreSQL, SQL Server, or SQLite storageChronicle storage
Typed commands, queries, and generated React proxiesArc
Forms, dialogs, and data tables wired to ArcComponents
Authentication, tenant resolution, identity enrichment, and routingAuthProxy
A way to inspect a running storeCLI
AI guidance for building and operating the stackAI-native development
A guided adoption path from an existing appAdopting Cratis
A role-based route through the docsLearning paths
Runtime, package, and storage compatibilityVersion compatibility
A production deployment checklistProduction readiness
Help choosing a path, debugging setup, or talking through a designCommunity and help
Dedicated training, architecture review, or implementation helpProfessional help
A place to suggest improvements or report confusing docsFeedback and suggestions

Coming from a familiar architecture? Start with the bridge that matches the shape of your code: CRUD / EF Core, MediatR, MVC, and Arc, or PrimeReact and Components.