Arc
Arc
CQRS application framework for ASP.NET Core, Spring Boot, and Node.js
Arc is an opinionated CQRS application framework with commands, queries, validation, authorization, and TypeScript proxy generation. Write the backend in C#, Kotlin or Java, or the TypeScript source preview; each can generate a typed frontend client. Event sourcing is not required.
Start here
Section titled “Start here”When commands, queries, validation, authorization, frontend contracts, and persistence each grow their own conventions, Arc gives them one application boundary. Start with current-state persistence or application services. Add Chronicle only where event sourcing fits, and add Components only where its React compositions fit.
Add Arc to an ASP.NET Core, Spring Boot, or TypeScript host.
Commands and queriesExecute changes, expose reads, and generate the client contracts for both.
Frontend contractsUse the generated TypeScript runtime directly or compose it with React.
Persistence choicesKeep current state in application services, MongoDB, or EF Core, or add Chronicle.
Start an Arc host
Section titled “Start an Arc host”Arc runs on ASP.NET Core and Spring Boot; a third implementation for TypeScript on Node.js is a source preview with no published npm package or full parity yet. Choose a backend below and check its capabilities before relying on a shared example. The shared HTTP contract is verified for C# and JVM; TypeScript’s coverage is documented separately.
Starting the host verifies the setup path only. Commands, queries, generated proxies, persistence integrations, and frontend packages each have additional configuration and version requirements.
Commands and queries
Section titled “Commands and queries”Arc supports model-bound records and methods as well as controller-based endpoints. The command and query pipelines handle dependency injection, validation, authorization, filters, execution scopes, result conversion, and HTTP exposure in C# and on the JVM. TypeScript implements a subset of these capabilities; consult its capability reference. The scenario recipes show the same task, such as validating a command, with backend examples where the capability is available.
Queries can return one result or use Arc’s observable-query APIs. The TypeScript generator creates clients for recognized commands, queries, referenced types, validation rules, and identity details. See the detailed product documentation for the exact transport, subscription, and lifecycle behavior.
Frontend contracts
Section titled “Frontend contracts”@cratis/arc supplies the TypeScript command, query, validation, identity, and
messaging runtime used by generated proxies. @cratis/arc.react adds hooks,
command forms, dialog infrastructure, identity composition, and query components. The composed CommandDialog used in the tutorial comes from the separate @cratis/components package. The optional
React/MVVM package adds view models, dependency injection, route parameters, and
browser abstractions.
Explore Arc’s frontend packages to choose the TypeScript, React, or React/MVVM path. Components is separate: applications may use Arc without Components, and may use the generated TypeScript clients without Arc’s React packages.
Identity and tenancy
Section titled “Identity and tenancy”Arc includes pluggable identity and access behavior, identity-detail providers, server-side authorization and role checks, and frontend identity context. Tenant resolution can use a header, query parameter, claim, subdomain, fixed value, or development setting before provider-specific database or namespace mapping — see tenancy on C# or tenancy on Kotlin and Java.
Frontend visibility helpers do not replace server-side authorization. Tenant resolution also does not by itself establish isolation for an application or storage topology.
Persistence choices
Section titled “Persistence choices”Arc does not depend on Chronicle. Commands and queries can use application services or current-state persistence without an event log. Each backend integrates with the data access its own ecosystem already uses.
Inspection, contracts, and testing
Section titled “Inspection, contracts, and testing”Arc can describe registered commands, queries, identity schemas, and OpenAPI operations at runtime. Repository packages also include analyzers, source generators, command-scenario testing, proxy-generation checks, Vite helpers, and Arc-specific ESLint rules.
- Inspect registered application contracts (C#) — commands, queries and identity schemas are also introspectable on Kotlin and Java; a dedicated guide is not yet published
- Generate OpenAPI descriptions: C# or Kotlin and Java
- Test command behavior: C#, Kotlin and Java, or TypeScript preview
- Review analyzer rules: C# Roslyn analyzers or Kotlin KSP diagnostics
Continue
Section titled “Continue”Repository structure, package roles, contribution guidance, and current limits.
Arc packages (C#)Published .NET package metadata and versions.
Arc packages (Kotlin and Java)Published Maven Central package metadata and versions.
ChronicleThe optional event-sourced runtime integration for Arc application behavior.
ComponentsOptional React components aligned with Arc application patterns.