felixsjoberg/Bank.CleanArchitecture.WebApi
39.4
Weak · 21 September 2026
1.7k
lines of production code
C#
primary language
4
measurements over time
What this system is
This system is a .NET 7-based banking application backend structured using Clean Architecture and Docker. It provides a Web API for user authentication, account management, and fund transfers, leveraging CQRS with MediatR for command and query handling. The infrastructure layer utilizes Dapper with SQL Server stored procedures for data persistence and implements JWT-based security for role-based access control.
Features
Initial Web API presentation layer with account and transaction endpoints
This change introduces the \BankApplication.Presentation\ layer, establishing the Web API surface for the bank application. It adds controllers for authentication (\/auth\), customer account management (\/Accounts\), and administrator operations (\/admin\), enabling users to register, log in, create accounts, view balances, transfer funds, and manage customer data. The implementation relies on MediatR for command/query handling and Mapster for DTO mapping, with a centralized error handling strategy that maps specific application exceptions to HTTP status codes via an \/error\ endpoint.
BankApplication.Presentation · high confidence
Initial database stored procedures for core banking operations
This change introduces a new set of SQL stored procedures in the \db-StoredProcedures\ directory to support core banking functionality. The additions include procedures for creating customers (\CreateCustomer\), users (\AddUser\), and accounts (\CreateAccount\, \CreateAccountReturnDisposition\), as well as managing account credits (\AddAccountCredit\) and executing fund transfers (\Transfer\). It also provides data retrieval and validation procedures such as \GetAccounts\, \GetAccountById\, \GetUserByEmail\, \IsValidAccount\, and \IsValidTransfer\. These stored procedures define the database-level logic for user onboarding, account management, transaction processing, and data querying.
db-StoredProcedures · high confidence
Behavioural changes
Application layer restructured with CQRS, MediatR, and JWT authentication
The application layer has been refactored to use the CQRS pattern with MediatR, replacing the previous service-based approach. This introduces new command and query handlers for account creation, account retrieval, transaction history, fund transfers, and administrator operations like adding credit and creating new customer accounts. Authentication is now implemented via JWT tokens (using a symmetric key) for user registration and login, replacing the previous mock authentication service. The infrastructure layer now uses Dapper with SQL Server stored procedures for persistence, and dependency injection has been updated to register MediatR and the new repository implementations.
BankApplication.Application, BankApplication.Infrastructure · high confidence
Domain model restructuring and user entity updates
The domain layer has been reorganized by moving entity classes from the Models namespace to Entities, and the User entity has been significantly updated to support authentication and authorization: the primary key changed from an integer to a Guid, the username field was replaced with an Email field, and a Role property was added. Additionally, new aggregates for account transactions, new customer accounts, and transfers were introduced, while relationships between Disposition and User were established to support the new authorization structure.
BankApplication.Domain · high confidence
Removal of legacy authentication controller and application entry point
The \AuthenticationController\ (exposing \/auth/register\ and \/auth/login\ endpoints) and the \Program.cs\ entry point have been deleted from the \BankApplication\ project. This change removes the previous implementation of user registration and login, as well as the application's startup configuration, indicating a structural shift in how the application is bootstrapped and how authentication is handled.
BankApplication · high confidence
Repository restructured to Clean Architecture with .NET 7 and Docker support
The project has been reorganized into a Clean Architecture structure, replacing the previous solution layout with distinct layers: Domain, Application, Infrastructure, and Presentation (containing WebApi and Contracts). The application is now built on ASP.NET Core 7 and includes a Dockerfile and docker-compose configuration to run the backend alongside an Azure SQL Edge database. The solution also introduces JWT authentication, role-based authorization, and CQRS via MediatR, while disabling specific nullable reference type warnings in the editor configuration.
(repo-wide) · high confidence
Dependencies
Introduces JWT authentication, CQRS/MediatR, and mapping libraries
The project dependencies have been expanded to support new architectural patterns and security features. The WebApi and Application layers now include MediatR (v11.1.0) and Mapster (v7.3.0) to enable CQRS and object mapping, while the Infrastructure layer adds System.IdentityModel.Tokens.Jwt and Microsoft.AspNetCore.Authentication.JwtBearer to implement JWT-based authentication. Additionally, Azure.Identity and Swashbuckle.AspNetCore.Filters were added to the WebApi, and Microsoft.Extensions.Configuration.UserSecrets was added to the Application layer to support local secret management.
(dependencies) · high confidence
Housekeeping
Cleanup of generated build artifacts
This change removes generated build and NuGet cache files (such as \obj/\ and \bin/\ contents) from the \BankApplication.Contracts\ project directory. These files are automatically regenerated during the build process and should not be committed to version control, so their removal helps keep the repository clean and prevents merge conflicts.
BankApplication.Contracts · 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
Baseline
- First survey — no prior run to compare against. CAI 39.
Lenses
- Code Health 71
- Architecture 85
- Maturity 58
- Readiness 11
- Security 58
- Event-Driven 100
Changes since last survey
- 36 commits — 33 feature/other, 3 fixes
By area
- BankApplication/bin — 9 commits
- BankApplication/obj — 8 commits
- (root) — 5 commits
- (repo) — 3 commits
- .vs/BankApplication — 3 commits
- .vscode/launch.json — 1 commit
- Application/obj — 1 commit
- BankApplication.Application/Accounts — 1 commit
- BankApplication.Application/obj — 1 commit
- BankApplication.Contracts/Customers — 1 commit
- BankApplication.Infrastructure/obj — 1 commit
- BankApplication.e/obj — 1 commit
- db-StoredProcedures/AddAccountCredit_sP.sql — 1 commit
Notable commits
- fix: Add Feature CreateAccount & small overall fixes
- fix: FIX: Add requested readme, Clean up, Fix dependencies.
- fix: fix getaccounts response & restructure application layer
- change: Add Authentication
- change: Add Feature AddAccountCredit
- change: Add Feature GetTransactionsByAccId
- change: Add Feature NewCustomerAccount & Restructuring repos
- change: Add Feature Transfer
- change: Add Repository pattern structure with static list of users
- change: Add dispositionRepo + readme
- change: Added Exception switch in ErrorControl, Added Authorization
- change: CQRS+ MediatR, better structure
- change: Clean up
- change: Clean up
- change: Clean up
- change: Create LICENSE
- change: Create README.md
- change: Customer Features application layer & Controller
- change: Dapper DataConnection with Sql
- change: Dapper DataConnection with Sql
- …and 16 more
API surface
- 8 HTTP endpoints (baseline)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
felixsjoberg/Bank.CleanArchitecture.WebApi 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 6942c1048ba12ed742daf6de05c46f40f68d0498 — 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.