Skip to content
CAI
Software that uses CAICheck a score

j5ik2o/cqrs-es-example-go

69.1

Adequate · 7 November 2026

5.7k

lines of production code

Go

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add end-to-end test for group chat functionality

Added a new end-to-end test suite in tools/e2e-test that verifies group chat operations. The test script (verify-group-chat.sh) automates creating a group chat, adding members, posting messages, retrieving chat details and member lists, and renaming the chat via GraphQL mutations and queries against the write and read API servers. A Dockerfile and Makefile are included to build and run the test container, with configuration for API endpoints and user IDs provided in config.env.

tools/e2e-test · high confidence

Added domain models for group chat, members, and messages

Introduced new value objects and domain models in the command domain layer to support group chat functionality. This includes \GroupChatId\ and \GroupChatName\ for identifying and naming chats, \Member\ and \MemberId\ for user membership, and a \Role\ type distinguishing between 'member' and 'admin'. The \Members\ collection manages group membership, providing methods to add, remove, and check roles (administrator vs. member). Additionally, \Message\ and \MessageId\ models represent chat messages, while the \Messages\ collection handles message storage with logic to prevent duplicates and enforce sender authorization for edits and deletions.

pkg/command/domain/models · high confidence

Added group chat domain events

The \pkg/command/domain/events\ package now includes a complete set of domain events for group chat operations, enabling the system to track the full lifecycle of a group chat. New event types include \GroupChatCreated\, \GroupChatDeleted\, \GroupChatRenamed\, \GroupChatMemberAdded\, \GroupChatMemberRemoved\, \GroupChatMessagePosted\, and \GroupChatMessageEdited\. Each event implements the \GroupChatEvent\ interface and provides constructors for generating new events or reconstructing them from existing data, along with methods for serialization and metadata access.

pkg/command/domain/events · high confidence

GraphQL command API for group chat operations

This change introduces the GraphQL interface for managing group chats, exposing mutations to create, delete, rename, add/remove members, and post/edit/delete messages. It includes the GraphQL schema, generated model types, and resolver implementations that validate inputs and delegate to the command processor. Error handling is standardized to return specific HTTP-like error codes (400 for validation, 404 for not found, 409 for optimistic lock conflicts, 422 for domain logic errors like group chat issues, and 500 for other failures) with cause details where applicable. Integration tests are added to verify the end-to-end flow of these mutations against a localstack-backed event store.

pkg/command/interfaceAdaptor/graphql · high confidence

Initial project scaffolding and configuration

The repository is initialized with essential project infrastructure, including a Go-based CQRS/Event Sourcing example application. This includes a Dockerfile for containerization (using Go 1.27), a Makefile with targets for building, testing, and running local API servers, and configuration files for code style (.editorconfig) and automated dependency updates (renovate.json). The project also introduces dual licensing (Apache 2.0 and MIT) and comprehensive documentation (README.md, README.ja.md) outlining the architecture, stack (gqlgen, sqlx, event-store-adapter-go), and development setup.

(repo-wide) · high confidence

Initial read-model updater for group chat events

This change introduces the \rmu\ package, which implements a read-model updater that processes DynamoDB stream events to keep a MySQL database in sync with group chat state. The \ReadModelUpdater\ listens for group chat events (created, deleted, renamed, member added/removed, message posted/edited/deleted) and delegates persistence operations to a new \GroupChatDao\ interface and its \GroupChatDaoImpl\ implementation, which handles SQL inserts and updates for group chats, members, and messages. An example DynamoDB event JSON file is also included for testing.

pkg/rmu · high confidence

Introduce CLI commands for Write API, Read API, and Read Model Updater

The application now exposes three new subcommands via the Cobra CLI: \writeApi\, \readApi\, and \rmu\ (with a local variant \localRmu\). The \writeApi\ command starts a GraphQL server on port 28080 that persists events to DynamoDB using the \event-store-adapter-go\ library. The \readApi\ command starts a separate GraphQL server on port 28082 to query the read model from MySQL. The \rmu\ command launches a Lambda-compatible handler for updating the read model, while \localRmu\ runs a continuous process that consumes DynamoDB Streams to keep the MySQL read model in sync.

cmd · high confidence

New group chat and infrastructure management scripts

Added a suite of new shell scripts in tools/scripts to support group chat operations and local environment management. The new curl-based scripts (curl-create-group-chat.sh, curl-get-group-chat.sh, curl-add-member.sh, etc.) allow users to create group chats, retrieve chat details, add members, and post messages via GraphQL mutations and queries. Additionally, new docker-compose helper scripts (docker-compose-up.sh, docker-compose-down.sh, docker-compose-build.sh, docker-compose-e2e-test.sh) provide standardized ways to build, start, stop, and run end-to-end tests for the application stack, including architecture detection for amd64/arm64.

