![]() |
VOOZH | about |
dotnet add package Cratis.Chronicle.XUnit.Integration --version 15.34.11
NuGet\Install-Package Cratis.Chronicle.XUnit.Integration -Version 15.34.11
<PackageReference Include="Cratis.Chronicle.XUnit.Integration" Version="15.34.11" />
<PackageVersion Include="Cratis.Chronicle.XUnit.Integration" Version="15.34.11" />Directory.Packages.props
<PackageReference Include="Cratis.Chronicle.XUnit.Integration" />Project file
paket add Cratis.Chronicle.XUnit.Integration --version 15.34.11
#r "nuget: Cratis.Chronicle.XUnit.Integration, 15.34.11"
#:package Cratis.Chronicle.XUnit.Integration@15.34.11
#addin nuget:?package=Cratis.Chronicle.XUnit.Integration&version=15.34.11Install as a Cake Addin
#tool nuget:?package=Cratis.Chronicle.XUnit.Integration&version=15.34.11Install as a Cake Tool
<div align="center"> <a href="https://cratis.io"> <img src="full-logo.png" alt="Cratis Chronicle" width="480"> </a>
<h3 align="center">Cratis Chronicle</h3>
<p align="center"> An Event Sourcing database for .NET โ built with ease of use, productivity, compliance, and maintainability in mind. <br /> <a href="https://cratis.io"><strong>Explore the docs ยป</strong></a> <br /> <br /> <a href="https://github.com/cratis/samples">View Samples</a> ยท <a href="https://github.com/cratis/chronicle/issues/new?labels=bug">Report a Bug</a> ยท <a href="https://github.com/cratis/chronicle/issues/new?labels=enhancement">Request a Feature</a> ยท <a href="https://discord.gg/kt4AMpV8WV">Join the Discord</a> </p>
<p align="center"> <a href="https://discord.gg/kt4AMpV8WV"> <img src="https://img.shields.io/discord/1182595891576717413?label=Discord&logo=discord&color=7289da" alt="Discord"> </a> <a href="http://nuget.org/packages/cratis.chronicle"> <img src="https://img.shields.io/nuget/v/Cratis.Chronicle?logo=nuget" alt="NuGet"> </a> <a href="https://hub.docker.com/r/cratis/chronicle"> <img src="https://img.shields.io/docker/v/cratis/chronicle?label=Chronicle&logo=docker&sort=semver" alt="Docker"> </a> <a href="https://github.com/Cratis/Chronicle/actions/workflows/dotnet-build.yml"> <img src="https://github.com/cratis/Chronicle/actions/workflows/dotnet-build.yml/badge.svg" alt="C# Build"> </a> <a href="https://github.com/Cratis/Chronicle/actions/workflows/publish.yml"> <img src="https://github.com/cratis/Chronicle/actions/workflows/publish.yml/badge.svg" alt="Publish"> </a> <a href="https://github.com/Cratis/Documentation/actions/workflows/pages.yml"> <img src="https://github.com/Cratis/Documentation/actions/workflows/pages.yml/badge.svg" alt="Documentation site"> </a> </p> </div>
Cratis Chronicle is an Event Sourcing database that captures every state change in your system as an immutable sequence of events โ rather than storing only the current state. This unlocks powerful capabilities like full audit trails, time-travel debugging, and event-driven architectures without the usual complexity.
Chronicle ships with:
For core values and principles, read our core values and principles.
| Immutable Event Store | Every state change is persisted as an immutable event โ nothing is ever overwritten |
| Event Streams | Organized per aggregate or entity, with full history preservation |
| Schema Evolution | Strongly-typed event definitions with support for evolving schemas over time |
| Rich Metadata | Timestamps, correlation IDs, causation IDs, and custom tags on every event |
| Reactors | React to events as they occur โ ideal for side effects and if-this-then-that scenarios |
| Reducers | Imperatively transform events into typed read models, managed by Chronicle |
| Projections | Declarative, fluent read-model builders with join, set, and remove support |
| Observers | Low-level event subscriptions with guaranteed delivery |
| Multi-tenancy | First-class namespace support for isolated tenant data |
| Constraints | Server-side integrity rules enforced at append time |
| Compliance | Full audit trails and data lineage for regulatory requirements |
| Revision | Built-in support for correcting past events |
| Convention-based | Minimal configuration โ artifacts are discovered automatically by naming convention |
| DI Native | First-class support for ASP.NET Core dependency injection |
| Strong Typing | End-to-end C# types from events through projections to read models |
| Testing Utilities | In-memory providers and test helpers for unit and integration testing |
Note: The
latest-developmentChronicle image bundles both Chronicle and MongoDB in a single container โ no separate database setup needed.
Option 1 โ Docker CLI:
docker run -d --name chronicle \
-p 35000:35000 \
-p 8080:8080 \
cratis/chronicle:latest-development
Option 2 โ Docker Compose:
services:
chronicle:
image: cratis/chronicle:latest-development
ports:
- "35000:35000" # gRPC / API
- "8080:8080" # Web Workbench
docker compose up -d
Add the NuGet package to your .NET project:
# ASP.NET Core
dotnet add package Cratis.Chronicle.AspNetCore
# Console / Worker Service
dotnet add package Cratis.Chronicle
Program.cs)var builder = WebApplication.CreateBuilder(args)
.AddCratisChronicle(options => options.EventStore = "MyApp");
var app = builder.Build();
app.UseCratisChronicle();
app.Run();
[EventType]
public record UserOnboarded(string Name, string Email);
[EventType]
public record BookAddedToInventory(string Title, string Author, string ISBN);
// Inject IEventLog or grab it from the event store
await eventLog.Append(Guid.NewGuid(), new UserOnboarded("Jane Doe", "jane@example.com"));
await eventLog.Append(Guid.NewGuid(), new BookAddedToInventory("Domain-Driven Design", "Eric Evans", "978-0321125217"));
public class UserNotifier : IReactor
{
public async Task Onboarded(UserOnboarded @event, EventContext context)
{
// send welcome email, provision resources, etc.
Console.WriteLine($"Welcome, {@event.Name}!");
}
}
public class BooksReducer : IReducerFor<Book>
{
public Task<Book> Added(BookAddedToInventory @event, Book? current, EventContext context) =>
Task.FromResult(new Book(
Guid.Parse(context.EventSourceId),
@event.Title,
@event.Author,
@event.ISBN));
}
public class BorrowedBooksProjection : IProjectionFor<BorrowedBook>
{
public void Define(IProjectionBuilderFor<BorrowedBook> builder) => builder
.From<BookBorrowed>(from => from
.Set(m => m.UserId).To(e => e.UserId)
.Set(m => m.Borrowed).ToEventContextProperty(c => c.Occurred))
.Join<BookAddedToInventory>(b => b
.On(m => m.Id)
.Set(m => m.Title).To(e => e.Title))
.RemovedWith<BookReturned>();
}
Full working samples are available in the Samples repository.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Your .NET Application โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Events ยท Reactors ยท Reducers ยท Projections โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ Chronicle Client SDK โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ gRPC
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Chronicle Kernel โ
โ โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โ
โ โ Event Store โ โ Projection โ โ Web โ โ
โ โ (MongoDB) โ โ Engine โ โ Workbench โ โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Chronicle follows a client-server model:
| Component | Description |
|---|---|
| Chronicle Kernel | Server that manages event storage, observer dispatch, projection processing, and querying |
| Client SDK | .NET libraries (Cratis.Chronicle / Cratis.Chronicle.AspNetCore) that connect your app to the Kernel |
| MongoDB Backend | Default event and read-model storage; extensible to other providers |
| Web Workbench | Browser-based dashboard available at http://localhost:8080 when running the development image |
Full documentation is available at https://cratis.io.
| Section | Description |
|---|---|
| Get Started | Quick-start guides for Console, Worker Service, and ASP.NET Core |
| Concepts | Events, projections, reactors, reducers, constraints, and more |
| Hosting | Production and development deployment options |
| Configuration | Client and server configuration reference |
| How to build and contribute to Chronicle |
Contributions are what make the open-source community an amazing place to learn, inspire, and create. Any contribution you make is greatly appreciated!
git checkout -b feature/AmazingFeaturegit commit -m 'Add some AmazingFeature'git push origin feature/AmazingFeatureLooking for a good first issue? Check out the contribute page.
For detailed build and development instructions, see the .
You can also browse the code directly in your browser:
๐ Open in VSCode
| Channel | Details |
|---|---|
| ๐ฌ Discord | Join the community on Discord for questions and discussions |
| ๐ GitHub Issues | Report bugs or request features |
Distributed under the MIT License. See for full details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 15.34.11 | 26 | 6/18/2026 |
| 15.34.10 | 46 | 6/18/2026 |
| 15.34.9 | 50 | 6/17/2026 |
| 15.34.8 | 49 | 6/17/2026 |
| 15.34.6 | 121 | 6/12/2026 |
| 15.34.5 | 112 | 6/9/2026 |
| 15.34.4 | 90 | 6/9/2026 |
| 15.34.3 | 91 | 6/9/2026 |
| 15.34.2 | 86 | 6/9/2026 |
| 15.34.1 | 88 | 6/9/2026 |
| 15.33.12 | 86 | 6/9/2026 |
| 15.33.11 | 92 | 6/9/2026 |
| 15.33.10 | 98 | 6/8/2026 |
| 15.33.9 | 91 | 6/8/2026 |
| 15.33.8 | 94 | 6/7/2026 |
| 15.33.7 | 96 | 6/7/2026 |
| 15.33.6 | 105 | 6/7/2026 |
| 15.33.5 | 97 | 6/7/2026 |
| 15.33.4 | 105 | 6/7/2026 |
| 15.33.3 | 108 | 6/5/2026 |