After some considerable time away from development stuff, I needed to try get my skills somewhere near to up to date of current development practices. Despite my best efforts, I couldn't for the life of me find an example of clean architecture (as described by Uncle Bob Martin) that wasn't either totally over the top to understand the concepts described or just plain wrong in its implementation.
So, as I often do in these situations, I decided to totally ignore everybody else and do it my way. This repo is the results of my learnings. I don't doubt some people will totally disagree with it, but I don't care, it helped me wrap my head around it and maybe it will someone else too.
The solution is made up of four projects:
-
Domain - This project contains the core business logic and entities. It is completely independent of any other layers and has no dependencies on external libraries or frameworks.
-
Application - This project contains the application logic, including use cases and service interfaces. It depends on the Domain project but has no dependencies on infrastructure or UI layers.
-
Infrastructure - This project contains implementations of the service interfaces defined in the Application layer. It handles data access, external services, and other infrastructure concerns. It depends on both the Domain and Application projects.
-
BlazorWebApp - This project is the entry point of the application. It contains the Blazor components, API controllers, and handles HTTP requests. It depends on the Application and Infrastructure projects.
-
The dependencies flow inward, meaning that the outer layers depend on the inner layers, but not vice versa. This ensures that the core business logic remains isolated and testable.
-
The solution was created from the default Blazor app template available at the time using .NET 10 / C# 14 shortly after the GA release of Visual Studio 2026.
-
Some elements, mainly documentation, were totally written by AI -- again moan about that all you want; AI is here, get used to it, I have and I'm really old in development terms!