Skip to content
CAI
Software that uses CAICheck a score

TanerSaydam/2025-clean-architecture-setup

45.3

Weak · 21 September 2026

1.1k

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 9-based web API application structured around Clean Architecture principles, utilizing .NET Aspire for orchestration and service defaults. It provides employee management and user authentication capabilities, leveraging MediatR for command/query handling and Entity Framework Core for data persistence. The architecture separates concerns into domain, application, and infrastructure layers, with a modular WebAPI layer exposing endpoints for authentication and employee data.

Features

Added .NET Aspire AppHost and ServiceDefaults scaffolding

The solution now includes a new AppHost project that bootstraps the distributed application using .NET Aspire, specifically registering the CleanArhictecture\_2025\_WebAPI service. Additionally, a ServiceDefaults project was added to provide shared OpenTelemetry, health check, and service discovery configurations for the application.

_src/CleanArhictecture\_2025.AppHost, src/CleanArhictecture\2025.ServiceDefaults · high confidence

Initial Clean Architecture project structure and documentation

The repository now includes a complete Clean Architecture solution file (CleanArhictecture\_2025.sln) that organizes the project into a modular structure with separate projects for the Web API, service defaults, infrastructure, domain, application, and an app host. A new README.md provides setup instructions and lists the core libraries used, including MediatR, FluentValidation, Mapster, and Entity Framework Core.

(repo-wide) · high confidence

Initial implementation of employee management and authentication

This change introduces the core domain models and application logic for managing employees and handling user authentication. It adds the \Employee\ entity with associated data transfer objects and repository interfaces, alongside commands and queries for creating and retrieving employee records. Additionally, it implements a \LoginCommand\ for user authentication using ASP.NET Identity, supported by a \ValidationBehavior\ for request validation via MediatR and FluentValidation. The infrastructure layer is updated with Entity Framework Core configurations and database migrations to persist the new \Employees\ and \Users\ tables, including audit fields like \CreateAt\, \UpdateAt\, and \IsDeleted\.

_src/CleanArhictecture\_2025.Application, src/CleanArhictecture\_2025.Domain, src/CleanArhictecture\2025.Infrastructure · high confidence

Introduces structured API startup and routing for authentication and employee endpoints

The WebAPI project now uses a modular installer pattern to configure services and middleware, including JWT authentication, OData support, rate limiting, and CORS. A new exception handler standardizes error responses, while route registration is centralized in the Modules directory, exposing /auth and /employees endpoints via minimal APIs and controllers.

_src/CleanArhictecture\2025.WebAPI · high confidence

Dependencies

Introduce .NET 9 and Aspire-based project structure

The project has been restructured into a clean architecture with separate .csproj files for the AppHost, Application, Domain, Infrastructure, ServiceDefaults, and WebAPI layers. All projects target .NET 9.0 and include specific package references such as Aspire Hosting, MediatR, FluentValidation, Mapster, Keycloak authentication, Entity Framework Core, and OpenTelemetry, establishing the foundational dependencies for the application.

(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 45 → 45 (-0.1)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 80 → 80 (-0.3)
  • Architecture 85 → 85 (+0.0)
  • Maturity 53 → 53 (+0.0)
  • Readiness 26 → 26 (+0.0)
  • Security 67 → 66 (-0.8)

Resolved (12)

  • Duplicated block (12 lines × 2) (src/CleanArhictecture_2025.Infrastructure/Services/KeycloakService.cs)
  • Duplicated block (13 lines × 2) (src/CleanArhictecture_2025.Infrastructure/Services/KeycloakService.cs)
  • No exposed public API
  • Secret: generic-api-key (src/CleanArhictecture_2025.WebAPI/appsettings.json)
  • The property for the full address is named FulLAddress (with a capital L), which appears to be a typo for FullAddress. Other address components like City and Town are correctly spelled.
  • The word 'Personnel' is misspelled as 'Personel' in the type name PersonelInformation and its members.
  • Timestamp properties use the suffix 'At' (e.g., CreateAt), which is grammatically incorrect for a timestamp (should be 'On' or 'Date' or 'Time'). Additionally, there is inconsistency with CreateUserName/UpdateUserId vs CreateAt/UpdateAt naming conventions for audit fields.
  • XML-doc coverage: CleanArhictecture_2025.AppHost (src/CleanArhictecture_2025.AppHost/CleanArhictecture_2025.AppHost.csproj)
  • early-stage repository — too few commits for a meaningful bus factor
  • early-stage repository — too little history to judge knowledge freshness
  • git history depth insufficient
  • git history depth insufficient

New (17)

  • CommentedOutCode (src/CleanArhictecture_2025.ServiceDefaults/Extensions.cs)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (11 lines × 6) (src/CleanArhictecture_2025.Infrastructure/Services/KeycloakService.cs)
  • Duplicated block (19 lines × 6) (src/CleanArhictecture_2025.Infrastructure/Services/KeycloakService.cs)
  • Duplicated block (25 lines × 2) (src/CleanArhictecture_2025.Infrastructure/Services/KeycloakService.cs)
  • Duplicated block (25 lines × 3) (src/CleanArhictecture_2025.Infrastructure/Services/KeycloakService.cs)
  • End-of-life runtime: .NET net9.0
  • High secret: WD-SECRET-0002 (src/CleanArhictecture_2025.WebAPI/appsettings.json)
  • Members sharing a duplicated core (6 members, 50+ identical tokens) (src/CleanArhictecture_2025.Infrastructure/Services/KeycloakService.cs)
  • Migration classes are named 'mg1' and 'mg2'. These are not descriptive names and do not follow the standard convention of using timestamps or descriptive names (e.g., '20250101000000_CreateEmployeeTable').
  • The Turkish Identity Number is named 'TCNo' in 'PersonelInformation' but 'TCNO' in 'Employee'. The casing is inconsistent (camelCase vs PascalCase/acronym).
  • The concept of an employee's date of birth is named 'BirthOfDate' throughout the domain and application layers. This is non-standard English; the correct term is 'DateOfBirth'. 'BirthOfDate' implies the date OF the birth event, whereas 'DateOfBirth' is the standard property name for the attribute.
  • The naming convention for user identity properties is inconsistent. Some properties use 'CreateUserId'/'UpdateUserId' (storing the ID), while others use 'CreateUserName'/'UpdateUserName' (storing the name). The method 'GetUpdateUserName' also suggests a name is returned. If the system stores IDs, the properties should be 'CreatedById'/'UpdatedById' or similar. If it stores names, 'UserName' is ambiguous (could be login name vs display name). The mix of 'Id' and 'Name' suffixes for similar audit fields is confusing.
  • The property 'FulLAddress' contains a typo (capital 'L' instead of lowercase 'l'). While 'FullName' is correct, 'FulLAddress' is inconsistent with standard naming conventions and likely a typo for 'FullAddress'.
  • The type 'PersonelInformation' uses the misspelling 'Personel' (missing 'n'). This is a consistent typo across the codebase, but it is an inconsistency with standard English spelling ('Personnel').
  • redundant comment (src/CleanArhictecture_2025.ServiceDefaults/Extensions.cs)

API surface

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

TanerSaydam/2025-clean-architecture-setup 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 efa35720180aa476ba549687c3dfe5de6b71c923 — 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-fa71c66cabd8.