Skip to content

The Cratis Stack

The Cratis Stack

From a sticky note to a running, typed, full-stack app

Most stacks are a bag of libraries you bolt together and then spend the whole project keeping in sync. Developers choose Cratis because the layers are designed as one thing — a domain you model on Monday can become typed C#, authenticated tenant-aware requests, a live React screen, and an inspectable event log by Friday, with event sourcing as the default backbone for information systems and the handoffs handled by conventions, generation, and open runtime boundaries. Start building → · Why developers choose Cratis →

Each product is strong on its own — you can use them separately. The reason to reach for the whole stack is that the seams disappear: CQRS shapes information going in and out, event sourcing keeps the facts underneath, and everywhere you’d normally hand-write glue, Cratis generates it.

  • You model the domain, and Studio will generate the C# for it.
  • You secure the edge, and AuthProxy authenticates, resolves the tenant, enriches identity, and routes requests.
  • You write a command, and Arc generates the typed TypeScript proxy for it.
  • You append an event, and Chronicle accepts it through a gRPC/protobuf boundary, stores it in MongoDB, PostgreSQL, Microsoft SQL Server, or SQLite, and projects the read model from it.
  • You render a screen, and Components consumes the proxy with no API client to write.
  • You run it, and the CLI, Workbench, OpenTelemetry, jobs, recommendations, and replay tools let you watch and operate the event store.

Nothing in that list is a thing you keep in sync. The build does.

Wiring the stack into one host is itself a single call: the Cratis package brings Arc and Chronicle up together with AddCratis/UseCratis, sharing storage, identity, and hosting.

Design, build, operate

The journey, end to end

Read it left to right: a domain idea becomes a secured tenant-aware request, a generated slice, a durable event, a live typed React screen, and an inspectable running system. AI can accelerate the same path because the conventions are explicit.

Authentication, authorization, tenancy, and compliance are separate concerns, but they travel through the same request. AuthProxy authenticates and resolves tenant context. Arc authorizes the command or query. The Arc + Chronicle integration writes events into the tenant’s Chronicle namespace. Chronicle encrypts PII by compliance subject, and Arc releases protected read models before serving query responses.

Auth and compliance end to end shows that flow across the stack: where identity is enriched, where access decisions happen, how subjects differ from event source ids, and what erasure requires after protected data has reached read models.

The same column you draw in an event model is also the shape of the test:

UI/A: AuthorsUI/A: AuthorsC/RM: AuthorsC/RM: AuthorsStream: Authors
RegisterAuthorScreen
RegisterAuthor



authorId: uuid, name: string
AuthorRegistered



name: string
Author
AuthorsScreen

That becomes a BDD-style specification:

GivenWhenThen
no author exists for this idRegisterAuthor runs through Arcthe command succeeds
no author exists for this idRegisterAuthor runs through ArcChronicle records AuthorRegistered
AuthorRegistered existsthe read model projection handles itthe Authors screen can read the author

Cratis Specifications gives that shape a light wrapper over xUnit: Establish() is the given, Because() is the when, and each [Fact] is one then. Arc adds CommandScenario<TCommand> so the command runs through the real pipeline. Chronicle adds in-process scenarios for events, projections, and reactors. Together, you test the slice in the same language you designed it: facts in, command happens, facts and read models out.

Testing with Cratis walks through the packages and the full stack-slice example.

Cratis ships first-class tooling so an AI agent can build and operate the stack alongside you. That works because the stack is intentionally conventional: the same feature shape, naming, generated boundary, Chronicle diagnostics, and CLI command catalog show up across products.

  • cratis init drops the Cratis AI configuration into your repo — agents and skills (like new vertical slice and add projection) that already know the Cratis conventions, so an assistant scaffolds correct slices instead of guessing at the framework.
  • The Chronicle MCP server lets an agent connect to a running store and inspect events, observers, and read models — the same window the CLI gives you, handed to your assistant.

Model in Studio, generate the slices, build them, inspect the result — an agent can take part at every step. AI-native development covers the setup and exactly what an agent can do.