Amitpnk/Onion-architecture-ASP.NET-Core
58.9
Adequate · 8 November 2026
1.5k
lines of production code
C#
primary language
7
measurements over time
What this system is
This system is a .NET-based Onion Architecture template that provides a structured foundation for building applications with distinct layers for domain, infrastructure, persistence, and services. It includes built-in support for user authentication, customer management, and email services, along with health check endpoints and automated testing scaffolding. The project is designed to be packaged and distributed as a Visual Studio extension, offering a standardized starting point for .NET 8 development.
Features
Added Visual Studio extension template scaffolding and build configuration
The OATemplate project now includes the full set of files required to package and distribute a Visual Studio extension. This includes the VSIX manifest (source.extension.vsixmanifest) defining the 'Onion Architecture' template, the template pack build script (templatepack.OATemplate.proj) for generating the NuGet package, and the MSBuild targets (wafflebuilder.targets) that automate the creation of VSIX and template zips. Additionally, the project now provides a standard HTML/CSS help page (index.html, stylesheet.css) and a pkgdef registration file (template.pkgdef) to ensure the template is correctly installed and registered in Visual Studio.
src/OATemplate · high confidence
Added template configuration and solution file for the Onion Architecture template
The template metadata and solution structure for the 'Onion Architecture' (OA) template have been added. This includes \template.json\ and \template.vstemplate\ files that define the template's identity, description, and project structure, along with the \OA.sln\ solution file that references the main project and its sub-projects (Domain, Infrastructure, Persistence, Service, and Test projects).
src/.template.config · high confidence
Centralized infrastructure configuration and mapping setup
The infrastructure layer now provides a consolidated set of extension methods to configure the application's core services. This includes registering the Entity Framework Core \ApplicationDbContext\ (supporting both in-memory and SQL Server backends), setting up AutoMapper for \CustomerModel\ to \Customer\ entity mapping, and configuring Swagger/OpenAPI documentation with JWT security schemes. Additionally, it adds health check endpoints (\/healthz\, \/healthcheck\, \/healthcheck-ui\) and registers transient services like \DateTimeService\ and \AccountService\.
src/OA.Infrastructure · high confidence
Initial release of the Onion Architecture template
The repository now includes the full source code for the Onion Architecture template, organized into a solution with projects for Domain, Infrastructure, Persistence, Service, and Unit/Integration tests. The project utilizes .NET Core, Entity Framework Core, AutoMapper, and Serilog for logging. It also includes a CHANGELOG.md documenting the initial release and subsequent versions, along with a Code of Conduct and a .gitignore file updated to exclude health check database files.
(repo-wide) · high confidence
Introduce customer management commands and queries
Added new MediatR-based commands (Create, Update, Delete) and queries (GetAll, GetById) for the Customer entity. This provides the backend logic for creating, modifying, and retrieving customer records, utilizing the primary constructor syntax and file-scoped namespaces for cleaner code structure.
src/OA.Service/Features/CustomerFeatures · high confidence
Introduced EF Core persistence layer and identity seed data
Added the \ApplicationDbContext\ and \IApplicationDbContext\ interface to manage the primary database context for entities like Customers, Orders, and Products. Additionally, introduced an \IdentityContext\ to handle ASP.NET Core Identity tables, configuring them in a dedicated 'Identity' schema. To support initial setup, added seed data classes (\DefaultRoles\, \DefaultUser\, \MappingUserRole\) that populate default roles and a super-admin user upon database initialization.
src/OA.Persistence · high confidence
Introduces domain models for authentication, configuration, and core entities
The domain layer now includes new classes for authentication (ApplicationUser, AuthenticationRequest/Response, RefreshToken, and request DTOs for login, registration, and password management), a generic Response wrapper, a BaseEntity base class, and settings classes for JWT, mail, and application details. These additions provide the foundational data structures and configuration models required for user identity, token management, and system settings.
src/OA.Domain · high confidence
New API controllers for account, customer, mail, and meta endpoints
The application now exposes new HTTP endpoints for account management (authenticate, register, confirm email, forgot/reset password), customer CRUD operations (create, read, update, delete), email sending, and system information retrieval. These controllers implement the core business logic for user authentication, customer data management, and system metadata, utilizing dependency injection for services like IAccountService, IMediator, and IEmailService.
src/OA/Controllers · high confidence
Behavioural changes
Added custom exception middleware and domain-specific exception types
The service layer now includes a custom exception middleware that intercepts unhandled exceptions and maps them to appropriate HTTP status codes and JSON error responses. Specific exception types such as ValidationException, BadRequestException, NotFoundException, and DeleteFailureException are introduced to handle distinct error scenarios, ensuring consistent error handling across the application.
src/OA.Service · high confidence
Introduce configurable theming and health check endpoints in the OA application
The OA project now supports custom CSS-based theming via a new \custom.css\ file that defines primary, secondary, and background colors for the UI. Additionally, the application's startup configuration in \Program.cs\ has been updated to register health check endpoints (\/healthz\ and \/healthcheck-ui\) and Swagger, allowing users to monitor service status and view API documentation. Configuration for logging, database connections, and feature flags is also explicitly defined in the new \appsettings\ files.
src/OA · medium confidence
Introduced domain entity classes for the OA system
The OA.Domain layer now includes new entity classes for Category, Customer, Order, Product, and Supplier, each inheriting from a base entity and defining their respective properties and relationships.
OA.Domain · high confidence
Test coverage
Added integration tests for Customer API endpoints; Added unit test for database insertion.
Dependencies
Upgrade to .NET 8 and update NuGet packages
All .NET project files in the solution have been upgraded to target .NET 8.0, and the referenced NuGet packages have been updated to their latest compatible versions, including Swashbuckle.AspNetCore, Serilog.Sinks.MSSqlServer, System.IdentityModel.Tokens.Jwt, MailKit, and MimeKit.
(dependencies) · medium 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 58 → 59 (+1.2)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 74 → 75 (+0.6)
- Architecture 90 → 90 (+0.0)
- Maturity 59 → 59 (+0.0)
- Readiness 54 → 60 (+5.8)
- Security 54 → 54 (+0.0)
- Domain Modelling 71 (new)
- Accessibility 64 → 64 (+0.0)
- Performance 100 → 100 (+0.0)
Resolved (5)
- Coverage not measured — no coverage collector is wired up
- Vulnerable: MailKit
- Vulnerable: MimeKit
- misleading comment (src/OA.Persistence/ApplicationDbContext.cs)
- misleading comment (src/OA/Program.cs)
New (8)
- redundant comment (src/OA.Test.Integration/ApiEndpoints/ApiCustomerTest.cs)
- redundant comment (src/OA.Test.Integration/ApiEndpoints/ApiCustomerTest.cs)
- redundant comment (src/OA/Program.cs)
- redundant comment (src/OA/Program.cs)
- redundant comment (src/OA/Program.cs)
- redundant comment (src/OATemplate/Properties/AssemblyInfo.cs)
- redundant comment (src/OATemplate/Properties/AssemblyInfo.cs)
- redundant comment (src/OATemplate/Properties/AssemblyInfo.cs)
API surface
- Unchanged — 12 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
Amitpnk/Onion-architecture-ASP.NET-Core 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 7b36c72dc718ca1fffd200c487a282df361af859 — 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.