Skip to content

Backend

The backend is where you express what your application does — the commands that change state and the queries that read it. Arc’s job is to make that expression the only thing you write: you define a command or query as a plain record, and Arc handles the HTTP endpoint, validation, authorization, and a typed TypeScript proxy for the frontend. CQRS without the ceremony. In the full Cratis loop those commands append events through Chronicle; in bounded current-state slices they can write MongoDB or EF Core directly.

Arc discovers

proxy generator

commands write

queries read

Command / query record

HTTP endpoint

Typed TS proxy

MongoDB / EF Core

Read models

New to the backend? Walk through Getting started to build your first command and query end to end. Then the two pillars:

  • Commands — intents that change state through Handle().
  • Queries — reads, exposed to the frontend as typed proxies (including live, observable ones).

The magic that ties it to the frontend is Proxy generation — read it early; it’s why the whole stack is type-safe.

Arc meets the rest of your stack:

TopicWhat it covers
MongoDBDocument storage for read models and other data.
Entity FrameworkEF Core integration for relational read models.
ChronicleEvent sourcing integration — append events from commands, build read models, feed state back into business rules.
ASP.NET CoreHow Arc plugs into the ASP.NET Core pipeline.
TopicWhat it covers
CoreCommands, queries, and dependency injection at the lower level.
IdentityWho the user is — authentication and identity details.
TenancyMulti-tenant isolation.
Open APIOpenAPI/Swagger generation.
Code AnalysisAnalyzers and fixers that catch mistakes at compile time.

Building the UI on top? Head to the frontend, which consumes everything here through the generated proxies.