Skip to content
CAI
Software that uses CAICheck a score

feijie999/JieDDDFramework

33.9

Weak · 20 September 2026

4.3k

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 Domain-Driven Design framework for .NET Core that provides foundational infrastructure for building microservices, including DDD primitives, Entity Framework data access, and IdentityServer4 authentication. It offers a standardized architecture with generic repositories, MediatR pipeline behaviors, and automatic model configuration to streamline development. The repository also includes example implementations for Identity and Order management services to demonstrate these capabilities.

Features

Add HTTP request provider for Web API communication

The framework now includes a new RequestProvider component in the core library to handle Web API requests. This addition introduces an IRequestProvider interface and a concrete RequestProvider implementation that supports GET, POST, PUT, and DELETE operations with JSON serialization and Bearer token authentication. It also includes a custom HttpRequestExceptionEx to expose HTTP status codes on errors, enabling better error handling for API interactions.

JieDDDFramework.Core/RequestProvider · high confidence

Add Identity module with JWT authentication and IdentityServer4 integration

The Identity module now provides a complete authentication and authorization stack. It introduces a custom \ApplicationUser\ model with profile fields (name, city, state, country) and an \IdentityUserDbContext\ for data persistence. Authentication is handled via \IdentityLoginService\, which supports login by email or username, and integrates with IdentityServer4 through \IdentityServerExtensions\ to configure the configuration and operational stores. A \ProfileService\ is included to issue JWT claims (subject, preferred username, name, address, email, phone) and manage user session activity. Configuration for JWT tokens (issuer, audience, secret key, client ID) is exposed via \JwtSettings\, and a \RedirectService\ assists in parsing redirect URIs for OAuth/OIDC flows.

Module · high confidence

Added Account and Order API controllers

Introduced AccountController and OrderController in the Order.API project. The AccountController provides a login endpoint that authenticates users via IdentityServer4 and returns an access token. The OrderController exposes endpoints for creating orders (using MediatR and extracting user identity from claims) and retrieving a paginated list of orders, including details such as payment type, address, buyer name, and order items.

Example/Order.API/Controllers · high confidence

Added Entity Framework Core configuration for Order domain aggregates

New entity type configurations have been added to define the database schema for the Order domain, including Buyers, Orders, Order Items, Order Statuses, Payment Methods, and Payment Types. These configurations specify table names, primary keys, property constraints (such as max lengths and required fields), and relationships (including one-to-many and many-to-one associations) to ensure the database context correctly maps the domain model.

Example/Order.Domain/EntityConfigurations · high confidence

Added order creation capability with validation and persistence

Users can now create orders through a new command handler that accepts order items and shipping address details. The system validates that the address fields (city, street, state, country, zip code) are not empty and that order items contain valid product information with positive prices and discounts. Upon successful validation, the order is persisted to the repository via the unit of work pattern.

Example/Order.Domain/Application · high confidence

Adds MediatR pipeline behaviors for logging and validation

The framework now includes built-in MediatR pipeline behaviors that automatically log request handling and enforce FluentValidation rules. A new \LoggingBehavior\ records when requests are handled and responses are returned, while a \ValidatorBehavior\ intercepts requests to validate them against registered validators, throwing a \KnownException\ if validation fails. These behaviors are registered via the \AddDefaultMediatRBehaviors\ extension method, and a \NoMediator\ stub is provided for scenarios where the mediator is not needed.

JieDDDFramework.Core/MediatR · high confidence

Adds configurable database migration and seed data execution

The framework now includes a dedicated migration module that allows applications to automatically apply Entity Framework Core database migrations and execute seed data during startup. This is controlled by a new \MigrateOptions\ configuration (defaulting to enabled) and exposes extension methods (\AddMigrateService\, \MigrateDbContext\) to wire up the migration logic. The implementation includes retry policies for transient SQL exceptions and supports custom seed implementations via the \IDbContextSeed\ interface, ensuring the database schema and initial data are ready before the application runs.

JieDDDFramework.Data.EntityFramework/Migrate · high confidence

Initial Identity API scaffolding with MySQL persistence and seed data

The Identity.API example application is introduced, providing a complete identity management service. It uses Entity Framework Core with MySQL (via Pomelo) for persistence, including initial migrations for both the IdentityServer4 configuration context and the ASP.NET Core Identity user context. The service is pre-seeded with a default demo user ([e-mail redacted]) and configured IdentityServer4 clients (including MVC and Swagger UI clients) and API resources. Authentication is handled via JWT Bearer tokens, and the API exposes Swagger documentation for testing.