tools/scripts · high confidence

Behavioural changes

2 commits (0 fixes) modifying deploy

A change to existing behaviour in deploy — 2 commits, 7 files: “feat: add production deploy assets for rmu recovery (\#683)”; “\[M2 後続\] go: RMU 復旧の定期実行・件数上限・監視アラーム・本番手順 (\#684) (\#685)” (refs \#683, \#684, \#685).

deploy · medium confidence · unverified

2 commits (0 fixes) modifying tools/migrate

A change to existing behaviour in tools/migrate — 2 commits, 4 files: “refactor”; “wip”.

tools/migrate · medium confidence · unverified

5 commits (1 fix) modifying tools/dynamodb-setup

A change to existing behaviour in tools/dynamodb-setup — 5 commits (1 fix), 3 files: “feat: switch go rmu to aggregate head streams (\#678)”; “fix: makefils”; “feat: migrate go to event-store-adapter v5.1.0 (\#675)”; and 2 more (refs \#678, \#675).

tools/dynamodb-setup · medium confidence · unverified

6 commits (1 fix) modifying tools/migrate/migrations

A change to existing behaviour in tools/migrate/migrations — 6 commits (1 fix), 8 files: “fix: updatedAt”; “feat: switch go rmu to aggregate head streams (\#678)”; “rename account\_id column name”; and 3 more (refs \#678, \#681, \#684, \#685).

tools/migrate/migrations · medium confidence · unverified

8 commits (3 fixes) modifying pkg/query/interfaceAdaptor/graphql

A change to existing behaviour in pkg/query/interfaceAdaptor/graphql — 8 commits (3 fixs), 10 files: “fix: add tests”; “feat: align go read api with ESA v5 (\#677)”; “regenerate graphql”; and 4 more (refs \#677, \#673, \#686).

pkg/query/interfaceAdaptor/graphql · medium confidence · unverified

Group chat command processing and error handling

The group chat command processor now handles commands (create, delete, rename, add/remove member, post/edit/delete message) with structured error types (NotFound, Repository, DomainLogic) and returns typed events via the mo.Result pattern, ensuring consistent error propagation and event emission for group chat operations.

pkg/command/processor · high confidence

Group chat repository now supports conditional snapshotting and full event serialization

The repository layer for group chats has been expanded to include robust event and snapshot handling. It now supports conditional snapshotting, allowing snapshots to be saved based on a configurable predicate (such as event sequence number retention) rather than every write. Additionally, new converters and serializers have been added to properly serialize and deserialize group chat events (including the new GroupChatMessageEdited event) and aggregate snapshots to/from JSON, ensuring consistent storage and retrieval of the group chat state.

pkg/command/interfaceAdaptor/repository · high confidence

GroupChat domain logic and error handling

The GroupChat aggregate now includes specific error types (such as AlreadyDeletedError, NotMemberError, and MismatchedUserAccountError) to provide detailed feedback for invalid operations, and its event handling logic has been refactored to ensure that edit actions correctly emit the appropriate events.

pkg/command/domain · high confidence

Test coverage

8 commits adding/updating tests in test

Test coverage in test — 8 commits (2 fixs), 1 file: “feat: switch go rmu to aggregate head streams (\#678)”; “feat: migrate go to event-store-adapter v5.1.0 (\#675)”; “fix(ci): regenerate gqlgen code and follow testcontainers API changes (\#673)”; and 5 more (refs \#678, \#675, \#673, \#686, \#681, …).

test · high confidence · unverified

Dependencies

Updated Go toolchain and dependency versions

The project now requires Go 1.26.0 with the go1.27.1 toolchain directive. Key dependency updates include aws-sdk-go-v2 to v1.47.1, 99designs/gqlgen to v0.17.95, j5ik2o/event-store-adapter-go to v1.0.197, and testcontainers-go to v0.44.0.

(dependencies) · high confidence

Written by cca.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 63 → 69 (+6.3)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 95 → 87 (-8.4)
  • Architecture 97 → 95 (-1.9)
  • Maturity 48 → 79 (+30.9)
  • Readiness 65 → 57 (-8.1)
  • Security 75 → 74 (-0.7)
  • Domain Modelling 100 → 100 (+0.0)

Resolved (52)

  • Documentation: no project overview (README.md)
  • Duplicated block (10 lines × 6) (pkg/rmu/group_chat_dao_impl.go)
  • Duplicated block (13 lines × 2) (pkg/command/interfaceAdaptor/repository/event_converter.go)
  • Duplicated block (36 lines × 2) (cmd/localRmu.go)
  • Duplicated block (5 lines × 2) (pkg/command/domain/group_chat.go)
  • Duplicated block (6 lines × 6) (pkg/command/domain/events/group_chat_member_added.go)
  • Duplicated block (7 lines × 2) (pkg/command/interfaceAdaptor/repository/event_converter.go)
  • Duplicated block (9 lines × 2) (pkg/command/processor/group_chat_command_processor.go)
  • Duplicated block (9 lines × 7) (pkg/command/processor/group_chat_command_processor.go)
  • FunctionTooLong: repository.EventConverter (pkg/command/interfaceAdaptor/repository/event_converter.go)
  • High CVE: [GHSA redacted] (go.mod)
  • High CVE: [GHSA redacted] (go.mod)
  • High CVE: [GHSA redacted] (go.mod)
  • Medium CVE: [GHSA redacted] (go.mod)
  • Medium vulnerability: [GHSA redacted] (go.mod)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • …and 32 more

New (22)

  • Applier.ApplyThrough (cognitive 22) (pkg/rmu/applier.go)
  • Applier.applyEvents (cognitive 16) (pkg/rmu/applier.go)
  • Duplicated block (10 lines × 2) (cmd/localRmu.go)
  • Duplicated block (5 lines × 7) (pkg/command/processor/group_chat_command_processor.go)
  • Duplicated block (7 lines × 2) (pkg/command/interfaceAdaptor/repository/event_serializer.go)
  • Duplicated block (7 lines × 2) (pkg/rmu/journal_reader.go)
  • Duplicated block (8 lines × 2) (pkg/command/domain/events/group_chat_message_edited.go)
  • Duplicated block (8 lines × 2) (pkg/rmu/group_chat_dao_impl.go)
  • Duplicated block (8 lines × 2) (pkg/rmu/group_chat_dao_impl.go)
  • Duplicated block (8 lines × 4) (pkg/rmu/group_chat_dao_impl.go)
  • Duplicated block (9 lines × 7) (pkg/command/processor/group_chat_command_processor.go)
  • Hotspot: cmd/localRmu.go (cmd/localRmu.go)
  • Hotspot: pkg/command/interfaceAdaptor/repository/event_converter.go (pkg/command/interfaceAdaptor/repository/event_converter.go)
  • Medium CVE: GO-2026-6865 (go.mod)
  • Medium: security finding (details withheld)
  • Near-duplicate member family (7 members, 14 shared lines) (pkg/command/processor/group_chat_command_processor.go)
  • No dependency advisory monitoring
  • ReadModelUpdater.HandleDynamoDBEvent (cognitive 16) (pkg/rmu/update_read_model.go)
  • ReadModelUpdater.processRecord (cognitive 17) (pkg/rmu/update_read_model.go)
  • Scattered collaborators
  • …and 2 more

Changes since last survey

  • 25 commits — 24 feature/other, 1 fixes

By area

  • (root) — 13 commits
  • pkg/command — 4 commits
  • pkg/rmu — 3 commits
  • .github/workflows — 2 commits
  • pkg/query — 1 commit
  • tools/docker-compose — 1 commit
  • tools/e2e-test — 1 commit

Notable commits

  • fix: fix(ci): regenerate gqlgen code and follow testcontainers API changes (#673)
  • change: Disable Renovate bot by setting enabled to false
  • change: [M2 後続] go: RMU 復旧の定期実行・件数上限・監視アラーム・本番手順 (#684) (#685)
  • change: chore(deps): Update actions/checkout action to v7 (#546)
  • change: chore(deps): Update aws-sdk-go-v2 monorepo (#654)
  • change: chore(deps): Update aws-sdk-go-v2 monorepo (#657)
  • change: chore(deps): Update aws-sdk-go-v2 monorepo (#659)
  • change: chore(deps): Update aws-sdk-go-v2 monorepo (#660)
  • change: chore(deps): Update aws-sdk-go-v2 monorepo (#661)
  • change: chore(deps): Update aws-sdk-go-v2 monorepo (#663)
  • change: chore(deps): Update aws-sdk-go-v2 monorepo (#674)
  • change: chore(deps): Update module github.com/99designs/gqlgen to v0.17.98 (#655)
  • change: chore(deps): Update module github.com/aws/aws-sdk-go-v2/service/dynamodb to v1.72.2 (#658)
  • change: chore(deps): Update module github.com/aws/aws-sdk-go-v2/service/dynamodb to v1.73.0 (#662)
  • change: chore(deps): Update testcontainers-go monorepo to v0.45.0 (#664)
  • change: chore(deps): update actions/setup-go action to v7
  • change: chore(deps): update mysql Docker tag to v26 (#573)
  • change: chore(go): resolve remaining staticcheck findings (#686)
  • change: feat: adapt go Write API to ESA v5 envelope API (#676)
  • change: feat: add production deploy assets for rmu recovery (#683)
  • …and 5 more

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

Survey your own repository

j5ik2o/cqrs-es-example-go 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 7 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 98ceb9c9253d7920d478d41d1aea61ccb83b1415 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-45ab2cab63de.