Cratis.Stage
1.0.1
Prefix Reserved
dotnet add package Cratis.Stage --version 1.0.1
NuGet\Install-Package Cratis.Stage -Version 1.0.1
<PackageReference Include="Cratis.Stage" Version="1.0.1" />
<PackageVersion Include="Cratis.Stage" Version="1.0.1" />
<PackageReference Include="Cratis.Stage" />
paket add Cratis.Stage --version 1.0.1
#r "nuget: Cratis.Stage, 1.0.1"
#:package Cratis.Stage@1.0.1
#addin nuget:?package=Cratis.Stage&version=1.0.1
#tool nuget:?package=Cratis.Stage&version=1.0.1
Cratis Stage
Stage takes an authored event model — the intermediate JSON format produced by Cratis Studio or any other tool — and materializes it into a live, running Cratis application at runtime: dynamically generated commands and queries (Arc), read models and projections (Chronicle), and a Scalar/OpenAPI surface. No code generation, no compilation — the model is the application.
Stage is self contained: it has no dependency on Studio. It is consumed as containers (the host and the specification runner) and as a NuGet package (the contracts) from Studio, the Cratis CLI, or your own tooling.
Projects
| Project | Package / Image | Purpose |
|---|---|---|
Source/Contracts |
Cratis.Stage.Contracts (NuGet) |
The event model intermediate format (with its embedded JSON schema), specification run results, and the serialization for both (EventModelFile, SpecificationRunResultsFile, StageJson). |
Source/Stage |
Cratis.Stage (NuGet) |
The engine — synthesizes commands, queries, validators, read models, and projections from a deserialized EventModel at runtime. |
Source/Host |
cratis/stage (Docker) |
Self-contained play sandbox: MongoDB + Chronicle kernel + the Stage engine in one container. Mount a model at /eventmodel, get a live API on port 9090. |
Source/SpecRunner |
cratis/stage-specrunner (Docker) |
Run-to-completion job that loads an event model from the mounted /model folder, runs its specifications and writes results.json to the mounted /output folder. |
Consuming
Everything Stage needs as input is a serialized EventModel — the types and the exact serialization live in
Cratis.Stage.Contracts, so consumers write the file with EventModelFile.Write(model) and never hand-roll JSON.
Studio / CLI ──(event-model.json)──▶ cratis/stage ⇒ live HTTP API (port 9090)
Studio / CLI ──(event-model.json)──▶ cratis/stage-specrunner ⇒ results.json
- The host takes the model file path as its first argument (the container entrypoint finds it in
/eventmodel). Deployment configuration can be supplied through a dedicatedcratis-stage.jsonfile (path overridable with theSTAGE_CONFIGenvironment variable) instead ofappsettings.json. - The spec runner takes
--model <file>and--output <file>, with optional--slice <guid>/--spec <guid>filters; the container defaults to/model/event-model.jsonand/output/results.json.
Building
dotnet build # Debug
dotnet test # run specs
dotnet build -c Release # Release — treat warnings as errors
Container images are built from the repository root:
docker build -f Source/Host/Dockerfile -t cratis/stage .
docker build -f Source/SpecRunner/Dockerfile -t cratis/stage-specrunner .
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Cratis (>= 20.54.3)
- Cratis.Arc.MongoDB (>= 20.54.3)
- Cratis.Chronicle.Contracts (>= 16.0.3)
- Cratis.Stage.Contracts (>= 1.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1 | 48 | 7/15/2026 |