Skip to content

The Cratis Aspire template

The cratis-aspire template is the Cratis Web Application composed with .NET Aspire: the same vertical slices, the same Arc conventions, with the development topology — Chronicle, MongoDB, and your services — orchestrated by an Aspire app host.

Terminal window
dotnet new cratis-aspire -n MyStore

MongoDB is the default database. Pass --Database to scaffold against PostgreSQL, MsSql, or SQLite instead — the app host then provisions the matching database resource and wires the Chronicle container to it (WithPostgreSql, WithMsSql, or WithSqlite), and the backend reads its read models through Entity Framework Core:

Terminal window
dotnet new cratis-aspire -n MyStore --Database PostgreSQL

A solution with three projects instead of one:

ProjectRole
<App>The full-stack web application — Arc backend, Chronicle client, React frontend, the same SomeModule/SomeFeature slices
<App>.CompositionThe Aspire app host: starts a Chronicle container with AddCratisChronicle(), launches the backend, and wires the references
<App>.InfrastructureShared service defaults: OpenTelemetry, resilience, service discovery

Run the composition and Aspire starts the rest:

Terminal window
dotnet run --project MyStore.Composition

The Aspire dashboard opens with all services, their logs, and their telemetry in one place.

Use this template when your team already runs on Aspire, or when you want the local development topology — multiple services, dashboards, resilient HTTP — managed for you from day one. If you want the same application without the orchestration layer, use the plain Cratis Web Application template.

The scaffolded solution includes a .cratis/ai.json with the Cratis AI profiles, languages, and coding agent harnesses for this template — the full-stack selection covering Arc, Chronicle, Components, C#, and TypeScript. Make sure the Cratis CLI is installed, then run:

Terminal window
cratis ai update

That installs the AI rules, skills, and harness integration for the coding agents you selected — AGENTS.md instructions plus .claude/, .cursor/, .github/, .opencode/, and .pi/ integration — and records what it installed in .cratis/ai.manifest.json. dotnet new prints this reminder after scaffolding, and re-running the command only refreshes Cratis-managed files, never yours. See the CLI AI documentation for the full command reference.