Cratis Templates
The Cratis Stack
Start your Cratis app with the conventions already in place
Every Cratis application follows the same conventions: vertical slices, model-bound commands and queries, events as facts, read models projected from the log. The Cratis templates give you a working application with those conventions already in place — a real project you can run in minutes, not a blank folder you fill in from documentation.
Install the templates once per machine, then follow Getting started to scaffold and run your first application:
dotnet new install Cratis.TemplatesCratis.Templates contains every template, including the Kotlin and Java versions of the full-stack application: dotnet new cratis --language Kotlin or --language Java selects them. The JVM templates are also published on their own as Cratis.Templates.Kotlin and Cratis.Templates.Java, and the Cratis CLI can scaffold every template with cratis new.
The templates
Section titled “The templates”The full-stack starting point: ASP.NET Core with Arc commands and queries, Chronicle event sourcing, and a React frontend with generated TypeScript proxies — wired together in vertical slices.
Cratis Kotlin ApplicationThe same full-stack application on Spring Boot, authored in Kotlin — Arc commands and queries, Chronicle event sourcing, TypeScript proxy generation through the Arc Gradle plugin, and a React frontend.
Cratis Java ApplicationThe same full-stack application on Spring Boot, authored in Java — records as commands and read models, Chronicle event sourcing, TypeScript proxy generation through the Arc Gradle plugin, and a React frontend.
Chronicle WebA minimal ASP.NET Core application connected to Chronicle — events in, projections out, no frontend. The smallest possible server-side starting point.
Chronicle ConsoleA console application that appends an event and observes it through a projection and a reactor. The shortest path to seeing Chronicle move.
Cratis AspireThe full-stack web application, composed with .NET Aspire — the same vertical slices with an orchestrated development topology.
Package versions
Section titled “Package versions”- .NET templates. The template source references Cratis packages with a floating
Version="*". When you scaffold, the post-creation actions add those packages at their current release and write the concrete version into the generated.csproj, so your project stays on the versions it was created with until you update them like any other package. - Kotlin and Java templates.
build.gradle.ktsrequests the Arc Gradle plugin (io.cratis.arc) and theio.cratis:cratisdependency aslatest.release. Gradle resolves them when it builds, andio.cratis:cratisbrings the matching Chronicle client with it, so you do not choose the Arc and Chronicle pairing yourself. Gradle caches a dynamic version for up to 24 hours by default;./gradlew build --refresh-dependenciespicks up a release published since. For reproducible builds, replacelatest.releasewith an exact version, or use Gradle dependency locking. - Frontend.
package.jsonuses caret ranges. Commit the lockfile your package manager writes to record exactly what you installed.
What the application templates have in common
Section titled “What the application templates have in common”The full-stack templates (cratis in C#, Kotlin, or Java, and cratis-aspire) share one shape:
- Vertical slices. Each behavior is one slice: the command or query, the events it produces, and the React component that calls it through a generated TypeScript proxy. In the C# templates all of it shares one folder. In Kotlin and Java the backend slice lives under
src/main/, its React components underSomeModule/, and the proxies underbuild/generated/arc-proxies/. - Model-bound by default. Commands and queries are plain records the framework maps to HTTP routes; there are no controllers to write.
- Local infrastructure included.
cratisships adocker-compose.ymlthat starts the Chronicle development image (MongoDB bundled) and an Aspire dashboard.cratis-aspirestarts Chronicle from its Aspire app host instead. - AI-ready. Every template, including the two Chronicle client templates, ships a
.cratis/ai.jsonthat selects its Cratis AI profiles, languages, and coding-agent harnesses. Runcratis ai updateafterdotnet newto install the guidance;cratis newdoes it for you. See Cratis AI in the CLI. - Builds clean. The .NET sample code compiles with zero warnings under the Cratis analyzers, so the first warning you see is your own.
Learn more
Section titled “Learn more”- Chronicle documentation — the event-sourcing database at the center of the stack.
- Arc documentation — the CQRS application framework the web templates build on.
- The Cratis AI skills teach coding agents these same conventions.