Skip to content
CAI
Software that uses CAICheck a score

yehohanan7/flux

59.2

Adequate · 21 September 2026

1.2k

lines of production code

Go

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Go-based implementation of the CQRS (Command Query Responsibility Segregation) pattern, providing the core infrastructure for event sourcing. It manages the lifecycle of aggregates by persisting and consuming events through pluggable storage backends, specifically supporting both in-memory and BoltDB persistence. The codebase includes a configurable event consumer for polling and processing streams of events, alongside utility packages for HTTP handling and reflection. Additionally, it features a JSON feed endpoint for event metadata and includes a runnable bank account example demonstrating the framework's capabilities.

Features

Add Boltdb-based event and offset stores

Introduces new Boltdb-backed implementations for the CQRS event store and offset store. The BoltEventStore persists events and their metadata in a local BoltDB database, supporting retrieval by aggregate ID and offset-based metadata queries. The BoltOffsetStore provides a persistent mechanism for saving and retrieving the last processed offset. Both stores include comprehensive Ginkgo/Gomega tests verifying save, retrieve, conflict handling, and metadata retrieval behaviors.

boltdb, mongodb · high confidence

Add bank account example with command and consumer implementations

Added a new example for a bank account domain, including command handlers for creating, crediting, and debiting accounts, an event-sourced aggregate, and an event consumer that updates an in-memory repository with account balances.

examples/bank/account · high confidence

Add bank application example

A new bank application example has been added to the repository, providing a complete, runnable HTTP service that manages bank accounts. The example includes a Go server (main.go) that exposes endpoints for creating accounts, crediting, debiting, and retrieving summaries, alongside a shell script (start.sh) and HTTP client file (client.http) for testing. It demonstrates the use of a BoltDB store for event persistence and integrates with the cqrs and flux libraries.

examples/bank · high confidence

Add in-memory event and offset stores

Users can now use an in-memory implementation for the event store and offset store, providing a lightweight, non-persistent way to store and retrieve events and offsets for testing or development purposes.

memory · high confidence

Introduce CQRS aggregate and event handling infrastructure

The cqrs package now provides the core building blocks for a CQRS (Command Query Responsibility Segregation) implementation. This includes an Aggregate root that manages state and accumulates events, an Event structure that separates metadata from the payload, and an EventStore interface for persistence. Serialization and deserialization of events are handled via Go's gob encoding, with errors treated as fatal. Additionally, an EventConsumer interface and an OffsetStore interface are introduced to support event consumption and tracking.

cqrs · high confidence

Introduce new event consumer with configurable polling

The consumer package now includes a new event consumer implementation (event\_consumer.go) that fetches events from a specified URL, using a configurable poll interval and an offset store to track progress. The consumer supports pausing, resuming, and stopping, and includes a test suite (event\_consumer\_test.go) that validates event consumption, stopping, and pause/resume behavior. A test file (consumer\_test.go) was also added to support the Ginkgo test suite.

consumer · high confidence

New JSON feed endpoint for event streams

A new feed package introduces a JSON-based event feed. The \FeedHandler\ exposes an \/events\ endpoint that returns a JSON list of event metadata, and an \/events/{id}\ endpoint that returns the raw payload of a specific event. The \JsonFeedGenerator\ constructs the feed structure, and tests verify the serialization of event details like aggregate name, version, and URL.

feed · high confidence

New utility functions for HTTP, reflection, time, and waiting

Added new utility functions to the codebase: an HTTP helper to fetch and unmarshal JSON responses, a reflection utility to find methods matching a predicate, a time utility to execute a function on a tick, and a wait utility to block until a condition is met. Tests have been added to verify the reflection and general utility suites.

utils · high confidence

Architecture

Restructured CQRS components into dedicated packages

The project has been reorganized by moving the core CQRS logic—specifically the Aggregate, Event, HandlerMap, and Projection components—out of the root directory into the 'cqrs' package. This refactoring clarifies the separation between the public API (exposed in api.go) and the internal CQRS implementation, while the README and test scripts have been updated to reflect the new package structure.

(repo-wide) · high confidence

Test coverage

Added tests for the aggregate and smoke test scenarios

Added new test files to verify the behavior of the aggregate system. The aggregate\_test.go file introduces Ginkgo-based unit tests for the Aggregate struct, covering scenarios such as versioning, event handling, and state persistence. Additionally, a new smoke\_test.go file was added to validate end-to-end functionality using both memory and BoltDB event stores, ensuring that account balance updates and event storage work correctly across different storage backends.

test · high confidence

Dependencies

Initial vendor manifest for Go dependencies

A new vendor/manifest file has been added to the project, establishing a locked set of Go dependencies. This manifest records the specific versions and repository URLs for 19 third-party packages, including glog, protobuf, gorilla/mux, ginkgo, and mgo.v2, ensuring reproducible builds by pinning these external libraries.

vendor · 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

Score

  • CAI 62 → 59 (-2.9)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 62 → 62 (+0.0)
  • Readiness 50 → 44 (-6.0)
  • Security 97 → 97 (+0.0)

Resolved (5)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — no supported dependency manifest was read
  • No exposed public API
  • Test reliability not included
  • dormant codebase — no living knowledge left to concentrate

New (3)

  • Documentation: no architecture or design documentation
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)

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

Survey your own repository

yehohanan7/flux 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 f0f3bdc7811160c90c9c2a2108118d03105a4720 — 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.