Skip to content

Arc

Arc

CQRS application framework for ASP.NET Core

Arc is an opinionated CQRS application framework for ASP.NET Core with commands, queries, validation, authorization, and TypeScript proxy generation. Event sourcing is not required.

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.

Use the .NET SDK declared by Arc’s current global.json.

  1. Install the umbrella host package.

    Terminal window
    dotnet add package Cratis.Arc
  2. Configure and run the host.

    using Cratis.Arc;
    var builder = ArcApplication.CreateBuilder(args);
    builder.AddCratisArc();
    var app = builder.Build();
    app.UseCratisArc();
    await app.RunAsync();
  3. Confirm the application starts on the selected SDK/package profile.

Starting the host verifies the setup path only. Commands, queries, generated proxies, persistence integrations, and frontend packages each have additional configuration and version requirements.

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.

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.

@cratis/arc supplies the TypeScript command, query, validation, identity, and messaging runtime used by generated proxies. @cratis/arc.react adds hooks, command forms, dialogs, identity composition, and query components. 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.

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.

Frontend visibility helpers do not replace server-side authorization. Tenant resolution also does not by itself establish isolation for an application or storage topology.

Arc.Core does not depend on Chronicle. Commands and queries can use application services or current-state persistence without an event log.

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.