Example/Identity.API · high confidence

Initial database migration for Order API

Added the initial Entity Framework Core migration (20181202061912\_initial) for the Order.API, establishing the foundational database schema. This migration creates tables for Buyers, PaymentMethods, PaymentTypes, Orders, OrderItems, and OrderStatus, including necessary foreign key relationships and indexes to support the domain aggregates.

Example/Order.API/Migrations · high confidence

Initial domain model for Order and Buyer aggregates

This change introduces the core domain entities for the Order system, including the Buyer aggregate (with PaymentMethod and PaymentType), the Order aggregate (with OrderItem, Address, and OrderStatus), and the associated domain events. It establishes the foundational data structures and relationships required to track buyers, their payment methods, and the lifecycle of orders from submission through various status states.

Example/Order.Domain/Aggregates · high confidence

Initial project scaffolding and repository setup

The repository has been initialized with the JieDDDFramework solution, including the core domain model, Entity Framework data layer, Identity module, and example Order and Identity API services. Documentation (README, LICENSE, \_config.yml) and build artifacts (.dockerignore, .gitignore) have been added to support development and deployment.

(repo-wide) · high confidence

Initial release of the Order.API service

The Order.API project has been introduced as a new .NET Core 2.2 ASP.NET Core web service. It provides endpoints for creating orders and listing order history, with input validation handled via FluentValidation. Authentication is configured to use Bearer tokens (JWT) exclusively, and the service connects to a MySQL database using Entity Framework Core with automatic migration support on startup. The API is containerized via a new Dockerfile and exposes Swagger documentation for testing.

Example/Order.API · high confidence

Introduced OrderDbContext and initial seed data for order aggregates

Added the OrderDbContext class to manage database context for order-related aggregates, including Orders, OrderItems, Payments, Buyers, PaymentTypes, and OrderStatus. The context is configured to inject IMediator for handling domain events. Additionally, an OrderDbContextSeed implementation was added to initialize default OrderStatus and PaymentType enumerations during database setup, ensuring required reference data is present before order processing begins.

Example/Order.Domain/DbContexts · high confidence

Introduction of Entity Framework-based generic repository with aggregate root enforcement

A new generic repository implementation for Entity Framework has been added to the framework. This repository provides standard CRUD operations (Insert, Update, Delete, Find) for entities. A key behavioral addition is the enforcement of the Domain-Driven Design pattern: the Find methods now throw a DomainException if the retrieved entity does not implement the IAggregateRoot interface, ensuring that only aggregate roots can be retrieved directly through this repository layer.

JieDDDFramework.Data.EntityFramework/Repositories · high confidence

Introduction of core API result and pagination model classes

The \JieDDDFramework.Core/Models\ area now includes foundational model classes to standardize API responses and data pagination. Users can now utilize \ApiResult\ and \ApiResult\<T\>\ for structured API responses with status codes and typed values, built upon the new \Result\ and \IResult\ interfaces that provide \Succeed\/\Fail\ methods. Additionally, a complete pagination system is introduced via \PagedList\<T\>\, \IPagedList\<T\>\, and related interfaces (\IPagerBase\, \IPagerQuery\), along with \PageOrders\ for sorting, enabling consistent handling of paginated data across the application.

JieDDDFramework.Core/Models · high confidence

Introduction of core DDD domain primitives and interfaces

This change introduces the foundational building blocks for the domain layer, including abstract base classes for Entities (with generic key support and domain event management), Value Objects (with structural equality), and Enumerations (with lookup helpers). It also defines the core interfaces for IAggregateRoot, IRepository (constrained to aggregate roots), and IUnitOfWork (with async save capabilities), establishing the structural contract for domain-driven design within the framework.

JieDDDFramework.Core/Domain · high confidence

Introduction of core configuration model classes and extension methods

The framework now includes a set of configuration models and helper methods in the JieDDDFramework.Core.Configures namespace to support application setup. This adds a BaseConfig class for managing connection strings, cluster environment flags, and logging settings, alongside dedicated Connectionstrings and Logging models. Additionally, a ConfigureExtensions utility is provided to simplify binding configuration data to strongly-typed options within the dependency injection container.

JieDDDFramework.Core/Configures · high confidence

Introduction of generic base repository interface

