iayti/CleanArchitecture
46.3
Weak · 8 November 2026
3k
lines of production code
C#
primary language
7
measurements over time
What this system is
This system is a Clean Architecture-based ASP.NET Core 6 API that manages city, district, and village data through a structured application layer. It exposes RESTful endpoints for CRUD operations, authentication, and weather forecasts, while enforcing standardized error handling and request processing via MediatR behaviors. The architecture is containerized with Docker and supported by comprehensive unit and integration tests.
Features
Added API exception filter for standardized error handling
A new ApiExceptionFilterAttribute has been added to the API layer to centralize exception handling. This filter intercepts specific exceptions (ValidationException, NotFoundException, UnauthorizedAccessException, ForbiddenAccessException) and invalid model states, mapping them to structured ServiceResult responses with appropriate HTTP status codes (e.g., 400, 404, 403, 500). This ensures consistent error responses for API consumers.
src/Apps/CleanArchitecture.Api/Filters · high confidence
Added application layer infrastructure and city management features
Introduced a new application layer structure in src/Common, including common infrastructure such as MediatR pipeline behaviors (authorization, logging, performance monitoring, validation, and exception handling), custom exception classes, and shared models (ServiceResult, ServiceError, PaginatedList). Additionally, implemented full CRUD operations (Create, Read, Update, Delete) and event handlers for the City domain, along with a GetToken query for user authentication.
src/Common · high confidence
Initial release of the Clean Architecture template
The repository is initialized with the core structure for a Clean Architecture ASP.NET Core 6 solution, including the solution file, project definitions, and configuration files. It introduces Docker support via docker-compose.yml for running SQL Server, Elasticsearch, and Kibana, and adds standard project metadata files such as the MIT license, a Code of Conduct, and a Contributing guide.
(repo-wide) · high confidence
Initial release of the CleanArchitecture.Api application
The API application is now fully bootstrapped with ASP.NET Core 6, including a Dockerfile for containerized builds, a Program entry point that handles database migrations and seeding, and a Startup class that configures services such as FluentValidation, Swagger, and health checks. Configuration files (appsettings) and environment-specific settings for IdentityServer and logging are also included, establishing the foundational runtime environment for the API.
src/Apps/CleanArchitecture.Api · high confidence
New API controllers for city, district, village, and weather forecast endpoints
The API now exposes new endpoints for managing cities, districts, and villages, as well as retrieving weather forecasts. The \BaseApiController\ provides a shared \Mediator\ for handling requests via the MediatR library. Each controller implements specific HTTP methods: \CitiesController\ and \VillagesController\ support full CRUD or list operations with pagination and cancellation tokens; \DistrictsController\ handles creation and export; \LoginController\ manages authentication token retrieval; and \WeatherForecastController\ provides static and current weather data. All controllers are located in \src/Apps/CleanArchitecture.Api/Controllers\ and rely on the underlying application layer queries and commands.
src/Apps/CleanArchitecture.Api/Controllers · high confidence
Test coverage
Added integration tests for Cities, Districts, and Villages; Added unit tests for Mapster mapping configurations; Added unit tests for exception classes; Added unit tests for the RequestLogger/LoggingBehaviour.
Dependencies
Upgrade to .NET 6 and update NuGet packages
The project files for the API, application, domain, infrastructure, and test projects have been updated to target .NET 6.0. Additionally, various NuGet packages have been upgraded to their latest versions, including FluentValidation (v10.4.0), MediatR (v10.0.1), and Microsoft.EntityFrameworkCore (v6.0.9).
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 44 → 46 (+1.9)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 76 → 76 (+0.2)
- Architecture 88 → 88 (+0.0)
- Maturity 44 → 50 (+5.8)
- Readiness 27 → 29 (+1.5)
- Security 54 → 52 (-1.9)
- Domain Modelling 100 → 100 (+0.0)
- Event-Driven 100 → 100 (+0.0)
- Performance 100 → 100 (+0.0)
Resolved (14)
- Coverage not measured — no coverage collector is wired up
- End-of-life runtime: .NET net6.0 (tests/CleanArchitecture.Domain.UnitTests/CleanArchitecture.Domain.UnitTests.csproj)
- Two distinct exception types, ValidationException and ValidateModelException, both expose a property named Errors containing validation failures. While the property name is consistent, the existence of two separate exception classes for what appears to be the same concept (model validation errors) suggests a naming inconsistency in the exception types themselves. One uses the noun 'Validation' and the other the verb form 'Validate' as part of the class name, which is semantically inconsistent for the same domain concept.
- Vulnerable: Microsoft.IdentityModel.JsonWebTokens
- Vulnerable: System.IdentityModel.Tokens.Jwt
- XML-doc coverage: CleanArchitecture.Api (src/Apps/CleanArchitecture.Api/CleanArchitecture.Api.csproj)
- XML-doc coverage: CleanArchitecture.Application (src/Common/CleanArchitecture.Application/CleanArchitecture.Application.csproj)
- XML-doc coverage: CleanArchitecture.Domain (src/Common/CleanArchitecture.Domain/CleanArchitecture.Domain.csproj)
- XML-doc coverage: CleanArchitecture.Infrastructure (src/Common/CleanArchitecture.Infrastructure/CleanArchitecture.Infrastructure.csproj)
- XML-doc coverage: CleanArchitecture.Infrastructure.Npgsql (src/Common/CleanArchitecture.Infrastructure.Npgsql/CleanArchitecture.Infrastructure.Npgsql.csproj)
- XML-doc coverage: CleanArchitecture.Infrastructure.SqlServer (src/Common/CleanArchitecture.Infrastructure.SqlServer/CleanArchitecture.Infrastructure.SqlServer.csproj)
- XML-doc coverage: CleanArchitecture.Infrastructure.Sqlite (src/Common/CleanArchitecture.Infrastructure.Sqlite/CleanArchitecture.Infrastructure.Sqlite.csproj)
- redundant comment (src/Apps/CleanArchitecture.Api/Controllers/CitiesController.cs)
- redundant comment (src/Apps/CleanArchitecture.Api/Filters/ApiExceptionFilterAttribute.cs)
New (9)
- End-of-life runtime: .NET net6.0 (src/Apps/CleanArchitecture.Api/CleanArchitecture.Api.csproj)
- End-of-life runtime: .NET net6.0 (src/Common/CleanArchitecture.Application/CleanArchitecture.Application.csproj)
- End-of-life runtime: .NET net6.0 (src/Common/CleanArchitecture.Infrastructure.Npgsql/CleanArchitecture.Infrastructure.Npgsql.csproj)
- End-of-life runtime: .NET net6.0 (src/Common/CleanArchitecture.Infrastructure.SqlServer/CleanArchitecture.Infrastructure.SqlServer.csproj)
- End-of-life runtime: .NET net6.0 (src/Common/CleanArchitecture.Infrastructure.Sqlite/CleanArchitecture.Infrastructure.Sqlite.csproj)
- End-of-life runtime: .NET net6.0 (src/Common/CleanArchitecture.Infrastructure/CleanArchitecture.Infrastructure.csproj)
- End-of-life runtime: .NET net6.0 (tests/Aplication.UnitTests/CleanArchitecture.Application.UnitTests.csproj)
- End-of-life runtime: .NET net6.0 (tests/CleanArchitecture.Application.IntegrationTests/CleanArchitecture.Application.IntegrationTests.csproj)
- End-of-life runtime: .NET net6.0 (tests/CleanArchitecture.Domain.UnitTests/CleanArchitecture.Domain.UnitTests.csproj)
API surface
- Unchanged — 6 HTTP endpoints
Architecture
- Unchanged — 2 containers · 1 contexts · 0 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
iayti/CleanArchitecture 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 8 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 199363fa5d4547f2c64feb34a8d8be7dec2fc6aa — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-45ab2cab63de.