thangchung/clean-architecture-dotnet
46.6
Weak · 20 September 2026
6.3k
lines of production code
C#
primary language
4
measurements over time
What this system is
This system is a .NET 6 sample application demonstrating Clean Architecture, Domain-Driven Design, and CQRS patterns for an eCommerce domain. It comprises microservices for products, customers, and settings, coordinated by an App Gateway and secured via an Identity Server. The infrastructure leverages Dapr for event brokering and transactional outboxes, EF Core for data persistence, and OpenTelemetry for distributed tracing.
Features
Add Customer Service sample with EF Core compiled models and App Gateway
The samples directory now includes a new Customer Service microservice and an App Gateway. The Customer Service sample demonstrates a .NET 6 architecture using EF Core compiled models (RuntimeModel) for the Customer and CreditCard entities, alongside Dapr integration for the transactional outbox and event bus. The App Gateway is a new reverse-proxy component that routes requests to the Customer, Product, and Setting applications.
samples · high confidence
Added PlantUML architecture and design diagrams
New PlantUML source files have been added to the assets/PlantUML directory to provide visual documentation of the eCommerce system. These include a detailed class diagram showing inheritance and composition relationships, a context diagram illustrating component interactions, an entity-relationship diagram, a services diagram outlining service boundaries, and a use-case diagram defining actor interactions for product, customer, cart, and settings management.
assets/PlantUML · high confidence
Added customer creation use case and Bootstrap 4.5.3 assets
The Customer Service now supports creating new customers via a new \CreateCustomer\ command handler that validates input (first name, last name, email) and verifies the associated country exists before persisting the record. Additionally, the Identity Server sample now includes the Bootstrap 4.5.3 front-end framework assets (CSS, JS, and documentation) in its wwwroot directory.
(repo-wide) · high confidence
Added inbox/outbox pattern diagram
A new diagram illustrating the inbox/outbox messaging patterns has been added to the assets folder, providing a visual reference for the application's distributed transaction and event handling architecture.
assets · high confidence
Initial release of the Clean Architecture .NET sample application
The repository has been initialized with a complete sample application demonstrating Clean Architecture, Domain-Driven Design Lite, and CQRS Lite patterns. The solution includes microservices for Product, Customer, and Settings, along with an App Gateway and an Identity Server. The infrastructure leverages Dapr for transactional outboxes and message brokering, uses PostgreSQL for persistence, and is containerized via Docker Compose. The project targets .NET 6 Preview 5 and includes standard development tooling such as .editorconfig, .dockerignore, and solution-level settings.
(repo-wide) · high confidence
Introduce EF Core repository, transactional MediatR behavior, and OpenTelemetry tracing
The application now uses a new EF Core infrastructure layer that provides a generic repository for data access and a MediatR pipeline behavior to wrap commands in database transactions, automatically publishing domain events upon success. Additionally, OpenTelemetry tracing is integrated via a MediatR pipeline behavior that instruments requests with Zipkin-compatible spans, enabling distributed tracing for command handling.
src/N8T.Infrastructure.EfCore · high confidence
Introduces core domain, infrastructure, and architectural scaffolding
This change establishes the foundational architecture for the application by introducing a comprehensive set of new files across the core domain and infrastructure layers. In N8T.Core, it defines the domain model with base entities, aggregate roots, and domain events, alongside a CQRS pattern implementation using MediatR (including command/query interfaces and result models) and a Specification pattern for complex data querying. In N8T.Infrastructure, it sets up the application startup and configuration, including JWT-based authentication with authorization behaviors, a Dapr-based event bus for domain event publishing, and a centralized logging system with Serilog and trace ID enrichment. It also provides infrastructure helpers for configuration, service invocation, and API status reporting, effectively wiring the core domain concepts to the necessary external services and middleware.
src/N8T.Core, src/N8T.Infrastructure · high confidence
Dependencies
Upgrade to .NET 6 Preview 5 and update core dependencies
The sample applications and core infrastructure libraries have been migrated to the .NET 6.0 target framework (Preview 5), enabling the use of C\# preview language features. This update aligns the project with the latest .NET 6 preview releases, including specific package versions such as Microsoft.EntityFrameworkCore 6.0.0-preview.5, Microsoft.AspNetCore.Authentication.JwtBearer 6.0.0-preview.5, and Microsoft.Extensions.\* 6.0.0-preview.5 packages. Additionally, supporting libraries like OpenTelemetry, FluentValidation, and RestEase have been updated to their respective versions to ensure compatibility with the new runtime.
(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 48 → 47 (-1.0)
- Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 68 → 65 (-3.1)
- Architecture 75 → 85 (+10.1)
- Maturity 58 → 58 (+0.0)
- Readiness 31 → 29 (-1.2)
- Security 66 → 61 (-5.0)
- Domain Modelling 59 → 58 (-1.2)
- Event-Driven 100 → 100 (+0.0)
Resolved (18)
- Bounded contexts not declared
- Duplicated block (11 lines × 2) (samples/Product/ProductService.Infrastructure/Data/CompiledModels/ProductEntityType.cs)
- Duplicated block (11 lines × 3) (samples/Product/ProductService.Infrastructure/Data/CompiledModels/ProductCodeEntityType.cs)
- Duplicated block (18 lines × 2) (samples/IdentityServer/Program.cs)
- Duplicated block (9 lines × 2) (samples/Product/ProductService.Infrastructure/Data/CompiledModels/ReturnEntityType.cs)
- Duplicated block (9 lines × 6) (samples/Product/ProductService.Infrastructure/Data/CompiledModels/ProductCodeEntityType.cs)
- High: security finding (details withheld)
- High: security finding (details withheld)
- LLM evaluation failed
- No exposed public API
- Outdated: Microsoft.ReverseProxy
- Outdated: OpenTelemetry.Instrumentation.GrpcNetClient
- Outdated: OpenTelemetry.Instrumentation.StackExchangeRedis
- Prerelease dependency: Microsoft.NET.ILLink.Analyzers
- Prerelease dependency: Microsoft.NET.ILLink.Tasks
- Test reliability not measured — no test run produced results
- dormant codebase — no living knowledge left to concentrate
- redundant comment (samples/Customer/CustomerService.AppCore/Core/Entities/Customer.cs)
New (49)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Duplicated block (10 lines × 2) (src/N8T.Core/Specification/ISpecification.cs)
- Duplicated block (11 lines × 2) (samples/Customer/CustomerService.Api/V1/TransactionalOutboxProcessor.cs)
- Duplicated block (13 lines × 3) (samples/Customer/CustomerService.Infrastructure/Extensions.cs)
- Duplicated block (13 lines × 3) (samples/Customer/CustomerService.Infrastructure/Extensions.cs)
- Duplicated block (13–18 lines × 2) (samples/Customer/CustomerService.Infrastructure/Extensions.cs)
- Duplicated block (15 lines × 2) (samples/Customer/CustomerService.Infrastructure/Extensions.cs)
- Duplicated block (18 lines × 2) (samples/Customer/CustomerService.Infrastructure/Extensions.cs)
- Duplicated block (21–28 lines × 2) (samples/WebBlazor/Server/Program.cs)
- Duplicated block (9 lines × 2) (src/N8T.Core/Specification/GridSpecificationBase.cs)
- End-of-life runtime: .NET net6.0
- High IaC: WD-COMPOSE-0002 (docker-compose.yml)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Low XML-doc coverage: AppGateway (samples/AppGateway/AppGateway.csproj)
- Low XML-doc coverage: Blazor.Client (samples/WebBlazor/Client/Blazor.Client.csproj)
- Low XML-doc coverage: Blazor.Server (samples/WebBlazor/Server/Blazor.Server.csproj)
- Low XML-doc coverage: CoolStore.AppContracts (samples/DataContracts/CoolStore.AppContracts/CoolStore.AppContracts.csproj)
- …and 29 more
API surface
- Unchanged — 9 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
thangchung/clean-architecture-dotnet 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 2870740c26dfbff8d9178596d73f5ebec4bb2687 — 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.