Skip to content

The Cratis Aspire template

The cratis-aspire template is the Cratis Web Application composed with Aspire: the same vertical slices and Arc conventions, with Chronicle, its database, and your backend started and wired together by an Aspire app host instead of a docker-compose.yml.

Terminal window
dotnet new cratis-aspire -n MyStore

You need the .NET 10 SDK, Docker (the app host runs Chronicle and any database as containers), and Node.js ^20.19.0 or >=22.12.0 with a package manager for the frontend.

OptionValuesDefault
--DatabaseMongoDB, PostgreSQL, MsSql, SQLiteMongoDB
--Frameworknet10.0net10.0
--SkipAiUpdateInstructionstrue, falsefalse

The app host always runs the Chronicle development image, which carries the development client credentials the backend connects with. With a database other than MongoDB, it also starts a PostgreSQL or SQL Server container (or, for SQLite, uses a chronicle-data folder next to the solution), stores Chronicle’s data there, and gives the backend a connection to the chronicle+<event store> database Chronicle projects read models into. The backend reads them through Entity Framework Core:

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

Unlike cratis, this template has no --packageManager option and does not install frontend dependencies for you.

A solution with three projects instead of one:

ProjectRole
<App>The full-stack web application: Arc backend, Chronicle client, React frontend, and the same SomeModule/SomeFeature slices
<App>.CompositionThe Aspire app host: starts Chronicle with AddCratisChronicle() and any database, launches the backend, and passes it the Chronicle and read-model connections
<App>.InfrastructureShared service defaults: OpenTelemetry, health checks, resilience, and service discovery

dotnet new creates a MyStore solution folder with the web project in a nested MyStore folder. Install the frontend dependencies in the web project, then run the app host from the solution folder:

Terminal window
cd MyStore # the solution folder
cd MyStore # the web project
yarn install
cd ..
dotnet run --project MyStore.Composition

Aspire starts the containers and the backend and prints the dashboard address with a one-time login token, for example https://localhost:57075/login?t=…. The port changes between runs, so open the link from your terminal. The dashboard shows every resource with its logs and telemetry.

For frontend hot reload, run yarn dev in the MyStore folder. Vite serves on http://localhost:9000 and forwards /api, /.cratis, and /swagger to http://localhost:5000.

Use this template when your team already runs on Aspire, or when you want the local development topology, with dashboards, telemetry, and 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 selecting the cratis/application/csharp profile with the C# and TypeScript languages. Make sure the Cratis CLI is installed, then run from the solution folder:

Terminal window
cratis ai update

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