Skip to content
CAI
Software that uses CAICheck a score

mehdihadeli/vertical-slice-api-template

56.1

Weak · 21 September 2026

11.7k

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 is a .NET 9-based application template that implements a product catalog service using a CQRS architecture with MediatR. It provides full CRUD operations for products, including creation, retrieval, and paginated listing, backed by a PostgreSQL database with Entity Framework Core. The system integrates with external APIs via auto-generated Kiota and NSwag clients, and includes comprehensive unit, integration, and end-to-end test coverage.

Features

Add new Kiota-based API client for the Catalogs service

A new API client implementation using the Kiota SDK has been added to the \src/ApiClients/Vertical.Slice.Template.KiotaClients\ directory. This includes the \CatalogsKiotaApiClient\ entry point, request builders for the \/api/v1/products\ and \/api/v1/products/{id}\ endpoints, and the corresponding model classes (\CreateProductRequest\, \CreateProductResponse\, \GetProductByIdResponse\, etc.). This provides an alternative, auto-generated client for interacting with the Catalogs service alongside the existing NSwag-based client.

src/ApiClients, src/App, src/App/Vertical.Slice.Template/Shared/Clients · high confidence

Add product management features

The template now includes the complete implementation for creating, retrieving by ID, and paginated listing of products. This adds the CQRS commands, handlers, and validators for creating a product, as well as the query handlers and endpoints for fetching a single product and listing products with pagination support.

src/App/Vertical.Slice.Template/Products/Features/CreatingProduct · high confidence

Added initial database migration and data seeding for the Catalogs module

The Catalogs module now includes a database migration that creates the 'products' table in the 'catalog' schema, along with a data seeder and a design-time factory to support database setup and testing. This change introduces the foundational data layer for the catalog feature, including the initial migration script and the infrastructure to apply it.

src/App/Vertical.Slice.Template/Shared/Data · medium confidence

Initial devcontainer configuration for .NET development

The .devcontainer directory now contains a complete development environment setup, including a Dockerfile, devcontainer.json, and supporting scripts. The configuration installs .NET 9.0.101 SDK and runtime, along with GitHub CLI, PowerShell, Node.js, and various VS Code extensions and settings tailored for C\# and .NET development. It also includes scripts to install the Meslo Nerd Font for improved terminal rendering.

.devcontainer · high confidence

Introduce Product module scaffolding and mappings

The Products area now includes a complete set of scaffolding files: a Product entity, a read model, DTOs, and a mapper class that uses Mapperly to convert between domain models, DTOs, and request/response types. Additionally, EF Core configuration and Sieve read-model configuration are added, and the module is wired into the application's routing and service registration.

src/App/Vertical.Slice.Template/Products · high confidence

New API project structure and configuration

The Vertical.Slice.Template.Api project has been restructured with new configuration files (appsettings.json, appsettings.test.json, launchSettings.json) and a Program.cs entry point that configures Serilog logging, dependency injection validation, and infrastructure services. The project now includes VS Code launch and task configurations for debugging and Docker builds, along with metadata classes for catalogs. The solution file and various configuration files have been added to support the template's API layer.

src/App/Vertical.Slice.Template.Api · high confidence

New caching, CQRS, and domain event abstractions

The shared abstraction layer now includes a comprehensive caching system with interfaces for cache queries, requests, and services, alongside pipeline behaviors for caching and cache invalidation. Additionally, new interfaces are introduced for CQRS commands and queries, domain events, and messaging, providing a structured foundation for these architectural patterns.

src/Shared · high confidence

Behavioural changes

Centralized infrastructure and HTTP client registration in the template

The application's startup configuration is now consolidated into dedicated extension methods within the \WebApplicationBuilderExtensions\ and \WebApplicationExtensions\ classes. This change introduces a structured approach to registering services, including typed HTTP clients for REST, Connected Service, and Kiota-based APIs, alongside infrastructure services like MassTransit, caching, rate limiting, and health checks. The pipeline is also updated to use the \Mediator\ source generator for message handling instead of MediatR, and the application now supports both in-memory and PostgreSQL database contexts based on configuration.

