Skip to content
CAI
Software that uses CAICheck a score

NickTsitlakidis/event-nest

60.3

Adequate · 8 November 2026

5.5k

lines of production code

TypeScript

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Microsoft SQL Server support for event and snapshot storage

The \libs/mssql\ library now provides a new \EventNestMSSQLModule\ that enables Microsoft SQL Server as a backend for the Event Nest framework. This module exposes \MSSQLEventStore\ and \MSSQLSnapshotStore\ implementations, allowing users to configure connection details, table names, and schema settings via \forRoot\ or \forRootAsync\. It integrates with the Knex query builder to manage aggregate roots, event streams, and optional snapshots, including automatic table initialization and lifecycle management within the NestJS application context. Also in this area: 1 commit adding/updating tests in libs/mongodb, libs/mssql, libs/postgresql; Dependency upgrades and code style adjustments.

libs/mssql · high confidence · unverified

Add example application demonstrating Event-Nest CQRS patterns

The example application now includes a complete demonstration of the Event-Nest library, featuring User and Order aggregates with event sourcing, snapshot strategies (AnyOf, AllOf, ForAggregateRoots, ForEvents, ForCount), and MongoDB integration. It showcases domain event subscriptions, aggregate reconstitution with snapshots, and REST API endpoints for creating and updating users and orders.

apps/example/src · high confidence

Core snapshot storage infrastructure and no-op implementation

The core library now includes the foundational infrastructure for aggregate snapshots, introducing the \SnapshotStore\ interface and an \AbstractSnapshotStore\ base class that handles snapshot creation, revision management, and strategy evaluation. A \StoredSnapshot\ model is added to represent aggregate state, and a \NoOpSnapshotStore\ is provided to disable snapshot functionality by default. This change establishes the storage contract for snapshotting but does not yet include backend-specific implementations or the event-store wiring to automatically trigger snapshot creation.

libs/core/src/lib/storage/snapshot · high confidence

Initial example application scaffolding

Adds a new Node.js example application to the monorepo, providing a reference implementation for building with the framework. The entry includes the necessary Nx project configuration (project.json), TypeScript build and test configs, a Jest setup for coverage, and a custom Webpack configuration that resolves local workspace packages from source and externalizes standard Node modules.

apps/example · high confidence

MongoDB module now supports async configuration and client options

The MongoDB library now allows asynchronous module registration via \forRootAsync\ and \registerAsync\, enabling dynamic configuration of the event store and snapshot store. It also introduces a \mongoClientConfiguration\ option, allowing users to pass specific MongoDB driver settings (such as pool size or replica set) directly to the \MongoClient\. Additionally, the module now supports a \concurrentSubscriptions\ flag to control whether domain event subscriptions are processed concurrently or sequentially.

libs/mongodb/src/lib · high confidence

New composite and conditional snapshot strategies

The core library now includes a suite of new snapshot strategies to give you finer control over when snapshots are created. You can combine conditions using \AllOfSnapshotStrategy\ (AND logic) and \AnyOfSnapshotStrategy\ (OR logic), or target specific criteria with \ForCountSnapshotStrategy\ (event count), \ForEventsSnapshotStrategy\ (specific event types), and \ForAggregateRootsStrategy\ (specific aggregate types). The \NoSnapshotStrategy\ remains the default. These strategies support both synchronous and asynchronous evaluation, ensuring that async conditions are properly awaited before deciding to create a snapshot.

libs/core/src/lib/snapshot-strategy · high confidence

New domain event and snapshot exception types

The core library now includes a comprehensive set of specific error classes to provide clearer diagnostics during development and runtime. These new exceptions cover snapshot lifecycle issues (AggregateClassNotSnapshotAwareException, AggregateInstanceNotSnapshotAwareException, SnapshotRevisionMismatchException), event registration and processing errors (UnknownEventException, UnregisteredEventException, EventNameConflictException, MissingEventClassException, MissingAggregateRootNameException), and persistence or subscription failures (EventConcurrencyException, IdGenerationException, SubscriptionException, UnknownEventVersionException).

libs/core/src/lib/exceptions · high confidence

New storage layer with snapshot support and aggregate repository

The core storage module now includes an abstract event store implementation that supports snapshotting for aggregate roots, allowing efficient loading by combining a stored snapshot with subsequent events. A new AggregateRepository helper simplifies the common load-mutate-commit workflow by handling reconstitution, snapshot resolution, and automatic fallback to full event replay when snapshot revisions mismatch. The event store interface has been expanded to include methods for finding aggregates by multiple IDs and purging aggregates, while the stored event model now includes version information to ensure consistency during reconstitution.

