Skip to content
CAI
Software that uses CAICheck a score

brendanzab/chronicle

56.6

Adequate · 21 September 2026

521

lines of production code

Rust

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an event-sourcing framework for Rust that provides core abstractions for domain modeling and event storage. It defines traits for managing aggregates and persisting events, with concrete implementations for in-memory and PostgreSQL backends. The codebase also includes example applications, such as a bank, counter, and todo list, demonstrating how to build stateful services using this pattern.

Features

Add bank example with API and domain models

The bank example now includes a structured API layer defining endpoints for account management (open, deposit, withdraw, close) and money transfers, alongside domain models for accounts and transfers that utilize UUIDs and a Money type. The example exposes a launch function to start the Rocket-based server, providing a concrete implementation of the framework's patterns.

examples/bank · high confidence

Add counter example demonstrating aggregate pattern

Added a new counter example in the examples/counter directory, implementing a simple state machine with increment, decrement, and reset commands. The example demonstrates the use of the Aggregate trait from the chronicle\_domain crate, showing how to handle commands and produce events. The implementation includes state management with bounds checking (0-100) and event application logic.

examples/counter · high confidence

Add in-memory event store implementation

Added a new \chronicle\_memory\ crate providing an in-memory implementation of the \EventStore\ trait. This allows users to store and retrieve events in memory, which is particularly useful for testing scenarios. The implementation supports concurrent access and maintains event ordering via a global offset.

_chronicle\memory · high confidence

Add todo list example API

A new todo list example is introduced, providing a REST API for managing tasks. The API exposes endpoints for creating tasks, changing descriptions, completing, and archiving tasks, all backed by an in-memory event store.

_examples/todo\list/src/api · high confidence

Add todo list example application

A new todo list example has been added to the codebase, providing a complete working application built with Rocket and Chronical. The example demonstrates how to use the event store directly and return futures from command handlers, serving as a reference implementation for users.

_examples/todo\list/src · high confidence

Add todo list example with task domain model

A new todo list example has been added to the codebase, introducing a task domain model. This includes the definition of task states, events, and commands, along with the implementation of the aggregate root logic for handling task operations such as creation, description updates, completion, and archiving.

_examples/todo\list/src/domain · high confidence

Introduce Postgres-backed event store schema

The chronicle\_postgres module now includes a new database migration and Rust models for an 'events' table. This table stores event data with fields for source ID, sequence number, payload (as binary data), and a created\_at timestamp, providing the underlying storage structure for the new Postgres event store implementation.

_chronicle\postgres · high confidence

Introduce the Chronicle event store interface and PersistedEvent model

The chronicle module now provides the core abstractions for an event-sourcing system. It defines the PersistedEvent struct, which wraps an event payload with metadata including a global offset, a source ID (UUID), and a sequence number. The module also introduces the EventStore trait, which defines the contract for appending and retrieving events, with the Offset type constrained by PartialOrd to support different storage backends. Additionally, helper methods like as\_ref and map are provided on PersistedEvent to facilitate reference access and transformation.

chronicle · high confidence

Introduces the core Aggregate trait for domain modeling

A new 'Aggregate' trait has been added to the chronicle\_domain crate, providing a generic interface for validating and applying commands. This trait defines the structure for aggregates, including state, events, commands, and error types, along with methods to handle commands and apply events. This establishes the foundational abstraction for domain logic in the application.

_chronicle\domain · high confidence

Dependencies

Introduce Chronicle event-sourcing libraries and example applications

Added new Rust crates for event sourcing: the core 'chronicle' library, a domain model crate 'chronicle\_domain', an in-memory event store 'chronicle\_memory', and a PostgreSQL-backed event store 'chronicle\_postgres' (using diesel). These are accompanied by example applications ('bank', 'counter', 'todo\_list') demonstrating their usage, with dependencies on 'futures' 0.1.10, 'uuid' 0.4.0, and 'rocket' 0.2.0.

(dependencies) · medium confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 51 → 57 (+5.1)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 98 (-1.8)
  • Architecture 100 → 100 (+0.0)
  • Maturity 47 → 47 (+0.0)
  • Readiness 24 → 36 (+11.7)
  • Security 100 → 100 (+0.0)
  • Domain Modelling 100 → 100 (+0.0)

Resolved (6)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • No exposed public API
  • Test reliability not included
  • early-stage repository — too few commits for a meaningful bus factor
  • early-stage repository — too little history to judge knowledge freshness

New (10)

  • Dependency hygiene PARTLY measured — Cargo dependencies read, no committed lock to grade for currency
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Inconsistent payload representation: The public API 'PersistedEvent' holds a rich 'Event' type, while the PostgreSQL model 'Event' stores payload as a single byte 'u8', which is likely incorrect for storing event data (should be Vec<u8> or similar). This suggests a broken or incomplete persistence layer implementation that doesn't match the domain model.
  • Redundant or confusing method naming: 'as_ref()' typically returns a reference (&T), but here it returns the owned type 'PersistedEvent', which is non-standard and misleading. 'map' is also unusual for an event wrapper unless it's transforming the payload, but the return type is the same, suggesting it might be a no-op or identity transform, which is confusing.
  • TodoComment (examples/todo_list/src/domain/task.rs)
  • TodoComment (examples/todo_list/src/domain/task.rs)
  • TodoComment (examples/todo_list/src/domain/task.rs)
  • TodoComment (examples/todo_list/src/domain/task.rs)
  • Type mismatch in parameter naming and semantics: 'append_events' takes a singular 'Event' type despite the method name implying plural, while 'events' takes a singular 'source_id' but returns a stream. More critically, the domain 'Event' type in chronicle is structurally different from the persistence 'Event' type in chronicle_postgres, creating a disconnect between the API contract and the storage model without clear mapping documentation.

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

brendanzab/chronicle was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 75c87e6242ed9f42817e78599ee3f84ae1ff4ac7 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.