Skip to content
CAI
Software that uses CAICheck a score

mateodelnorte/sourced-repo-mongo

50.5

Adequate · 8 November 2026

323

lines of production code

JavaScript

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a MongoDB-backed repository for event-sourced entities, providing a core abstraction for persisting and retrieving state via events and snapshots. It supports committing single or multiple entities, fetching by ID or all records, and managing event emission and snapshot loading. The implementation relies on the \sourced\ library and includes a test suite to verify entity initialization and event digestion.

Features

Initial release of the MongoDB event and snapshot repository

This change introduces the core \Repository\ class and \mongo\ connection manager for storing and retrieving event-sourced entities in MongoDB. The implementation provides methods to commit single or multiple entities (\commit\, \commitAll\), retrieve entities by ID or all entities (\get\, \getAll\), and manage snapshots and events with specific index configurations. It also includes a test suite using Mocha to verify that enqueued events are emitted after commits and that entity states are correctly persisted and retrieved.

(repo-wide) · high confidence

Test coverage

Added test suite for the MongoDB repository implementation

Added a new test suite for the MongoDB repository, including a configuration file and an index.js test file that verify entity initialization, event digestion, snapshot loading, and event emission behavior.

test · high confidence

Dependencies

Initial release of sourced-repo-mongo package

The package.json and package-lock.json are introduced, establishing the project's dependencies: debug 4.3.1, lodash 4.17.21, mongodb 3.6.9, and sourced 2.0.8, along with dev dependencies jest 27.0.4, mocha 9.0.0, and should 13.2.3.

(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

Score

  • CAI 50 → 50 (+0.2)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 100 → 95 (-4.9)
  • Architecture 69 → 69 (+0.0)
  • Maturity 28 → 28 (+0.0)
  • Readiness 66 → 65 (-0.7)
  • Security 70 → 77 (+7.8)

Resolved (6)

  • Documentation: no installation or build instructions (README.md)
  • Medium CVE: [GHSA redacted] (package-lock.json)
  • Outdated (npm): debug
  • Outdated (npm): lodash
  • Outdated (npm): mongodb (package.json)
  • Outdated (npm): sourced

New (2)

  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (registry.npmjs.org unreachable)
  • Low CVE: [GHSA redacted] (package-lock.json)

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

Survey your own repository

mateodelnorte/sourced-repo-mongo 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 8 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 b74bc07332c10680a7b298197c7d44a59c86ac0e — 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.