Skip to content
CAI
Software that uses CAICheck a score

davidnussio/moleculer-cqrs

49.2

Weak · 21 September 2026

535

lines of production code

JavaScript

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Node.js library that provides CQRS and Event Sourcing capabilities for Moleculer.js applications. It offers a code generator to scaffold aggregates, commands, and view models, along with test fixtures and templates to facilitate their implementation. The project also includes configuration files for linting, formatting, and continuous integration.

Features

Added CQRS generator entry point

A new executable script, bin/cqrs-generator.js, has been added to the project. This script initializes the CQRS code generator by loading a Plop configuration from src/plop-generator.js, allowing users to generate CQRS-related files via the command line.

bin · high confidence

Added CQRS template files for aggregate, commands, and view models

The \src/templates\ directory now includes a complete set of Handlebars templates for generating CQRS-based services. This includes the main aggregate module (\index.hbs\, \events.hbs\, \projection.hbs\), command handlers for create, delete, and generic operations (\command-create.hbs\, \command-delete.hbs\, \command-generic.hbs\), a CQRS service template (\cqrs-service.hbs\), a view-model service template (\view-model-service.hbs\) that listens for aggregate events to update a database, and a corresponding test file (\aggregate.spec.hbs\). These templates provide the structural foundation for generating new aggregates with built-in validation and event sourcing capabilities.

src/templates · high confidence

Initial release of moleculer-cqrs with CQRS and Event Sourcing support

This change introduces the initial version of the moleculer-cqrs library, providing Command Query Responsibility Segregation (CQRS) and Event Sourcing capabilities for Moleculer.js applications. The release includes the core implementation files (index.js, index.d.ts) and a CQRSFixture module for testing domain logic. It also establishes the project's development and CI infrastructure, including an .editorconfig for code formatting, an .eslintrc.js for linting, a .npmignore file, and a .travis.yml configuration for Node.js versions 8, 10, and 12. The README is updated with comprehensive documentation on getting started, including CLI commands for generating aggregates and services, and instructions for integrating event sourcing storage adapters.

(repo-wide) · high confidence

Introduce CQRS event sourcing implementation and scaffolding templates

Added src/cqrs-event-sourcing.js, which provides a Moleculer-based CQRS and event-sourcing module with actions for handling commands, reading models, retrieving history, and replaying events. Added src/cqrs-fixture.js, a test helper that simulates command execution and state projection for unit testing aggregates. Added src/plop-generator.js, which scaffolds CQRS/ES project structures (commands, events, projections, services) via plop templates. These changes introduce new capabilities for building and testing CQRS/ES components rather than modifying existing behavior.

src · high confidence

Test coverage

Added tests for the CQRS fixture and aggregate commands

Added test coverage for the CQRS fixture and aggregate commands, including unit tests for create, delete, and generic commands, as well as integration tests for the CQRS event source and TypeScript type definitions for the CQRS fixture.

test · 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 57 → 49 (-8.1)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 71 → 73 (+1.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 61 → 61 (+0.0)
  • Readiness 46 → 34 (-11.4)
  • Security 75 → 60 (-15.0)

Resolved (58)

  • Coverage not included — suite not readable by the collector
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • …and 38 more

New (72)

  • CQRSEventSourcing (cognitive 18) (src/cqrs-event-sourcing.js)
  • Coverage not measured — JavaScript/TypeScript suite
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (the committed lockfile is in a format this engine cannot resolve)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • …and 52 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

davidnussio/moleculer-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 26c5ad26b0516b58c9ec3673cba3b34ed22e6db9 — 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.