A new generic base repository interface (IRepositoryBase) has been added to the data layer, providing standard CRUD operations (Insert, Update, Delete) and entity retrieval methods (FindEntity) for entities implementing the IEntity interface. This interface establishes the foundational contract for data access within the framework, supporting both synchronous and asynchronous execution patterns.

JieDDDFramework.Data · high confidence

New Entity Framework data-access extensions and DI registration

The JieDDDFramework.Data.EntityFramework package now provides several new extension methods and a dependency-injection helper. Developers can filter entities by creation time ranges, exclude soft-deleted records, and sort by creation time via EntitySpecificationExtensions. Repository queries can be paginated using the new ToPageResult method on IQueryable. Domain events are automatically published through a Mediator extension that clears events after dispatch. Finally, AddRepository registers the DbContext and IRepositoryBase in the service collection.

JieDDDFramework.Data.EntityFramework · high confidence

New LINQ and Type utility extensions added

The framework now includes two new extension classes in the core library. LinqSelectExtensions provides a safe SelectTry method that wraps LINQ projections in try-catch blocks, allowing users to handle exceptions during enumeration without breaking the sequence, along with helper methods to process caught exceptions. TypeExtensions adds an IsInherit method to check if a type inherits from or implements a specified base type or interface, supporting generic type definitions.

JieDDDFramework.Core/Extensions · high confidence

New automatic model configuration and service infrastructure

The framework now includes a dedicated model configuration module that simplifies Entity Framework setup. It introduces a base \DDDEntityTypeConfiguration\ class that automatically ignores domain events and delegates mapping, along with a \ModelBuilderExtensions.AutoApplyConfiguration\ method for scanning and registering entity configurations. A new service layer (\IAutoApplyConfigurationService\, \IFixModelConfigurationService\, \IGlobalFilterService\) and a \DefaultModelConfigurationProvider\ manage these configurations, exposed via the \AddEFModelConfiguration\ extension. The \ModelConfigurationOption\ allows users to configure default query filter fields (e.g., \IsDeleted\) and specify namespaces for automatic registration per DbContext type.

JieDDDFramework.Data.EntityFramework/ModelConfigurations · high confidence

New entity state interfaces for tracking creation, modification, and deletion

The framework now provides three new interfaces in the EntitySpecifications namespace to standardize entity state tracking: ICreatedTimeState exposes a read-only CreatedTime property, IModificationState provides a get/set ModifiedTime property, and IDeletedState exposes both a Deleted boolean flag and an optional DeletedTime timestamp. These interfaces allow domain entities to implement consistent auditing and soft-delete behaviors.

JieDDDFramework.Core/EntitySpecifications · high confidence

New exception types and argument validation utilities added

The framework now includes a set of new exception classes—DomainException, KnownException (with an error code), and ServiceAuthenticationException (with content)—alongside a static Check utility class for argument validation (e.g., NotNull, NotEmpty, HasNoNulls) and an ExceptionExtension helper to retrieve all exception messages. These additions provide standardized ways to handle domain errors, service authentication issues, and parameter validation within the application.

JieDDDFramework.Core/Exceptions · high confidence

New model configuration services for EF Core

The framework now includes a set of services in the \ModelConfigurations.Services\ namespace to manage Entity Framework Core model building. \DefaultAutoApplyConfigurationService\ automatically applies configuration classes based on a namespace dictionary. \DefaultFixModelConfigurationService\ enforces a maximum length of 64 characters on string primary keys and string properties for entities implementing \IEntity\ when no length is specified. \DefaultGlobalFilterService\ applies a global query filter to boolean properties listed in the configuration, filtering out records where the property is false.

JieDDDFramework.Data.EntityFramework/ModelConfigurations/Services · high confidence

Service layer introduces standard query and DTO interfaces

The JieDDDFramework.Service layer now provides a set of base interfaces to standardize data access and transfer. It defines DTO contracts (IDto, IRequest, IResponse) and a generic IQueryService that combines standard CRUD operations (GetById, GetAll) with pagination support (PageQuery). These interfaces are available in both synchronous and asynchronous variants, establishing the foundation for service implementations to expose data retrieval capabilities.

JieDDDFramework.Service · high confidence

Behavioural changes

EF Core AOP interception for model configuration is disabled

The automatic AspectCore AOP interception that previously applied model configurations (such as global filters and auto-applied configurations) during DbContext creation has been disabled. The code now explicitly comments out the interceptor registration in ServiceContainerExtensions and removes the EFInterceptor implementation, meaning model configuration must now be handled through other means rather than this automatic AOP mechanism.

