Skip to content

Cratis Platform FAQ: event sourcing and CQRS

If your team needs to explain how a business record reached its current state, build a new view from its history, or find frontend usages affected by a backend contract change, the answers below explain how Cratis Platform supports those results and where its responsibilities stop. Cratis Chronicle records events and derives read models, views shaped for particular questions. Cratis Arc separates changes from reads through Command Query Responsibility Segregation (CQRS) and generates typed frontend clients; Cratis Components supplies React UI compositions for those contracts. Compare product responsibilities or choose a learning path for a first task.

Where do I start if I want to build something today?

Section titled “Where do I start if I want to build something today?”

It depends on what you want to see working first:

  • A full-stack .NET application: follow Build a full-stack feature. It scaffolds an app from the Cratis template and adds one slice from command to live React screen.
  • Only the event store: follow Chronicle getting started. It starts a local kernel and shows one event reaching a projection and a reactor in each client language.
  • A reading order for your role: pick a route from Learning paths.
  • A design before the code: read Event modeling. It shows the notation and how each block maps onto Cratis. For a shared modeling workspace, use the optional paid Cratis Studio.

Chronicle runs as a separate kernel that your application connects to. For local development the quickest route is Chronicle’s development container image, which bundles MongoDB and the Workbench, so you need Docker. Choose an application host model also covers Docker Compose and .NET Aspire.

The rest depends on your language:

You are building You need
The C# full-stack web template The .NET 11 SDK, Node.js for the React frontend, and Docker
The Kotlin or Java full-stack template A JDK 17 (the Gradle toolchain is pinned to Java 17 and does not download one, so a newer JDK alone fails), Node.js ^20.19.0 or >=22.12.0, and Docker
A standalone TypeScript, Kotlin/Java, or Elixir client Your client’s toolchain (see its setup guide) and a running kernel

To scaffold, you need either the .NET SDK (for dotnet new) or the Cratis CLI (for cratis new). The CLI is available as a native binary on macOS and Linux, so a Kotlin or Java project can be scaffolded there without the .NET SDK. On Windows the CLI installs as a .NET global tool, which needs the SDK. Building and running a C# project always needs the .NET SDK.

No. Chronicle’s kernel speaks gRPC, and it ships TypeScript, Kotlin/Java, and Elixir clients in addition to the .NET SDK; Which languages can talk to Chronicle? lists the packages. Arc has TypeScript on Node.js, Kotlin and Java on Spring Boot, and Elixir on Plug, Phoenix or LiveView backends. The Cratis Kotlin and Cratis Java templates scaffold full-stack applications. On macOS and Linux, the Cratis CLI’s cratis new can scaffold those projects without the .NET SDK installed.

Choose a Chronicle client and check Arc backend capabilities for your runtime. Some examples are specific to C#; their attributes and hosting APIs are not required by other backends.

How do event sourcing and CQRS connect to a React frontend?

Section titled “How do event sourcing and CQRS connect to a React frontend?”

A user can submit a change and see its projected result in a live React view. Cratis Arc handles the command, Cratis Chronicle records the resulting event and projects it into a read model, and an Arc query exposes that view through a generated TypeScript client. React consumes the client; Cratis Components supplies compositions such as command dialogs and data pages. Projection processing is asynchronous, so command success does not mean the view is already updated. The full-stack feature tutorial follows this path from registering an author to displaying the author in a list.

Can I see how the current state came to be?

Section titled “Can I see how the current state came to be?”

Yes, where the changes and their context were recorded as events. Chronicle keeps sequence numbers and correlation, identity, and causation context alongside events, so you can trace the facts behind a view. Ordering is within an event sequence; context must be supplied and propagated. This does not reveal unrecorded human reasons or provide a read/access security audit. See Event context and inspect the recorded events in Workbench.

Can I add a new view over existing history?

Section titled “Can I add a new view over existing history?”

Yes, if the facts it needs were recorded and remain available. Chronicle can derive multiple focused read models from the same events and rebuild a view through projection replay where supported. Views update asynchronously; a full replay makes its observer inactive until catch-up. Plan capacity, failures, and side effects rather than treating replay as a risk-free change. See Projections and Observers and replay.

