4lessandrodev/rich-domain
66.9
Adequate · 7 October 2026
4.1k
lines of production code
TypeScript
primary language
4
measurements over time
What this system is
This system is a TypeScript library for Domain-Driven Design that provides foundational primitives such as Entity, Aggregate, and ValueObject classes. It includes a comprehensive set of utilities for precise mathematical calculations, date manipulation, and string processing, alongside a robust event management system. The library also offers tools for object serialization, validation, and immutability to support structured domain modeling.
Features
Add example demonstrating ValueObject usage with Result and utilities
An example file has been added to show how to create a custom ValueObject that extends the core ValueObject class. The example illustrates creating an instance via the Result pattern, performing arithmetic operations using the number utility, checking evenness via the validator, and handling state updates.
example · high confidence
Initial release of rich-domain v1.27.0 with Node.js v23 support
This entry documents the initial public release of the rich-domain library (v1.27.0), establishing the project's foundational structure and documentation. The release adds support for Node.js v23 and includes the core library source code, TypeScript configuration files (tsconfig.lib.json, tsconfig.example.json), and a Jest testing setup (jest.config.ts). It also introduces standard repository governance files, including a CHANGELOG.md, README.md, SECURITY.md, CODE\_OF\_CONDUCT.md, CONTRIBUTING.md, and LICENSE, providing users with the necessary documentation and legal frameworks to adopt the library.
(repo-wide) · high confidence
New core domain primitives and event management system
This release introduces the foundational classes for the domain model, including Entity, Aggregate, and ValueObject base classes, along with a new AutoMapper for serializing domain objects to plain JSON. It also adds a global event management system that adapts to the runtime environment (BrowserEventManager for the browser, ServerEventManager for Node.js) and a unified Context to access it, while providing a native UUID generator that falls back to a custom implementation if the environment lacks crypto support.
lib/core · high confidence
New library entry point and core type definitions
The library now exposes a consolidated public API via a new \lib/index.ts\ barrel file, re-exporting core modules, validators, and a suite of utility functions (including number arithmetic, string manipulation, and time helpers). This release introduces foundational TypeScript types in \lib/types.ts\ and \lib/types-util.ts\, defining the \Event\ and \EventManager\ interfaces for domain event handling, the \\_Result\ interface for encapsulating operation outcomes, and the \ReadonlyDeep\ utility type for creating deeply immutable type structures.
lib · high confidence
New utility library for precise math, date manipulation, and validation
The \lib/utils\ module now provides a comprehensive set of helper functions and a \Utils\ class. For numerical operations, it introduces \Sum\, \Subtract\, \Multiply\, and \Divide\ functions that handle type normalization, NaN/Infinity validation, and configurable decimal precision to ensure calculation accuracy. Date manipulation is supported via \IncrementTime\ and \DecrementTime\ utilities, allowing users to add or subtract days, hours, minutes, weeks, months, and years from a timestamp. String processing includes utilities to remove spaces, remove specific characters, and replace characters. Additionally, a \Validator\ class and \deepFreeze\ utility are included to assist with type checking and object immutability.
lib/utils · high confidence
Test coverage
Added comprehensive test coverage for core domain primitives; Added unit tests for utility functions and core components.
Dependencies
Package rebranded to rich-domain with expanded tooling and Node 20+ requirement
The package has been renamed from types-ddd-v2 to rich-domain and updated to version 1.27.0, now requiring Node.js 20.x or later. The dependency suite has been significantly expanded to support a richer Domain-Driven Design toolkit, adding Jest and ts-jest for testing, madge for circular dependency checks, and ts-node for execution, alongside major upgrades to TypeScript (from 4.7.4 to 5.4.3) and @types/node (to 22.10.2).
(dependencies) · 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
Baseline
- First survey — no prior run to compare against. CAI 67.
Lenses
- Code Health 89
- Architecture 89
- Maturity 57
- Readiness 74
- Security 67
- Performance 100
Changes since last survey
- 300 commits — 268 feature/other, 32 fixes
By area
- (root) — 94 commits
- (repo) — 82 commits
- lib/core — 56 commits
- lib/utils — 45 commits
- tests/core — 14 commits
- lib/types.ts — 4 commits
- lib/types-util.ts — 3 commits
- .github/workflows — 1 commit
- tests/utils — 1 commit
Notable commits
- fix: Merge pull request #129 from 4lessandrodev/fix/crypto-context
- fix: Merge pull request #149 from 4lessandrodev/fix/change-to-obj-implementation
- fix: Merge pull request #170 from GaetanCottrez/bugfix/circular-ref-json-stringify
- fix: Merge pull request #184 from GaetanCottrez/bugfix/empty-object-for-simple-object
- fix: Merge pull request #195 from 4lessandrodev/fix/194/nullish-result-value
- fix: Merge pull request #200 from GaetanCottrez/bugfix/wrong-return-type-servereventnager-dispatchEvent
- fix: Merge pull request #211 from 4lessandrodev/fix/bump-deps
- fix: Merge pull request #267 from 4lessandrodev/fix/engine
- fix: fix(automapper): Add validator isObject in entityToObj if isSimpleValue
- fix: fix(servereventmanager): change value emit for respect type Event
- fix: fix(shared): exporting TsEvents
- fix: fix(tests): add new Date('2020-01-01 00:00:00') in a unit test
- fix: fix(utils): fix circular ref json.stringify
- fix: fix: change toObject implementation #148
- fix: fix: change type create method return null #194
- fix: fix: crypto context
- fix: fix: ensure CustomEvent
- fix: fix: ensure bind event handler context
- fix: fix: ensure props is object in entities #152
- fix: fix: ensure remove events on reload page #134
- …and 280 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
4lessandrodev/rich-domain 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 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 5a8e5c7a400196baf640e99f5fafde574176fe8b — the exact code this score is about.
- Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-8d8088103122.