JieDDDFramework.Data.EntityFramework/AopConfigurations · high confidence

New DomainDbContext with explicit AOP model configuration

A new abstract DomainDbContext class has been introduced in the Entity Framework data layer. This class integrates MediatR for handling domain events during save operations and explicitly invokes AspectCore-based AOP services to configure the Entity Framework model, including applying global filters, fixing model definitions, and auto-applying configurations.

JieDDDFramework.Data.EntityFramework/DbContext · high confidence

Standardized API error responses and FluentValidation integration

The web layer now provides a consistent API response structure via a new BaseController, which simplifies returning success or failure results with standardized codes and messages. Validation errors are now handled through FluentValidation, where a custom interceptor captures validation failures and returns them in a structured ModelErrorResult, ensuring that error codes and messages are consistently exposed to clients. Additionally, a global exception filter ensures that unhandled exceptions return a uniform error response, improving the reliability and predictability of API interactions.

JieDDDFramework.Web · high confidence

Dependencies

Initial project structure and dependency configuration

The repository introduces the foundational project structure for the JieDDDD Framework, defining nine new project files (csproj) that establish the core, data, service, and web layers, along with example APIs for Identity and Order management. This change sets the target frameworks to .NET Core 2.2 and .NET Standard 2.0, and configures key dependencies including Entity Framework Core 2.2, Pomelo MySQL provider, Autofac for dependency injection, AspectCore for AOP, FluentValidation, IdentityServer4, and Swagger for API documentation.

(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

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 36 → 34 (-2.4)
  • Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 52 → 49 (-3.6)
  • Architecture 83 → 83 (-0.1)
  • Maturity 48 → 48 (+0.0)
  • Readiness 20 → 20 (+0.3)
  • Security 70 → 71 (+1.0)
  • Domain Modelling 42 → 33 (-9.2)
  • Event-Driven 100 → 100 (+0.0)

Resolved (18)

  • Bounded contexts not declared
  • Duplicated block (11 lines × 2) (JieDDDFramework.Core/RequestProvider/RequestProvider.cs)
  • High CVE: Microsoft.NETCore.App 2.2.0
  • High CVE: Microsoft.NETCore.App 2.2.0
  • High CVE: System.Net.Security 4.3.0
  • High CVE: System.Net.Security 4.3.0
  • Medium CVE: IdentityServer4 2.3.0
  • Medium CVE: IdentityServer4 2.3.0
  • Medium CVE: Microsoft.NETCore.App 2.2.0
  • Medium CVE: System.Data.SqlClient 4.5.1
  • Medium CVE: System.Net.Security 4.3.0
  • Medium CVE: System.Net.Security 4.3.0
  • Medium: security finding (details withheld)
  • No exposed public API
  • Outdated: IdentityServer4.AspNetIdentity
  • Outdated: IdentityServer4.EntityFramework
  • Outdated: Microsoft.AspNetCore.DataProtection.Redis
  • dormant codebase — no living knowledge left to concentrate

New (16)

  • CommentedOutCode (Example/Order.Domain/EntityConfigurations/OrderEntityTypeConfiguration.cs)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (11 lines × 2) (JieDDDFramework.Core/RequestProvider/RequestProvider.cs)
  • Duplicated block (11 lines × 2) (JieDDDFramework.Core/RequestProvider/RequestProvider.cs)
  • Duplicated block (18–28 lines × 2) (Example/Identity.API/Startup.cs)
  • End-of-life runtime: .NET netcoreapp2.2
  • High CVE: Microsoft.NETCore.App 2.2.0
  • High CVE: System.Net.Security 4.3.0
  • High secret: WD-SECRET-0004 (Example/Identity.API/cas.clientservice.pfx)
  • Leaked secret: private-key-store (Example/Identity.API/cas.clientservice.pfx)
  • Medium CVE: IdentityServer4 2.3.0
  • WriteOnlyPrivateField (Example/Identity.API/Controllers/AccountController.cs)
  • WriteOnlyPrivateField (Example/Order.Domain/Application/Commands/CreateOrderCommandHandler.cs)
  • WriteOnlyPrivateField (Example/Order.Domain/DbContexts/OrderDbContext.cs)
  • WriteOnlyPrivateField (Example/Order.Domain/Events/DomainEventHandlers/OrderStartedDomainEventHandler.cs)

API surface

  • Unchanged — 10 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

feijie999/JieDDDFramework 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 20 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 4d1df0089196c681b3ca78fe7d15442fb5976884 — 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.