Skip to content
CAI
Software that uses CAICheck a score

kawser2133/web-api-project

46.5

Weak · 21 September 2026

2.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 an ASP.NET Core Web API application designed to manage users, roles, and products. It implements a layered architecture comprising an API layer, a core domain layer, and an infrastructure layer that handles data persistence via Entity Framework Core. The service provides secure, paginated, and filtered access to these resources, supported by a corresponding set of unit tests.

Features

Initial database schema and repository layer for user, role, and product management

The infrastructure layer now includes the initial Entity Framework Core migration and configuration for the application's data model. This introduces tables for Users, Roles, and Products, along with the associated Identity tables (UserClaims, UserLogins, etc.). The change also adds the \ApplicationDbContext\ and its configuration, a seed script to populate initial roles and sample product data, and repository implementations for authentication, user management, role management, and product operations, including support for paginated, filtered, and sorted data retrieval.

Project.Infrastructure · high confidence

Initial release of ASP.NET Core Web API template

The repository now includes the foundational files for an ASP.NET Core Web API project, including a solution file (WebApiProject.sln) that defines the project structure (Core, Infrastructure, API, and Unit Test projects), a README.md with setup instructions and feature overview, and a .gitignore file for build artifacts and IDE files.

(repo-wide) · high confidence

Initial release of the Project.API web service

The API is now available, exposing endpoints for authentication, and managing products, roles, and users. The service supports paginated data retrieval with filtering and sorting, and includes in-memory caching for product details. Security is handled via JWT-based authentication and ASP.NET Identity, while Swagger is configured to document all API versions.

Project.API · high confidence

Introduces core domain models, repository interfaces, and service implementations for user, role, and product management

The Project.Core layer now includes the foundational building blocks for the application's business logic. This includes new domain entities (User, Role, Product) and their corresponding ViewModels for data transfer. To support these entities, generic repository interfaces (IBaseRepository, IAuthRepository, etc.) and service interfaces (IBaseService, IAuthService, etc.) have been defined. The implementation of these interfaces is provided through concrete service classes (AuthService, BaseService, ProductService, etc.) that handle operations like pagination, filtering, and CRUD actions, effectively establishing the core architecture for managing users, roles, and products.

Project.Core · high confidence

Test coverage

Added unit tests for the Product feature

New unit tests have been added to verify the behavior of the Product controller, service, and repository. The test suite covers the controller's Get action, the service's CreateProductAsync method, and the repository's AddAsync operation, ensuring that the Product feature functions correctly across the application layers.

Project.UnitTest · high confidence

Dependencies

Initial project structure and dependency definitions

Added four new .csproj files (Project.API, Project.Core, Project.Infrastructure, Project.UnitTest) that establish the solution's layered architecture. Each project targets .NET 7.0 and includes specific NuGet package references, such as ASP.NET Core Identity, Entity Framework Core providers, and testing libraries like NUnit and Moq.

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

Lenses

  • Code Health 83 → 83 (-0.6)
  • Architecture 82 → 82 (+0.0)
  • Maturity 56 → 56 (+0.0)
  • Readiness 35 → 35 (+0.0)
  • Security 45 → 45 (+0.2)

Resolved (10)

  • Medium CVE: Azure.Identity 1.6.0
  • Medium CVE: Azure.Identity 1.6.0
  • No exposed public API
  • Secret: generic-api-key (Project.API/appsettings.json)
  • The IProductService interface uses GetAll, GetById, Create, Update, Delete. This is consistent with IUserService. However, IProductService also has PriceCheck and GetPaginatedData. IUserService has GetPaginatedData as well. The inconsistency is not within the interface but potentially between IUserService and IRoleService. Let's check IRoleService.
  • The IRoleService interface is missing GetAll and GetById methods, or they are not listed in the sample. If IRoleService does not have GetAll/GetById while IUserService and IProductService do, this is an inconsistency in the service layer's public API. Additionally, IRoleService has Create, Update, Delete. It lacks Get... methods in the provided list, which might be a missing implementation or a different naming convention (e.g., Find vs Get).
  • The IUserService interface uses a mix of naming conventions for its methods. It uses GetAll, GetById, Create, Update, Delete which is a standard CRUD pattern. However, it also includes ResetPassword which is a specific action, not a standard CRUD operation. While not strictly an inconsistency in the CRUD verbs, the interface mixes standard repository-like verbs (Get, Create, Update, Delete) with domain-specific actions (ResetPassword). A more consistent approach might be to separate domain actions from generic CRUD operations, or ensure all methods follow a similar naming pattern (e.g., ResetPassword is fine, but GetAll and GetById are also fine. The real inconsistency is between IUserService and IProductService/IRoleService which might have different patterns. Let's look at IProductService.
  • The interface IBaseRepository<T> contains methods with inconsistent naming conventions. Specifically, IsExists is used for existence checks, while GetAll, GetById, CreateRange, and GetPaginatedData follow a 'Get/Create' pattern. However, Update and PriceCheck do not follow the 'Get/Create/Update' pattern consistently (e.g., Update vs CreateRange). More importantly, the method IsExists is a non-standard name for a repository query method, whereas GetAll and GetById are standard. A more consistent approach would be to use Exists or GetBy... for all query methods, or Find/Get for all. The mix of IsExists with Get... methods is inconsistent.
  • early-stage repository — too little history to judge knowledge freshness
  • single-maintainer — knowledge-concentration (bus factor) risk

New (9)

  • Documentation: no contributor guidance (README.md)
  • Documentation: no licence statement (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (10 lines × 2) (Project.Core/Entities/Business/ProductViewModel.cs)
  • Duplicated block (10 lines × 2) (Project.Core/Entities/Business/UserViewModel.cs)
  • End-of-life runtime: .NET net7.0
  • High secret: WD-SECRET-0002 (Project.API/appsettings.json)
  • High secret: WD-SECRET-0002 (Project.API/appsettings.json)
  • WriteOnlyPrivateField (Project.API/Controllers/V1/AuthController.cs)

API surface

  • Unchanged — 20 HTTP endpoints

Architecture

  • Unchanged — 2 containers · 0 contexts · 0 edges

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

Survey your own repository

kawser2133/web-api-project 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 afd8dad7e960ccee20280ead213ede486ee8c4bf — 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.