jetbasrawi/go.cqrs
62.3
Adequate · 21 September 2026
1.8k
lines of production code
Go
primary language
4
measurements over time
What this system is
This system is a Go-based implementation of the CQRS (Command Query Responsibility Segregation) pattern, designed to manage domain events and commands through a simplified dispatcher and handler architecture. It provides an in-memory event store and read model updates, demonstrated by a simple inventory management example. The codebase includes internal utilities for UUID generation and string-based aggregate identification, indicating a focus on flexible, decoupled command handling.
Features
Add simple CQRS example application
A new example application demonstrating a simple CQRS (Command Query Responsibility Segregation) pattern in Go is added to the \examples/simplecqrs\ directory. This includes the main application entry point, command and event definitions, command handlers, an in-memory repository, and a read model that updates in response to domain events. The example also provides the necessary HTML templates and CSS to serve a web application on port 8088, allowing users to add, rename, deactivate, and manage inventory items.
examples · high confidence
Behavioural changes
Added internal UUID package
The internal/uuid package was added, providing a local implementation of UUID generation and manipulation (supporting versions 1, 3, 4, and 5 as per RFC 4122). This change replaces the previous external dependency on github.com/satori/go.uuid with an internal copy of the code, allowing the project to manage the dependency directly.
internal · high confidence
Refactored CQRS core to use string-based IDs and simplified command handling
The CQRS implementation was refactored to use string-based aggregate IDs instead of UUIDs, simplifying the API and improving flexibility. The \AggregateRoot\ interface and \AggregateBase\ type were updated to use \string\ for \AggregateID()\, and the \AggregateFactory\ now accepts and returns string IDs. The \CommandMessage\ interface was updated to return a string for \AggregateID()\. The \CommandHandler\ interface was simplified by removing the \AggregateCommandHandler\ which previously handled repository loading and saving, replacing it with a simpler \CommandHandlerBase\ that supports chaining. The \Dispatcher\ was renamed from \CommandBus\ to \Dispatcher\ and its implementation was updated to work with the new string-based IDs. The \ReadRepository\ and \MemoryReadRepository\ were removed, indicating a shift in how read models are handled. The \EventStore\ interface and its implementations (\GetEventStore\, \MemoryEventStore\, \TraceEventStore\) were removed, suggesting a move away from the previous event store abstractions in this codebase.
(repo-wide) · 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 56 → 62 (+6.3)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 95 → 97 (+2.2)
- Architecture 100 → 96 (-3.8)
- Maturity 70 → 74 (+3.7)
- Readiness 24 → 36 (+11.7)
- Security 93 → 93 (+0.0)
- Domain Modelling 100 → 100 (+0.0)
Resolved (10)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — no supported dependency manifest was read
- Duplicated block (10 lines × 3) (examples/simplecqrs/main.go)
- Duplicated block (11 lines × 2) (examples/simplecqrs/main.go)
- 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
- main.setupHandlers (cognitive 37) (examples/simplecqrs/main.go)
- main.setupHandlers (cyclomatic 26) (examples/simplecqrs/main.go)
New (10)
- Duplicated block (12 lines × 4) (examples/simplecqrs/main.go)
- Duplicated block (13 lines × 2) (examples/simplecqrs/main.go)
- Duplicated block (8 lines × 5) (examples/simplecqrs/main.go)
- Duplicated block (9 lines × 3) (examples/simplecqrs/main.go)
- Hotspot: examples/simplecqrs/main.go (examples/simplecqrs/main.go)
- TodoComment (aggregate_test.go)
- TodoComment (event_test.go)
- TodoComment (examples/simplecqrs/simplecqrs/inmem_repo.go)
- TodoComment (repository.go)
- TodoComment (repository.go)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
jetbasrawi/go.cqrs 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 e4d812d57f090ecede016aa36d70c73626a8eb17 — 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.