Clean‑architecture .NET primer goes viral

A widely shared X post laid out a day‑one Clean Architecture blueprint for production.NET apps: keep the domain layer framework‑free, use an application layer for workflows (MediatR), isolate infrastructure (EF Core/databases), and keep presentation thin. (x.com)

A software design pattern that splits code into layers is getting a fresh burst of attention in the.NET world after Mukesh Murugan’s X post on a “day one” project blueprint spread widely. Murugan’s post described four layers for a production.NET app: Domain for business rules, Application for use cases, Infrastructure for database and external services, and Presentation for the API or user interface. His public.NET site says his clean-architecture template is used by thousands of developers, and his GitHub profile links to multiple Clean Architecture projects. The basic idea is to keep the center of the app free of framework code. Jason Taylor’s Clean Architecture template documentation says the Domain layer contains business rules and has “no dependencies on other layers,” so the model can change without being tied to a database, user interface, or framework. In practice, that means a rule like “an order cannot ship before payment clears” lives in plain C# classes, not inside an Entity Framework Core model or an ASP.NET Core controller. Microsoft says Entity Framework Core is a data-access tool that lets.NET developers work with databases through.NET objects, which is exactly the kind of infrastructure Clean Architecture tries to keep at the edge. Murugan’s blueprint puts workflow code in an Application layer and routes requests through MediatR, a library built around the mediator pattern. The project’s GitHub page says MediatR supports commands, queries, notifications, and request-response messaging, and its site pitches it as a fit for Command Query Responsibility Segregation and vertical-slice designs. That detail lands differently in 2026 than it did a year ago. Jimmy Bogard, MediatR’s creator, announced on July 2, 2025, that commercial editions of MediatR and AutoMapper had officially launched under Lucky Penny Software, while the product site now lists paid team plans and a free community tier for organizations under $5 million in annual gross revenue. The Presentation layer in Murugan’s outline stays thin, which means HTTP endpoints should translate web requests into application calls instead of holding business logic themselves. Microsoft’s ASP.NET Core documentation says Minimal Application Programming Interfaces are the recommended approach for new projects and are meant to build HTTP endpoints with less code and configuration than traditional controllers. The database layer stays isolated for the same reason. Microsoft says Entity Framework Core supports multiple database providers, including SQLite, MySQL, PostgreSQL, Azure Cosmos DB, and SQL Server, so teams can swap storage details with less impact on business rules when those concerns are kept in Infrastructure instead of spread through the app. Clean Architecture is not the only way.NET teams organize code, and some developers now favor vertical-slice structures that group code by feature instead of by technical layer. MediatR’s own site says it fits both Command Query Responsibility Segregation and vertical-slice architecture, which helps explain why Murugan’s post reads less like a rigid rulebook than a starter map for teams shipping APIs. What made the post travel is its timing as much as its content:.NET 10 templates, Minimal Application Programming Interfaces, and paid infrastructure libraries have pushed more teams to decide what belongs in the core of an app on day one. Murugan’s answer was simple enough to fit in one post and specific enough to serve as a checklist.

Get your own daily briefing

Scout delivers personalized news, insights, and conversations tailored to your role and industry.

Download on the App Store

Shared from Scout - Be the smartest in the room.