Skip to content

Understand how today's state came to be

Keep the facts behind a change, build new views from recorded history, and find the typed frontend code a backend contract change affects. Start with the outcome your team needs.

Cratis Platform helps teams explain current state from recorded facts, answer new questions from that history, and check which typed frontend usages a backend contract change affects. It is a set of tools for building information systems with event sourcing, Command Query Responsibility Segregation (CQRS), and React interfaces. You can start with one product or connect them in a full-stack application.

Explain how a change happened

Keep the sequence of business facts behind today’s state. Cratis Chronicle stores changes as events with sequence numbers and correlation, identity, and causation context. That explains the facts and context you recorded, not every human reason or a separate read/access audit.

Build a new view from existing history

Answer another question with a focused read model. Chronicle projections derive multiple views from the same events; supported replay rebuilds a view from available history. Projections update asynchronously, and replay cannot recover facts you never recorded.

Find frontend code a contract change affects

Regenerate the TypeScript clients after a backend change, then type-check the frontend for incompatible typed usages. Cratis Arc separates changes into commands and reads into queries, and generates those clients. Cratis Components uses the contracts in React. This check does not replace runtime integration checks.

A shopping cart records items added and removed. A caller needs a different answer: what is in this cart now? A projection derives that answer from the events and stores it as a read model, a view of the data shaped for a particular question. The history remains available when you need to explain how the cart reached that state.

Start with the first-projection C# code walkthrough. Follow one cart id from recorded facts to a projected cart summary, then see how a checkout fact changes that summary. The example checks the append and waits for processing before reading the cart. This is a console source walkthrough, not an HTTP backend or a running React screen. To run it, follow the sample’s setup instructions.

When the feature needs an API and a screen, Arc exposes its commands and queries and generates the TypeScript proxies your React code calls. Components supplies forms, dialogs, and tables that consume them. For a C# backend, changing a contract, regenerating its proxies, and type-checking the frontend reveals incompatible typed usages. That check does not replace runtime integration checks.

Build a full-stack feature follows this handoff from a command to an event, a read model, and a React screen. It is a separate API/UI journey, not a hidden requirement of the cart walkthrough. Once an event-sourced application is running, use the CLI to inspect events and processing state. Cratis AI supplies conventions and diagnostics for an assistant; you still review its changes.

To discuss what the feature should do before implementing it, keep its design in Cratis Screenplay, a text-based .play model of commands, events, views, and specifications. Cratis Studio lets a team edit that model together. The model can feed source generation as well as implementation by hand, so the design does not have to stop at a diagram. Generated output needs review, and supported constructs and languages depend on the tool you choose.

Run an event model as an application sandbox

Section titled “Run an event model as an application sandbox”

Before implementing a feature, you can send a command and see its resulting state in Stage from the same Screenplay model. Stage runs the supported subset as a disposable sandbox, not a production host; keep published ports bound to 127.0.0.1.

You can adopt Chronicle without Arc, use Arc without event sourcing, and leave Components out of the frontend. Adopting Cratis helps choose that boundary; Why developers choose Cratis discusses the reasons and trade-offs. For a route matched to your work, choose a learning path: new to event sourcing, building a full-stack app, evaluating the platform, operating Chronicle, or joining a frontend team. The Platform capability map compares product responsibilities and terms.

If you need to erase protected personal values without discarding the event sequence, event sourcing and GDPR explains Chronicle’s mechanism and the responsibilities it leaves with your application.

Carry a typed contract into the screen

Use Arc for the command/query boundary and Components for React forms, dialogs, and tables that consume its generated contracts.

Agree what a feature should do

Studio is a paid workspace built on Chronicle where developers, domain experts, and product owners edit Screenplay event models together. It is optional for application development. Sign up for a 14-day free trial and see per-seat pricing.

Set stopping points for agent work

Decide how far work may proceed and inspect the evidence behind its next step. Cratis Direct coordinates agentic engineering through progression ceilings, journeys that define stages of work, and gates that evaluate recorded evidence. Governance depends on the rules you activate; people retain review and approval responsibilities. It runs Cratis’s own engineering today. Access opens in stages to enabled accounts, who sign in with GitHub; a GitHub account alone does not grant access. The public Direct docs cover the Direct Agent Runner.

Read another example

Browse Cratis samples for application examples and their setup instructions.

Product repositories own their technical documentation, examples, packages, and released contracts. This site aggregates that material into one searchable set of tutorials, guides, explanations, and references.