libs/core/src/lib/storage · high confidence

PostgreSQL event and snapshot storage implementation

This change introduces the initial PostgreSQL storage layer for the event-sourcing framework, adding the \PostgreSQLEventStore\ and \PostgreSQLSnapshotStore\ implementations. Users can now persist domain events and aggregate snapshots to a PostgreSQL database using Knex, with support for features such as retrieving events by multiple aggregate IDs, purging aggregates, and consistent versioning. The implementation includes the necessary database row interfaces (\AggregateRootRow\, \EventRow\, \SnapshotRow\) and comprehensive test coverage using testcontainers to validate the storage behavior.

libs/postgresql/src/lib/storage · high confidence

PostgreSQL library exports core modules and configuration

The PostgreSQL library now exposes its core components through the main entry point, allowing consumers to import the NestJS module, module options, schema configuration, and the event store implementation directly from the library root.

libs/postgresql/src · high confidence

PostgreSQL module adds configurable table initialization and connection pool options

The PostgreSQL event store library now supports automatic table creation on application bootstrap via a new \ensureTablesExist\ configuration flag, allowing users to skip manual schema setup. Additionally, the module exposes Knex.js connection pool configuration options (such as \max\, \min\, and timeout settings) through the \connectionPool\ property, giving users finer control over database connection management.

libs/postgresql/src/lib · high confidence

Architecture

Repository restructured into an Nx monorepo with pnpm workspaces

The project has migrated from a flat structure to an Nx monorepo managed by pnpm workspaces. This introduces a new workspace configuration (nx.json, pnpm-workspace.yaml) and standardizes the development environment, requiring Node.js 22+ and pnpm for installation and execution. The legacy ESLint configuration has been replaced with a modern flat config (eslint.config.js), and the TypeScript configuration has been updated to support the new module resolution and workspace exports. Additionally, the repository now includes an AGENTS.md file to guide AI coding agents on the new architecture, testing expectations, and workflow.

(repo-wide) · high confidence

Behavioural changes

Configurable concurrent domain event subscriptions and event renaming via aliases

The core library now allows users to configure whether domain event subscriptions are processed sequentially or concurrently via the new \concurrentSubscriptions\ option in \CoreModuleOptions\; when enabled, event handlers run in parallel for faster processing, while the default sequential mode ensures ordered execution. Additionally, the \DomainEvent\ decorator now supports an \aliases\ option, enabling event classes to be renamed without breaking existing stored events by mapping legacy names to the new canonical name.

libs/core/src/lib · high confidence

Core library public API reorganization and snapshot support introduction

The core library's public API has been restructured to expose a consolidated set of modules, including new snapshot strategy implementations (such as AllOf, AnyOf, ForAggregateRoots, ForCount, ForEvents, and NoOp strategies) and a dedicated snapshot store interface. This change introduces snapshot-awareness capabilities for aggregates, allowing users to configure how and when snapshots are taken to optimize performance. Additionally, the export structure now clearly separates aggregate root configurations, domain event subscriptions, and storage abstractions, providing a cleaner entry point for integrating event sourcing features into applications.

libs/core/src · high confidence

Lint checks now run on push instead of commit

The pre-commit hook has been replaced with a pre-push hook that runs lint checks using \pnpm nx affected -t lint\. This means linting is no longer performed on every commit, but rather when code is pushed to the remote repository, potentially reducing local latency during development while ensuring lint compliance before integration.

.husky · high confidence

MongoDB event store module exports restructured

The MongoDB library now explicitly exports the core event store components, including the NestJS module, configuration options, and the MongoEventStore implementation, via a centralized index file. This change ensures that consumers can import these specific parts directly from the library's main entry point without needing to know internal file paths.

libs/mongodb/src · high confidence

MongoDB event store now supports snapshots and concurrent save safety

The MongoDB storage layer now includes snapshot support via a new MongoSnapshotStore and updated MongoEventStore, allowing aggregates to be restored from snapshots to reduce event replay overhead. The MongoEventStore also resolves version conflicts during concurrent aggregate saves by throwing an EventConcurrencyException instead of silently overwriting data, and ensures snapshots are correctly awaited before creation decisions.

libs/mongodb/src/lib/storage · high confidence

Removed legacy barrel export file