What frontend drift does generation catch?

Section titled “What frontend drift does generation catch?”

After you regenerate the clients and type-check the frontend, a backend field rename can reveal typed frontend usages that need changing. Arc generates TypeScript command/query clients and referenced types from backend declarations; Components consumes those contracts. Stale generated files or a skipped type-check defeat that check. It does not establish runtime serialization, routing, authorization, deployed-version compatibility, or business correctness; check the running integration separately. See Understanding the proxy boundary.

No. You can add typed commands, queries, and frontend contracts to a feature without moving its writes to an event log. Arc supports CQRS over current-state storage without Chronicle, the event-sourcing engine. Components can be used with Arc-generated proxies, and Fundamentals provides shared .NET and TypeScript utilities. Choose the part your feature needs; the whole platform is not a prerequisite.

Start with Adopting Cratis and CQRS without event sourcing.

Your team can put expected behavior in one model to discuss before implementation. Event modeling maps how information moves from screens and commands to events and read models over time. Cratis Screenplay expresses that design in a text-based .play file; the optional paid Cratis Studio gives developers, domain experts, and product owners a shared visual workspace. Start with event modeling, then choose Screenplay or Studio for authoring.

How does spec-driven development work with Cratis?

Section titled “How does spec-driven development work with Cratis?”

You can check supported examples of expected behavior before implementing the feature. Spec-driven development with Cratis starts with an event model and Given/When/Then examples of the required behavior. Cratis Screenplay checks supported scenarios with its in-memory reference evaluator. Code-side specifications test the implementation separately; a passing model scenario does not verify application code. Follow Spec-driven development for the model-to-code workflow.

No. Event sourcing is a strong default for information systems that care about history, decisions, audit, process, replay, and integration. It is not automatically worth it for static lookup tables or settings screens where the current value is the whole story.

Read When to use event sourcing and CRUD, EF Core, and Chronicle.

Yes. You can record event history and derive views in a service, worker, or API without adopting an application framework. Chronicle has its own clients and hosting model. Arc adds commands, queries, and generated frontend proxies, but is not required.

Start with Chronicle getting started and Chronicle architecture.

Chronicle is an event-sourcing database with a language-agnostic gRPC/protobuf boundary. Clients include TypeScript (@cratis/chronicle on npm), Kotlin/Java (io.cratis:chronicle on Maven Central, including a Spring Boot starter), Elixir (cratis_chronicle on Hex), and .NET (Cratis.Chronicle on NuGet), plus a Go client (github.com/cratis/chronicle.go, v0.x, without observers and projections yet). A Python client is not yet published. Any language can implement the gRPC contracts directly.

See Chronicle in your language and the client SDK docs.

Cratis Arc provides CQRS backends for TypeScript on Node.js, Kotlin or Java on Spring Boot, Elixir on Plug, Phoenix or LiveView, and C# on ASP.NET Core, with generated TypeScript clients for the frontend. Start with CQRS in TypeScript, Kotlin and Java, Elixir, or C#; check Arc.Go separately for Go capabilities. These implementations do not have identical feature coverage; compare Arc backends before choosing one.

Yes. You can give a feature typed full-stack CQRS while keeping current-state persistence, whether or not you later adopt event sourcing. Arc supports commands, queries, validation, generated TypeScript proxies, and integrations over that persistence. Choose a supported store and configure hosting and generation; this is not a drop-in migration.

Read CQRS without event sourcing, or see CQRS with Arc in C# and .NET, TypeScript and Node.js, Kotlin and Java, and Elixir.

The products include production-oriented pieces such as TLS configuration, storage configuration, OpenTelemetry, deployment guidance, and operational CLI diagnostics. You still need to make deliberate choices about version tags, storage, backups, secrets, identity, replay, monitoring, and incident handling.

Use Production readiness as the cross-stack checklist.

How can an immutable event log support GDPR erasure?

Section titled “How can an immutable event log support GDPR erasure?”

