hseeberger/eventsourced
64.0
Adequate · 21 September 2026
3.2k
lines of production code
Rust
primary language
4
measurements over time
What this system is
This system is a Rust-based event sourcing library that provides a modular framework for persisting entity state through pluggable backends. It supports storage via NATS JetStream and PostgreSQL for both event logs and snapshots, along with capabilities for projecting events into relational databases. The project includes standardized tooling and example applications to demonstrate entity lifecycle management and performance.
Features
Add Postgres-backed event projection capability
The \eventsourced-projection\ crate now provides a new module for projecting events to a Postgres database. This includes a \Projection\ struct that manages the lifecycle (run, stop, state retrieval) of a projection via an internal async task, persisting its sequence number (\seq\_no\) in a dedicated \projection\ table. It introduces an \EventHandler\ trait for custom event processing logic within database transactions and handles error strategies and state synchronization.
eventsourced-projection/src · high confidence
Initial release of NATS-backed event log and snapshot store
This change introduces the \eventsourced-nats\ crate, providing \NatsEventLog\ and \NatsSnapshotStore\ implementations for the eventsourced framework. The event log persists events to a NATS JetStream stream, supporting authentication via user/password or credentials files, and verifies sequence numbers on persistence. The snapshot store uses a NATS Key-Value bucket to save and load entity states, serialized using Protocol Buffers (defined in \snapshot\_store.proto\). Configuration allows specifying the server address, bucket/stream names, and optional setup flags.
eventsourced-nats, eventsourced-nats/src · high confidence
New counter example demonstrating event-sourced entity lifecycle
The examples/counter directory now contains a complete, runnable example that showcases the core event-sourcing capabilities. It defines a Counter entity that handles IncreaseCounter and DecreaseCounter commands, emitting corresponding events and managing overflow/underflow errors. The example includes a run function that spawns multiple entities, executes a configurable number of commands against them using an event log and snapshot store, and measures performance, providing a concrete reference for integrating the library's EventSourced trait, Command handling, and persistence mechanisms.
examples/counter · high confidence
New counter examples with JSON logging and snapshot stores
Added new counter examples for NATS and Postgres that initialize JSON-formatted tracing and support snapshot stores alongside event logs. The NATS example uses NatsEventLog and NatsSnapshotStore, while the Postgres example uses PostgresEventLog and PostgresSnapshotStore, both loading configuration via kebab-case and running the shared counter logic.
examples/counter-nats, examples/counter-postgres · high confidence
PostgreSQL backend for event sourcing
Added PostgreSQL implementations for the EventLog and SnapshotStore, allowing users to persist event-sourced state in a Postgres database. The change introduces \PostgresEventLog\ and \PostgresSnapshotStore\ components, along with SQL schema definitions (\create\_event\_log.sql\, \create\_snapshot\_store.sql\) and configuration structs for connection details and table names.
eventsourced-postgres/src · high confidence
Standardized project scaffolding and tooling configuration
The project now includes standardized configuration files to improve developer experience and consistency. A new docker-compose.yaml file provides pre-configured, secure services for NATS and PostgreSQL with health checks, simplifying local environment setup. The justfile introduces consistent commands for checking, formatting, linting, testing, and documentation generation. The .gitignore has been updated to exclude common IDE and environment files. Additionally, the Rust toolchain has been switched from nightly to stable version 1.98.1, and rustfmt.toml has been updated to use edition 2024 with improved import ordering and formatting settings.
(repo-wide) · high confidence
Removals
Event sourcing core library removed
The \src/lib.rs\ file containing the core event sourcing implementation, including the \EventSourced\ trait, \Entity\ struct, and \EntityRef\ proxy, has been deleted from the source tree.
src · high confidence
Removal of NATS-based event log implementation
The NATS-specific event log implementation, including the \NatsEvtLog\ struct, its configuration, and the associated error types, has been removed from the codebase. The \src/event\_log/mod.rs\ module, which previously defined the \EvtLog\ trait and re-exported the NATS module, has also been deleted. This change eliminates the ability to persist and retrieve events via a NATS JetStream backend.
_src/event\log · high confidence
Behavioural changes
New configuration files for NATS and Postgres example applications
Added default configuration files for the counter-nats and counter-postgres examples, defining connection details for event logs and snapshot stores (NATS on localhost:4222 and Postgres on localhost:5432 with specific credentials). The previous standalone nats.rs integration test file has been removed, as its functionality is now covered by the structured example configurations.
examples · high confidence
New pluggable serialization and persistence traits
The library introduces a new modular architecture for event sourcing, defining core traits for persistence and serialization. The \EventLog\ trait handles event persistence and retrieval (by ID or type), while the \SnapshotStore\ trait manages state snapshots, including a \NoopSnapshotStore\ for disabling snapshots. Serialization is abstracted via the \Binarize\ trait, with built-in implementations for \prost\ (Protocol Buffers) and \serde\_json\ provided in the new \binarize\ module. These changes replace previous ad-hoc persistence logic with a unified, feature-gated interface for storing and loading events and snapshots.
eventsourced/src · high confidence
Dependencies
Rust workspace restructured with dependency upgrades and edition 2024
The project has been reorganized into a Cargo workspace containing the core \eventsourced\ library, \eventsourced-nats\ and \eventsourced-postgres\ storage implementations, \eventsourced-projection\, and example applications. The workspace now targets the Rust 2024 edition and centralizes dependency management, introducing significant version upgrades including \async-nats\ to 0.50, \sqlx\ to 0.9, \thiserror\ to 2.0, and \uuid\ to 1.23.
(dependencies) · high 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
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 62 → 64 (+2.0)
- Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 98 → 98 (+0.1)
- Architecture 100 → 100 (+0.0)
- Maturity 50 → 55 (+5.4)
- Readiness 66 → 53 (-12.8)
- Security 61 → 80 (+19.0)
- Domain Modelling 100 → 100 (+0.0)
Resolved (8)
- 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
- Off-boarding risk: anonymized user #1
- Scanner failed to run — not a clean result
- Test reliability not included
- The README is a single line with only the crate name and license, missing any description of how Postgres integration works. (eventsourced-postgres/README.md)
- The README is a single-line title and only mentions 'Early support for the CQRS read side' with no license, despite the crate's Apache 2.0 licensing. (eventsourced-projection/README.md)
New (9)
- Documentation: no installation or build instructions (README.md)
- Duplicated block (10 lines × 2) (eventsourced-postgres/src/event_log.rs)
- Duplicated block (12 lines × 2) (eventsourced-postgres/src/event_log.rs)
- Duplicated block (16 lines × 2) (eventsourced-postgres/src/event_log.rs)
- Duplicated block (6 lines × 2) (eventsourced-postgres/src/event_log.rs)
- Duplicated block (9 lines × 2) (eventsourced-postgres/src/event_log.rs)
- High: security finding (details withheld)
- Medium IaC: WD-COMPOSE-0002 (docker-compose.yaml)
- Medium IaC: WD-COMPOSE-0002 (docker-compose.yaml)
Changes since last survey
- 53 commits — 47 feature/other, 6 fixes
By area
- (repo) — 26 commits
- (root) — 15 commits
- .github/workflows — 9 commits
- .vscode/settings.json — 1 commit
- eventsourced-nats/src — 1 commit
- eventsourced/src — 1 commit
Notable commits
- fix: Merge pull request #413 from hseeberger/fix/rustsec-2026-0221
- fix: Merge pull request #414 from hseeberger/fix/test-feature-gating
- fix: Merge pull request #440 from hseeberger/fix/439-rustsec-2026-0285
- fix: fix(deps): bump rustls to 0.23.45 for RUSTSEC-2026-0285
- fix: fix(deps): update event-listener to 5.4.2 (RUSTSEC-2026-0221)
- fix: fix(test): make test helper modules available to unit tests
- change: Merge pull request #410 from hseeberger/test/compose-image-single-source
- change: Merge pull request #411 from hseeberger/dependabot/docker_compose/docker-compose-minor-8d47256f22
- change: Merge pull request #412 from hseeberger/dependabot/github_actions/ci-minor-709b7cae13
- change: Merge pull request #415 from hseeberger/dependabot/github_actions/ci-patch-94c8bfcd00
- change: Merge pull request #416 from hseeberger/dependabot/github_actions/dtolnay/rust-toolchain-6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772
- change: Merge pull request #417 from hseeberger/dependabot/github_actions/ci-patch-2ec2a56e20
- change: Merge pull request #418 from hseeberger/dependabot/docker_compose/docker-compose-minor-a9f6221d7b
- change: Merge pull request #419 from hseeberger/refactor/tracing-init
- change: Merge pull request #420 from hseeberger/release-plz-2026-08-13T12-56-12Z
- change: Merge pull request #422 from hseeberger/dependabot/cargo/cargo-patch-135add22e0
- change: Merge pull request #423 from hseeberger/dependabot/github_actions/ci-patch-6fcc6ae1e2
- change: Merge pull request #424 from hseeberger/build/deps
- change: Merge pull request #425 from hseeberger/build/rust
- change: Merge pull request #426 from hseeberger/test/composed
- …and 33 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
hseeberger/eventsourced 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 19b5dda2ff1fed19b08b33875012a714f903f4d5 — 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-28e75b8e3254.