The src/index.ts file, which previously re-exported public APIs from the dist directory, has been removed. This change eliminates the legacy barrel export mechanism, likely as part of a migration to a new monorepo structure where entry points are managed differently.

src · high confidence

Snapshot support and event renaming for aggregate roots

Aggregate roots now support snapshots to optimize reconstitution performance, introduced via the new \AggregateRootConfig\ decorator (which replaces the deprecated \AggregateRootName\) and the \SnapshotAware\ interface requiring \applySnapshot\ and \toSnapshot\ methods. Additionally, domain events can now be renamed using aliases, allowing legacy event names to be mapped to new event classes during replay. The \ApplyEvent\ decorator has also been renamed from \EventProcessor\ to \ApplyEvent\.

libs/core/src/lib/aggregate-root · high confidence

Dependencies

Migrate to pnpm workspaces and upgrade to Node 22 and NestJS 11

The project has migrated from npm to pnpm (v11.10.0) using pnpm workspaces with a centralized catalog for dependency management, replacing the previous npm lockfile. This update raises the minimum Node.js requirement to 22.13 and upgrades the NestJS peer dependencies to support versions 10.0.0 and 11.0.0. Additionally, the core library now depends on es-toolkit instead of radash, and the MongoDB storage module now requires MongoDB driver version 7.0.0 or higher.

(dependencies) · high confidence

Housekeeping

Initial project scaffolding for @event-nest/core

The libs/core package has been initialized with the foundational configuration files required for development and testing. This includes a README documenting the library's features (aggregate roots, event persistence, snapshots) and installation steps, a Jest configuration enabling code coverage collection, and TypeScript configuration files (tsconfig.json, tsconfig.lib.json, tsconfig.spec.json) to separate library and test compilation targets. A project.json file defines the build target using the NX workspace executor, and a setup-tests.ts file ensures reflect-metadata is loaded for NestJS decorators.

libs/core · 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 54 → 60 (+6.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 83 → 83 (+0.2)
  • Architecture 93 → 93 (+0.0)
  • Maturity 43 → 61 (+17.4)
  • Readiness 55 → 55 (-0.4)
  • Security 71 → 65 (-6.5)
  • Domain Modelling 73 → 73 (+0.0)
  • Accessibility 64 → 64 (+0.0)
  • Performance 100 → 100 (+0.0)

Resolved (13)

  • Deprecated: uuid (pnpm-lock.yaml)
  • Documentation: hard to navigate (apps/docs/src/routes/core-model/domain-events/+page.md)
  • High CVE: [GHSA redacted] (pnpm-lock.yaml)
  • High CVE: [GHSA redacted] (pnpm-lock.yaml)
  • High CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Inconsistent module configuration method naming across database drivers. MongoDB uses forRoot and forRootAsync, while MSSQL uses forRoot and registerAsync. The synchronous variant is named register in MSSQL but forRoot in MongoDB.
  • Low CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Medium CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Medium CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Medium CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Outdated (npm): @nestjs/common
  • Outdated (npm): @nestjs/core
  • Outdated (npm): @nestjs/platform-express

New (12)

  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (registry.npmjs.org unreachable)
  • Documentation: no build, run or usage example (libs/mongodb/README.md)
  • Documentation: no build, run or usage example (libs/mssql/README.md)
  • Documentation: no build, run or usage example (libs/postgresql/README.md)
  • Low CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Medium CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Medium CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Medium CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Medium CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Medium CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Medium CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Orphaned file (libs/postgresql/src/lib/storage/postgresql-snapshot-store.ts)

Changes since last survey

  • 9 commits — 9 feature/other, 0 fixes

By area

  • (root) — 5 commits
  • apps/docs — 3 commits
  • apps/example — 1 commit

Notable commits

  • change: Enhance sitemap generation with lastmod dates and add homepage to package.json
  • change: chore(deps): Bump dependencies
  • change: chore(deps): Update lint dependencies to latest and fix lint issues
  • change: chore(deps): bump dependencies
  • change: chore(docs): Upgrade of sveltekit and sveltepress to latest versions
  • change: chore: Clean up pnpm workspace file
  • change: chore: Migrate from Webpack to Vite in example app and remove webpack dependencies (#72)
  • change: feat: Add support for nest 12.x (#70)
  • change: refactor: Replace the nest express adapter with node and use the postgres module in the example app (#71)

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

Survey your own repository

NickTsitlakidis/event-nest 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 687f0773ce83ceda14ac422d8836ddc6b59c475a — 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.