Skip to content
CAI
Software that uses CAICheck a score

MichalPaszkiewicz/cqrs-react-router

52.8

Adequate · 21 September 2026

940

lines of production code

TypeScript

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a TypeScript library for building CQRS and event-sourcing applications with React. It provides core domain primitives such as aggregate roots, command handlers, and event stores, alongside utilities for date handling, GUID generation, and path matching. The library facilitates client-side routing and state management through components like PageNavigationAggregate and StateReport, enabling the construction of reactive, state-driven user interfaces.

Features

Added core domain and navigation objects for page navigation

Added new domain objects to support page navigation: the \PageNavigationAggregate\ handles the \NavigateToPageCommand\ and publishes a \PageNavigatedEvent\. The \PageNavigationCommandHandler\ routes the command to the aggregate. Supporting types include \NavigateToPageCommand\, \PageNavigatedEvent\, and \DatedAction\/\DatedEvent\ base classes. Additionally, a \Route\ component and \Link\ component are introduced to manage client-side routing and navigation, while \StateReport\ captures the current state including URL and hash.

dist/objects · high confidence

Added date, GUID, and path-matching helper utilities

The \dist/helpers\ directory now includes new utility modules: \clock\ provides a \ClockDate\ class and \fixDates\ function for date manipulation and normalization, a singleton \Clock\ for time tracking; \guid\ exports a \Guid\ class with a \newGuid\ method for generating unique identifiers; and \helpers\ exports a \matchPath\ function for URL path matching. These additions support internal application logic for handling dates, unique IDs, and routing patterns.

dist/helpers · high confidence

Added helper utilities for date handling, GUID generation, and path matching

Introduced new helper modules to support internal date management and routing logic. A new clock module provides a wrapper around the native Date object to manage time differences and normalize date strings into a custom ClockDate type, alongside a fixDates function to convert stringified dates in data objects. Additionally, a GUID generator was added to create unique identifiers, and a path matching utility was created to parse URL paths and extract dynamic segments.

src/helpers · high confidence

Initial release of cqrs-react-router library

The repository introduces cqrs-react-router, a TypeScript-based library for building CQRS and event-sourcing applications with React. The release includes the core library implementation, a TypeScript configuration (tsconfig.json) for compilation, and a build preprocessor (preprocessor.js) to handle .ts/.tsx files. Documentation (README.md) explains usage for commands, views, and event replay, while .travis.yml enables automated testing on Node.js 7.

(repo-wide) · high confidence

Initial release of the compiled distribution bundle

The \dist\ directory now contains the compiled JavaScript and TypeScript declaration files for the library. This includes the main entry point (\index.js\ and \index.d.ts\) which exports core domain primitives such as \AggregateRoot\, \DomainError\, \Page\, \Route\, \Router\, \ApplicationService\, \DomainService\, \EventStore\, \View\, \CommandValidator\, \StateReport\, \DatedEvent\, \AuditedEvent\, and \PageNavigatedEvent\, along with helper utilities like \Clock\ and \Guid\. This marks the first public distribution of these components.

dist · high confidence

Initial release of the core library

The library is introduced with a new entry point (src/index.ts) that exports a comprehensive set of domain-driven design components, including interfaces for commands, domain events, and value objects, alongside concrete implementations for aggregates, services, and routing.

src · high confidence

Introduce CQRS Application Service with Command/Event Handling

Added new services for the CQRS pattern: an ApplicationService that manages command validation, execution, and event storage, alongside a DomainService for aggregate root management and an EventStore for persisting and replaying domain events. The ApplicationService exposes a static handleCommand method for browser-based applications and supports pre/post command validation hooks, error handling, and event subscription.

src/services · high confidence

Introduce domain objects for page navigation and state reporting

Added new domain objects to support page navigation and state reporting. This includes the \PageNavigationAggregate\ and \PageNavigationCommandHandler\ to process navigation commands, a \NavigateToPageCommand\ and \PageNavigatedEvent\ to represent the navigation flow, and a \PageNavigationView\ to update the browser history. Additionally, a \StateReport\ object was added to capture the current URL and hash for state reporting purposes.

src/objects · high confidence

Introduce new services for actions, domain logic, and event storage

Added new service classes to handle application logic and data persistence: \ActionStore\ for storing and replaying actions, \DomainService\ for managing aggregate roots and applying events, and \EventStore\ for managing domain events with support for hard replays and time-bounded replay. These services are wired into the \ApplicationService\ to manage command handling, event storage, and view updates.

dist/services · high confidence

New domain modeling interfaces for commands, events, and aggregates

The \dist/interfaces\ directory now includes new TypeScript interfaces that define the core domain model contracts: \IAmACommand\ for handling commands, \IAmADomainEvent\ for domain events, \IAmAnAction\ for actions, \IAmAnAggregateRoot\ for aggregate roots, \IAmAValueObject\ for value objects, and \IAmACommandHandler\ for command handlers. These interfaces establish the structural contracts used throughout the application's domain layer.

dist/interfaces · high confidence

New interface contracts for commands, handlers, and domain events

The codebase introduces four new interface definitions in the \src/interfaces\ directory: \IAmACommand\, \IAmACommandHandler\, \IAmADomainEvent\, and \IAmAValueObject\. These interfaces establish the structural contracts for command handling, domain event representation, and value object equality, forming the foundation for the application's internal service and object models.

src/interfaces · high confidence

Test coverage

Added tests for core domain and infrastructure components

Added comprehensive test coverage for the application's core components, including the Clock helper, Guid generator, AggregateRoot, EventStore, DomainService, and ApplicationService. The new tests verify that the clock correctly manages time, unique IDs are generated, aggregate roots apply events and store them in the event store, and the application service correctly handles commands, triggers view updates, and manages view subscriptions.

tests · 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 59 → 53 (-5.9)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 87 → 87 (+0.1)
  • Architecture 69 → 69 (+0.0)
  • Maturity 58 → 58 (+0.0)
  • Readiness 45 → 35 (-10.3)
  • Security 100 → 100 (+0.0)

Resolved (7)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • No exposed public API
  • Scanner failed to run — not a clean result
  • 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

New (10)

  • ApplicationService.handleCommand (cognitive 16) (src/services/applicationservice.ts)
  • Coverage not measured — JavaScript/TypeScript suite
  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (no committed lockfile, so no resolved version to grade)
  • Documentation: no architecture or design documentation (README.md)
  • No dependency advisory monitoring
  • Scanner failed to run — not a clean result
  • Scanner failed to run — not a clean result
  • Scattered collaborators
  • Test suite declares a test script but contains no test files: the repository root
  • clock.fixDates (cognitive 27) (src/helpers/clock.ts)

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

Survey your own repository

MichalPaszkiewicz/cqrs-react-router 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 fabff18ac64c9dd782c540591cdf1ce181ab5dd3 — 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-b84573e22831.