You can make protected personal values unreadable while retaining the sequence of business events. Cratis Chronicle encrypts values marked as personally identifiable information (PII) with a key tied to the data subject. Erasing the subject deletes its key revisions and fences reprovisioning, preserving event order and non-PII fields. Mark values before appending: adding a marker later does not protect historical plaintext. Repeat erasure in each relevant namespace and resolve partial failures; your process must also handle stale read models, backups, and downstream copies. This mechanism is not a compliance certification. Read Event sourcing and GDPR and Chronicle compliance for the mechanism and your remaining responsibilities.

Where do authentication and authorization belong?

Section titled “Where do authentication and authorization belong?”

Cratis AuthProxy can authenticate requests and resolve tenant context at the edge. Cratis Arc authorizes commands and queries before they execute; Cratis Chronicle stores tenant events in namespaces and protects PII. Your application must still check that callers belong to the tenant they select. Follow Auth and compliance end to end to assign these responsibilities, and Security for private vulnerability reporting.

How should I evaluate performance and scalability?

Section titled “How should I evaluate performance and scalability?”

Measure the workload you intend to run: event appends, projection lag, query latency, and replay on your chosen storage and deployment. A client language or database choice alone does not establish throughput. Use Production readiness to plan indexes, monitoring, replay, and recovery before deployment.

Chronicle documents MongoDB, PostgreSQL, Microsoft SQL Server, and SQLite as storage options. Arc integrates with MongoDB and Entity Framework Core for application persistence.

See Chronicle storage, Arc MongoDB, and Arc Entity Framework Core.

How does Cratis compare to MediatR, MVC, EF Core, Marten, or Wolverine?

Section titled “How does Cratis compare to MediatR, MVC, EF Core, Marten, or Wolverine?”

Cratis is not a single library replacement. Chronicle is an event-sourcing engine; Arc is a CQRS and proxy-generation framework; Components is a React library built around those generated contracts. The comparisons are about architecture shape more than API surface.

Wolverine appears in the .NET comparison as the Critter Stack’s messaging and web framework next to Marten; there is no separate Wolverine-to-Arc comparison.

What does Cratis cost, and what license is it under?

Section titled “What does Cratis cost, and what license is it under?”

Chronicle, Arc, Components, the Cratis CLI, and Fundamentals are open-source products licensed under MIT and free to use. That does not describe every Cratis offering: Studio is a paid product with a 14-day free trial, per-seat pricing, and its own service terms. Direct is a separately offered product; its public site does not state service pricing. For dedicated, private help, see Professional help.

Your team can discuss and edit expected behavior together in one model with Cratis Studio, an optional paid workspace for Screenplay event models, specifications, and screens. It is built on Chronicle, but you do not need Studio to use Chronicle, Arc, or Components. Sign-up is open with a 14-day free trial; open the app or read the Studio overview.

With Cratis Direct, your team can set how far agent work may progress and inspect the evidence behind each next step. It is the control plane for agentic engineering: a person sets the progression ceiling, and journeys, gates, and recorded evidence govern work across five loops: Deliver, Assure, Operate, Publish, and Steer. Effective governance depends on the rules you activate; an LLM judgment is not proof. Direct is GitHub-first, lets you bring your own model provider, and is event-sourced on Chronicle. See the Direct product overview.

Cratis AI supplies assistant conventions and workflows; Direct coordinates and governs agent work. The public Direct documentation currently covers the Direct Agent Runner, which runs scheduled workers locally in Docker and requires Direct access. A maintainer approves the runner under Settings → Runners in Direct. It is not a standalone replacement for Direct.

Direct runs Cratis’s own engineering today. Access opens in stages to accounts Cratis has enabled. Enabled users sign in with GitHub at app.cratis.direct; a GitHub account alone does not grant access.

Yes. Cratis AI gives an agent the conventions, the Chronicle MCP server and the CLI let it inspect a running store, and specifications check what it writes. The MCP server is read-only by default. Agentic development with event sourcing explains the workflow and its limits; AI-native development covers the setup.

Use Community and help for open questions, Feedback and suggestions for product and docs feedback, GitHub issues for durable bugs and feature requests, and Professional help when you need private, dedicated time.

Use What’s new for curated release digests and links to repository releases.