Skip to content
CAI
Software that uses CAICheck a score

mohamedelareeg/DomainDrivenERP

54.4

Adequate · 21 September 2026

10.9k

lines of production code

C#

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a .NET 8-based enterprise resource planning (ERP) application built on a domain-driven architecture. It provides core business functionality for managing categories, chart of accounts, customers, and invoices, supported by a comprehensive identity and authorization framework. The system enforces structured development practices through Dockerized environments, automated code analysis, and unit testing, while utilizing MediatR for command handling and Redis/SQL Server for persistence.

Features

Add commands and queries for managing categories, COAs, customers, and invoices

Users can now create, update, and retrieve categories, chart of accounts (COA) heads, customer records, and customer invoices through new application layer features. This includes command handlers for creating and updating categories and COAs, as well as queries for retrieving categories by date range, by ID, and with children. For customers, it adds creation, retrieval (single and paginated lists), and invoice generation capabilities, along with domain event handlers for background checks and email notifications.

(repo-wide) · high confidence

Added Docker and development environment configuration files

The project now includes configuration files to support containerized development and testing. A .dockerignore file excludes unnecessary files from Docker builds, while docker-compose.yml and docker-compose.override.yml define the local testing environment, spinning up the API, Redis, SQL Server, and Seq services on a shared network. Additionally, a .editorconfig file enforces C\# coding conventions and naming rules, and Directory.Build.props introduces static code analysis tools (SonarAnalyzer and StyleCop) to the build process.

src · high confidence

Introduces authentication, authorization, and role management capabilities

Users can now log in, register new accounts, and reset passwords. The system also supports role-based access control, allowing administrators to create, edit, and delete roles, as well as assign roles and claims to users. A permission-based authorization filter has been added to enforce access control based on user claims. Additionally, an email service has been introduced to handle notifications, such as password reset codes.

(repo-wide) · high confidence

Introduces domain-driven architecture with centralized error handling and identity services

The application now enforces a domain-driven structure, introducing a global exception handler that maps specific exceptions (e.g., UnauthorizedAccessException, ValidationException) to standardized JSON error responses. The API pipeline is configured with MediatR behaviors for validation, logging, and authorization checks based on custom attributes. Additionally, the system introduces a comprehensive set of interfaces for identity management (authentication, roles, claims) and persistence (repositories, unit of work, caching), alongside domain models for Chart of Accounts (COA) and journaling.

(repo-wide) · high confidence

Test coverage

Added unit tests for the CreateCustomer command handler

Added a new unit test class, CreateCustomerCommandHandlerTests, which validates the behavior of the CreateCustomer command handler. The tests verify that the handler returns a failure result when the customer's email is not unique, returns a success result when the email is unique, calls the repository's AddAsync method in the success case, and ensures the unit of work's SaveChangesAsync is not called when the email is already in use.

src/test/DomainDrivenERP.Application.UnitTests/Features/Customers · high confidence

Dependencies

Upgrade to .NET 8 and update core dependencies

The project has been upgraded to .NET 8.0 across all components, including the API, application, domain, identity, infrastructure, persistence, and presentation layers. This update includes upgrading Entity Framework Core to version 8.0.4 and Microsoft.AspNetCore.Identity packages to 8.0.4. Other key dependencies have also been updated, including MediatR to 12.2.0, AutoMapper to 13.0.1, FluentValidation to 11.9.0, and Swashbuckle.AspNetCore to 6.5.0.

(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

Score

  • CAI 58 → 54 (-3.2)
  • Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 80 → 69 (-10.5)
  • Architecture 89 → 88 (-0.9)
  • Maturity 65 → 65 (-0.0)
  • Readiness 41 → 41 (-0.2)
  • Security 70 → 65 (-5.0)
  • Domain Modelling 90 → 62 (-28.1)
  • Event-Driven 100 → 100 (+0.0)
  • Performance 77 → 77 (+0.0)

Resolved (16)

  • Bounded contexts not declared
  • Build status unknown
  • Coverage not measured — analyzer environment
  • Duplicated block (16 lines × 2) (src/DomainDrivenERP.Persistence/Repositories/Transactions/TransactionRepository.cs)
  • Naming convention inconsistency: 'RemoveItemfromOrder' lacks camelCase or PascalCase consistency with other commands like 'AddItemToOrder'.
  • No Usage section explaining how to run the API and access endpoints. (README.md)
  • No exposed public API
  • Pluralization inconsistency: 'Childs' is used instead of the correct plural 'Children' or 'ChildItems'.
  • Pluralization inconsistency: 'Childs' is used instead of the correct plural 'Children' or 'ChildItems'.
  • Spelling inconsistency: 'Retrive' is used instead of the correct spelling 'Retrieve'.
  • Spelling inconsistency: 'Retrive' is used instead of the correct spelling 'Retrieve'.
  • Typo in interface and class name: 'Respository' instead of 'Repository'.
  • Typo in interface and class name: 'Respository' instead of 'Repository'.
  • early-stage repository — too few commits for a meaningful bus factor
  • early-stage repository — too little history to judge knowledge freshness
  • redundant comment (src/DomainDrivenERP.Domain/Entities/Customers/Customer.cs)

New (61)

  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • AnalyzerSeverityNone (src/.editorconfig)
  • …and 41 more

API surface

  • Unchanged — 47 HTTP endpoints

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

Survey your own repository

mohamedelareeg/DomainDrivenERP 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 1801548a3a5cdc3cb010386330efd9248545f52c — 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.