src/App/Vertical.Slice.Template/Shared/Extensions · high confidence

Enforce commit message and pre-commit formatting rules

The project now enforces commit message standards via commitlint and applies automated formatting and style checks before each commit. Specifically, the .husky directory now includes a commit-msg hook that runs commitlint to validate messages, and a pre-commit hook that executes npm scripts for fixing analyzers, style, C\# formatting, and general formatting and style checks.

.husky · high confidence

Removed legacy product creation and retrieval endpoints

The legacy implementations for creating and retrieving products have been removed from the application. Specifically, the \CreateProduct\ and \GetProductById\ features, along with their associated HTTP endpoints and handlers, have been deleted. This eliminates the ability to create new products via the \api/products\ POST endpoint and fetch product details via the \api/products/{id}\ GET endpoint.

src/Catalogs/Products/Features/CreatingProduct, src/Catalogs/Products/Features/GettingProductById · high confidence

Updated .NET SDK requirement to version 9.0.101

The project now requires .NET SDK 9.0.101 or later, as specified in the global.json file. This update aligns the development environment with the latest .NET 9 features and ensures compatibility with the template's dependencies and tooling.

(repo-wide) · high confidence

Test coverage

Added end-to-end tests for the GetProductById feature; Added integration test for creating a product; Added integration tests for connected service clients and API contracts; Added unit tests for GetProductByPage; Added unit tests for product creation flow.

Dependencies

Upgrade to .NET 9 and modernize dependency management

The project has been upgraded to .NET 9, with all .NET and third-party package versions centralized in \Directory.Packages.props\ and \tests/Directory.Packages.props\. This includes updates to Microsoft.AspNetCore, Entity Framework Core, MassTransit, and OpenTelemetry packages. The template also introduces new client generation tools (NSwag and Kiota) and modernizes the build system with a \package.json\ for Node.js tooling and a \package-lock.json\ for lockfile consistency.

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

Lenses

  • Code Health 93 → 62 (-31.3)
  • Architecture 80 → 80 (+0.0)
  • Maturity 67 → 67 (+0.0)
  • Readiness 56 → 54 (-1.8)
  • Security 51 → 50 (-1.0)
  • Domain Modelling 63 → 67 (+4.1)
  • Event-Driven 100 → 100 (+0.0)
  • Performance 74 → 74 (-0.6)

Resolved (32)

  • BarePragmaDisable (src/Shared/Cache/DependencyInjectionExtensions.cs)
  • Bounded contexts not declared
  • Build did not complete in the analyzer
  • Change coupling: CreateProductEndpoint.cs ↔ GetProductByIdEndpoint.cs (src/App/Vertical.Slice.Template/Products/Features/CreatingProduct/v1/CreateProductEndpoint.cs)
  • Change coupling: GetProductByIdEndpoint.cs ↔ GetProductsByPageEndpoint.cs (src/App/Vertical.Slice.Template/Products/Features/GettingProductById/v1/GetProductByIdEndpoint.cs)
  • Coverage not measured — analyzer environment
  • Duplicated block (16 lines × 2) (src/Shared/EF/StronglyTypedIdValueConverterSelector.cs)
  • Duplicated block (19 lines × 3) (src/Shared/Observability/CoreDiagnostics/Commands/CommandHandlerMetrics.cs)
  • Duplicated block (19 lines × 3) (src/Shared/Observability/CoreDiagnostics/Query/QueryHandlerMetrics.cs)
  • Duplicated block (25 lines × 2) (src/Shared/OpenApi/AspnetOpenApi/OpenApiVersioningDocumentTransformer.cs)
  • Duplicated block (5 lines × 2) (src/App/Vertical.Slice.Template/Products/Features/CreatingProduct/v1/CreateProduct.cs)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • …and 12 more

New (668)

  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • AnalyzerSeverityNone (.editorconfig)
  • …and 648 more

API surface

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

mehdihadeli/vertical-slice-api-template 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 4a398078850cc6bd10f521a09e92c4983cc44955 — 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.