Skip to content
CAI
Software that uses CAICheck a score

RemyDuijkeren/NodaMoney

72.9

Strong · 21 September 2026

5.8k

lines of production code

C#

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

NodaMoney is a .NET library for handling monetary values and currency data, providing high-performance structs like Money and FastMoney for arithmetic, formatting, and parsing. It supports configurable rounding and currency defaults via a MoneyContext system, which integrates with .NET Dependency Injection for scoped or global application settings. The library includes comprehensive serialization support for JSON, XML, and binary formats, along with extensive validation against ISO 4217 standards and performance benchmarking.

Features

Introduce MoneyContext for configurable rounding and currency defaults

Users can now configure monetary operations via a new \MoneyContext\ system, which centralizes settings for rounding strategies (including support for cash denomination rounding), precision, maximum scale, and default currency. This context can be registered via .NET Dependency Injection for global or scoped (per-request) usage, set as a thread-local context for background jobs, or applied dynamically via middleware, allowing applications to enforce specific financial rules without modifying individual \Money\ instances.

src/NodaMoney/Context · high confidence

Introduces FastMoney struct and StandardRounding strategy

Adds a new \FastMoney\ struct designed for high-performance monetary calculations, featuring operator overloads for addition, subtraction, multiplication, division, and modulus, as well as support for \decimal\ and \long\ operands. This type is accompanied by a new \StandardRounding\ class in the \Context\ namespace that implements the \IRoundingStrategy\ interface, providing configurable midpoint rounding (defaulting to Bankers' rounding) with optimized fast-paths for two-decimal currencies. These changes introduce new behavioral capabilities for efficient arithmetic and rounding within the library.

NodaMoney · high confidence

Introduces FastMoney struct and expands serialization support

The library now includes a new \FastMoney\ struct designed for high-performance monetary calculations, using a 64-bit fixed-point representation (scaled by 10,000) instead of \decimal\ to reduce memory usage and improve speed. This struct supports standard arithmetic, comparison, and unary operators, as well as conversions to and from minor units, \SqlMoney\, and OLE Automation Currency. Additionally, the \Currency\ struct now implements \IXmlSerializable\ and \ISerializable\, enabling native XML and binary serialization support alongside the existing JSON converters.

src/NodaMoney · high confidence

New Dependency Injection integration for MoneyContext

The NodaMoney.DependencyInjection package now provides extension methods to easily register and configure the MoneyContext within .NET's dependency injection container. Users can add a default or named MoneyContext using action-based configuration, direct options instances, or by binding to application configuration sections (e.g., appsettings.json). This enables injecting MoneyContext into services and supports multiple named contexts for scenarios requiring different currency or rounding rules across different parts of an application.

src/NodaMoney.DependencyInjection · high confidence

Behavioural changes

New v2 serialization format and context-aware deserialization for Money and Currency

The serialization layer has been updated to support a new default string format for Money (e.g., "EUR 234.25") while maintaining backward compatibility with the previous JSON object structure ({ "Amount": ..., "Currency": ... }). Deserialization now respects the \MoneyContext\, allowing users to opt-in to exact round-tripping (no rounding) by providing a specific context to the \MoneyJsonConverter\. Additionally, new converters have been introduced for \System.Text.Json\ (\CurrencyJsonConverter\, \MoneyJsonConverter\) and \TypeConverter\/\Newtonsoft.Json\ (\CurrencyTypeConverter\, \MoneyTypeConverter\) to handle these changes consistently across different serialization libraries.

src/NodaMoney/Serialization · high confidence

Test coverage

Add high-load and detailed performance benchmarks for Money and FastMoney; Add serialization tests for BinaryFormatter and DataContractSerializer; Added XML serialization tests for Money and Currency; Added comprehensive test coverage for Money binary operators; Added comprehensive tests for Money parsing across cultures and formats; Added comprehensive unit tests for CurrencyInfo behavior; Added serialization test data for Money objects; Added test helper utilities for culture isolation and parallel execution control; Added tests for Currency equality, creation, and default behavior; Added tests for ExchangeRate parsing, conversion, and equality; Added tests for FastMoney creation and context handling; Added tests for GetCurrencyInfo globalization extensions; Added tests for Money and FastMoney conversion and creation behaviors; Added tests for Money comparison and zero-currency matching behavior; Added tests for Money numeric interface members; Added tests for Money rounding, context scaling, and calculation precision; Added tests for Money unary operators; Added tests for Money.Split method; Added tests for MoneyContext creation and scope management; Added tests for Newtonsoft.Json serialization of Money and Currency; Added tests for System.Text.Json serialization and deserialization of Money and Currency; Added tests for creating Money instances in five major currencies; Added tests to validate NodaMoney currency data against the official ISO 4217 list; Added unit tests for MoneyContext DI extension methods; Expanded test coverage for Money creation, equality, and context handling; Expanded test coverage for Money formatting behaviors.

Dependencies

Add NodaMoney.DependencyInjection package and update .NET target frameworks

The NodaMoney library now includes a new NodaMoney.DependencyInjection package that provides dependency injection extensions for configuring MoneyContext via Microsoft.Extensions.Options and Configuration.Abstractions. The core NodaMoney and test projects have been updated to target .NET 8.0, .NET 9.0, and .NET 10.0 (in addition to .NET Standard 2.0/2.1), with .NET 8+ builds marked as AOT-compatible. Test dependencies have been refreshed, including FluentAssertions to 8.8.0, xunit to 2.9.3, and version-specific adjustments for Microsoft.Extensions.DependencyInjection and System.Text.Json across frameworks.

(dependencies) · high confidence

Housekeeping

Repository standardizes on .editorconfig and modernizes .gitignore

The project now enforces consistent code formatting and IDE hygiene through a new \.editorconfig\ file that defines C\# style rules (such as brace placement, indentation, and naming conventions) and standardizes indentation for XML and config files. The \.gitignore\ has been significantly simplified to exclude modern build artifacts (\bin\, \obj\, \artifacts\) and IDE-specific directories (\.vs\, \.vscode\, \.idea\), while the legacy \.gitattributes\ file has been removed.

(repo-wide) · 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

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 62 → 73 (+11.2)
  • Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 83 → 79 (-3.7)
  • Architecture 99 → 99 (-0.0)
  • Maturity 62 → 76 (+13.7)
  • Readiness 63 → 65 (+2.4)
  • Security 52 → 77 (+24.4)
  • Performance 100 → 100 (+0.0)

Resolved (20)

  • Bounded contexts not declared
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • No assertions (empty test): WhenDecimalDigitIsLowerThenMinusOne_ThenCreatingShouldThrow (tests/NodaMoney.Tests/CurrencyInfoSpec/InitiateInternallyACurrency.cs)
  • No exposed public API
  • Off-boarding risk: anonymized user #1
  • The overview is slightly repetitive ("currency-aware arithmetic" appears in both the Overview and What you get sections) but this duplication reflects a shared theme rather than a defect. (README.md)
  • redundant comment (src/NodaMoney/Currency.Serializable.cs)

New (39)

  • Assertions commented out: WhenDecimalDigitIsLowerThenMinusOne_ThenCreatingShouldThrow (tests/NodaMoney.Tests/CurrencyInfoSpec/InitiateInternallyACurrency.cs)
  • CommentedOutCode (src/NodaMoney/Money.NumericInterfaces.cs)
  • CommentedOutCode (tests/NodaMoney.Tests/CurrencyInfoSpec/AllCurrencies.cs)
  • Documentation: no installation or build instructions (README.md)
  • Duplicated block (20–27 lines × 2) (src/NodaMoney/Serialization/MoneyJsonConverter.cs)
  • Duplicated block (5 lines × 2) (src/NodaMoney/FastMoney.Convertible.cs)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • …and 19 more

Changes since last survey

  • 9 commits — 7 feature/other, 2 fixes

By area

  • src/NodaMoney — 4 commits
  • (root) — 2 commits
  • tests/NodaMoney.Tests — 2 commits
  • .github/workflows — 1 commit

Notable commits

  • fix: Apply review and cleanup fixes to the deserialization context change
  • fix: Use the ambient MoneyContext when deserializing Money. fix #119
  • change: Cover deserializing inside a MoneyContext scope
  • change: Document the deserialization context change and its opt-in
  • change: Let MoneyJsonConverter take a MoneyContext for exact round-tripping
  • change: Pin the deserialized MoneyContext for every serialization technology
  • change: Publish releases with NuGet trusted publishing and CHANGELOG notes
  • change: Replace Junie guidelines with agent-neutral AGENTS.md
  • change: Update Microsoft.NET.ILLink.Tasks versions in packages.lock.json

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

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

Survey your own repository

RemyDuijkeren/NodaMoney 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 992af388df454ddccc53ac8bbe9407033cab43fb — 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-28e75b8e3254.