<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Clean Architecture docs on Ardalis Clean Architecture</title><link>https://ardalis.github.io/CleanArchitecture/</link><description>Recent content in Clean Architecture docs on Ardalis Clean Architecture</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://ardalis.github.io/CleanArchitecture/index.xml" rel="self" type="application/rss+xml"/><item><title>Upgrading from v10.x to v11.x</title><link>https://ardalis.github.io/CleanArchitecture/migration-guides/v10-to-v11/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ardalis.github.io/CleanArchitecture/migration-guides/v10-to-v11/</guid><description>&lt;h1 id="upgrading-from-v10x-to-v11x"&gt;Upgrading from v10.x to v11.x&lt;a class="anchor" href="#upgrading-from-v10x-to-v11x"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;If you started your project with version &lt;code&gt;10.0.1&lt;/code&gt; (or similar) of the template and want to incorporate the architectural upgrades of version &lt;code&gt;11.0.0&lt;/code&gt;, follow this guide.&lt;/p&gt;
&lt;h2 id="the-diff-strategy"&gt;The &amp;ldquo;Diff&amp;rdquo; Strategy&lt;a class="anchor" href="#the-diff-strategy"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Since this template serves as a starting point, the most reliable way to upgrade an existing project is to perform a differential comparison:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Generate a &lt;strong&gt;brand new solution&lt;/strong&gt; using the &lt;code&gt;v11&lt;/code&gt; template (e.g., &lt;code&gt;dotnet new clean-arch -o Your.ProjectName&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Use a diff tool (like Beyond Compare, WinMerge, or &lt;code&gt;git diff&lt;/code&gt;) to compare the newly generated solution against the original &lt;code&gt;v10&lt;/code&gt; vanilla template you started with (or your current codebase).&lt;/li&gt;
&lt;li&gt;Manually apply the structural or package changes to your existing project.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="key-changes-in-v11x"&gt;Key Changes in v11.x&lt;a class="anchor" href="#key-changes-in-v11x"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Several dependencies and implementation details were altered in this release. The most significant changes include:&lt;/p&gt;</description></item><item><title>ADR 001: Replace Autofac with .NET DI</title><link>https://ardalis.github.io/CleanArchitecture/architecture-decisions/adr-001-dotnet-di-adoption/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ardalis.github.io/CleanArchitecture/architecture-decisions/adr-001-dotnet-di-adoption/</guid><description>&lt;h1 id="adr-001-replace-autofac-with-net-core-dependency-injection"&gt;ADR 001: Replace Autofac with .NET Core Dependency Injection&lt;a class="anchor" href="#adr-001-replace-autofac-with-net-core-dependency-injection"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="status"&gt;Status&lt;a class="anchor" href="#status"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Accepted&lt;/p&gt;
&lt;h2 id="context"&gt;Context&lt;a class="anchor" href="#context"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Initially, this repository employed Autofac for dependency injection. At the time of adoption, Autofac was preferred due to its robust feature set, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Support for advanced scenarios such as decorators and modules, which could be placed close to their corresponding implementations.&lt;/li&gt;
&lt;li&gt;A well-established history of stability and maturity, having been used in various projects before .NET Core&amp;rsquo;s built-in DI was fully featured.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As the .NET ecosystem evolved, the built-in DI container began to meet the needs of our project without introducing the added complexity associated with Autofac. The .NET DI framework has matured significantly, offering sufficient functionality for typical use cases, including:&lt;/p&gt;</description></item><item><title>Getting Started</title><link>https://ardalis.github.io/CleanArchitecture/getting-started/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ardalis.github.io/CleanArchitecture/getting-started/</guid><description>&lt;h1 id="getting-started"&gt;Getting Started&lt;a class="anchor" href="#getting-started"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;To use this template, there are &lt;strong&gt;two template options&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Full Clean Architecture&lt;/strong&gt; (&lt;code&gt;clean-arch&lt;/code&gt;) - Complete multi-project solution with Core, UseCases, Infrastructure, and Web&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Minimal Clean Architecture&lt;/strong&gt; (&lt;code&gt;min-clean&lt;/code&gt;) - Simplified single-project vertical slice architecture&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Choose based on your project&amp;rsquo;s complexity and team preferences. See &lt;a href="#template-comparison"&gt;Template Comparison&lt;/a&gt; below.&lt;/p&gt;
&lt;h2 id="template-installation"&gt;Template Installation&lt;a class="anchor" href="#template-installation"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Install the templates from NuGet:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-powershell" data-lang="powershell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Full Clean Architecture template&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dotnet new install Ardalis.CleanArchitecture.Template
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Minimal Clean Architecture template &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dotnet new install Ardalis.MinimalClean.Template&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="using-the-dotnet-cli-template"&gt;Using the dotnet CLI template&lt;a class="anchor" href="#using-the-dotnet-cli-template"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="full-clean-architecture-clean-arch"&gt;Full Clean Architecture (&lt;code&gt;clean-arch&lt;/code&gt;)&lt;a class="anchor" href="#full-clean-architecture-clean-arch"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;First, install the template from &lt;a href="https://www.nuget.org/packages/Ardalis.CleanArchitecture.Template/"&gt;NuGet (https://www.nuget.org/packages/Ardalis.CleanArchitecture.Template/)&lt;/a&gt;:&lt;/p&gt;</description></item><item><title>Goals &amp; Design Decisions</title><link>https://ardalis.github.io/CleanArchitecture/design-decisions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ardalis.github.io/CleanArchitecture/design-decisions/</guid><description>&lt;h1 id="goals"&gt;Goals&lt;a class="anchor" href="#goals"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The goal of this repository is to provide a basic solution structure that can be used to build Domain-Driven Design (DDD)-based or simply well-factored, SOLID applications using .NET Core. Learn more about these topics here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.pluralsight.com/courses/csharp-solid-principles"&gt;SOLID Principles for C# Developers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.pluralsight.com/courses/fundamentals-domain-driven-design"&gt;Domain-Driven Design Fundamentals&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.pluralsight.com/courses/refactoring-solid-c-sharp-code"&gt;Refactoring to SOLID C# Code&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;rsquo;re used to building applications as single-project or as a set of projects that follow the traditional UI -&amp;gt; Business Layer -&amp;gt; Data Access Layer &amp;ldquo;N-Tier&amp;rdquo; architecture, I recommend you check out these two courses (ideally before DDD Fundamentals):&lt;/p&gt;</description></item><item><title>Minimal Clean Architecture</title><link>https://ardalis.github.io/CleanArchitecture/minimal-clean-architecture/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ardalis.github.io/CleanArchitecture/minimal-clean-architecture/</guid><description>&lt;h1 id="minimal-clean-architecture"&gt;Minimal Clean Architecture&lt;a class="anchor" href="#minimal-clean-architecture"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="overview"&gt;Overview&lt;a class="anchor" href="#overview"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;Minimal Clean Architecture&lt;/strong&gt; template provides a simplified, pragmatic approach to Clean Architecture for ASP.NET Core applications. It maintains the core principles of Clean Architecture—separation of concerns, dependency inversion, and testability—while reducing complexity through a single-project Vertical Slice Architecture (VSA).&lt;/p&gt;
&lt;h2 id="philosophy"&gt;Philosophy&lt;a class="anchor" href="#philosophy"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="core-principles"&gt;Core Principles&lt;a class="anchor" href="#core-principles"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Simplicity First&lt;/strong&gt;: Minimize unnecessary abstractions and project boundaries&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vertical Slices&lt;/strong&gt;: Organize by feature rather than technical layer&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pragmatic DDD&lt;/strong&gt;: Use domain patterns where they add value, not everywhere&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Progressive Enhancement&lt;/strong&gt;: Start simple, add complexity only when needed&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="clean-architecture-principles-maintained"&gt;Clean Architecture Principles Maintained&lt;a class="anchor" href="#clean-architecture-principles-maintained"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Dependency Inversion&lt;/strong&gt;: Domain doesn&amp;rsquo;t depend on infrastructure&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Testability&lt;/strong&gt;: Business logic can be tested in isolation&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Separation of Concerns&lt;/strong&gt;: Clear boundaries between domain, infrastructure, and presentation&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Framework Independence&lt;/strong&gt;: Domain logic isn&amp;rsquo;t coupled to ASP.NET Core&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="simplifications-from-full-template"&gt;Simplifications from Full Template&lt;a class="anchor" href="#simplifications-from-full-template"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Single Project&lt;/strong&gt;: All code in one Web project instead of 4+ projects&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Simplified DDD&lt;/strong&gt;: Essential patterns only (entities, aggregates) without extensive value objects, specifications&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Optional CQRS&lt;/strong&gt;: Mediator is optional; logic can live in endpoints&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Direct Data Access&lt;/strong&gt;: Can use DbContext directly or simple repositories instead of complex repository pattern&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vertical Organization&lt;/strong&gt;: Group by feature (Cart, Order, Product) instead of by layer&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="architecture"&gt;Architecture&lt;a class="anchor" href="#architecture"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="project-structure"&gt;Project Structure&lt;a class="anchor" href="#project-structure"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MinimalClean.Architecture.Web/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── Domain/ # Domain Layer
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── CartAggregate/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── Cart.cs # Aggregate root
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── CartItem.cs # Entity
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ └── Events/ # Domain events (optional)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── OrderAggregate/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ └── ProductAggregate/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── Infrastructure/ # Infrastructure Layer
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── Data/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── AppDbContext.cs # EF Core DbContext
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── Config/ # EF configurations
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ │ ├── CartConfiguration.cs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ │ └── OrderConfiguration.cs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ └── Migrations/ # EF migrations
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── Email/ # External services
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ └── Services/ # Infrastructure services
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;├── Endpoints/ # Presentation Layer
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── Cart/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── Create.cs # Create cart endpoint
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ ├── AddItem.cs # Add item to cart
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ │ └── List.cs # List carts
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ ├── Order/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;│ └── Product/
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;└── Program.cs # Application startup&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="vertical-slice-organization"&gt;Vertical Slice Organization&lt;a class="anchor" href="#vertical-slice-organization"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Each feature (Cart, Order, Product) contains:&lt;/p&gt;</description></item><item><title/><link>https://ardalis.github.io/CleanArchitecture/architecture-decisions/readme/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ardalis.github.io/CleanArchitecture/architecture-decisions/readme/</guid><description>&lt;h1 id="architecture-decision-records-adr"&gt;Architecture Decision Records (ADR)&lt;a class="anchor" href="#architecture-decision-records-adr"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="what-is-an-architecture-decision-record-adr"&gt;What is an Architecture Decision Record (ADR)?&lt;a class="anchor" href="#what-is-an-architecture-decision-record-adr"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;An Architecture Decision Record (ADR) documents significant architecture decisions made throughout a project, capturing the context, rationale, and consequences of each decision. This promotes transparency and provides a historical reference for future design considerations.&lt;/p&gt;
&lt;h2 id="purpose-of-adrs"&gt;Purpose of ADRs&lt;a class="anchor" href="#purpose-of-adrs"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Knowledge Management&lt;/strong&gt;: Consolidates architectural knowledge and decisions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Collaboration&lt;/strong&gt;: Enhances team communication by documenting discussions and outcomes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Clarity&lt;/strong&gt;: Provides clear reasoning behind design choices, making it easier for new team members to understand past decisions.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="best-practices-for-writing-adrs"&gt;Best Practices for Writing ADRs&lt;a class="anchor" href="#best-practices-for-writing-adrs"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Be Specific&lt;/strong&gt;: Each ADR should address a single architectural decision. Avoid conflating multiple decisions into one record.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Document Context&lt;/strong&gt;: Clearly explain the project’s context and relevant considerations that influenced the decision. Include team dynamics and priorities.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rationale and Consequences&lt;/strong&gt;: Describe the reasons for the decision, including pros and cons, and outline the implications of the decision for the project and&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;future architecture.
4. &lt;strong&gt;Immutable Records&lt;/strong&gt;: Once an ADR is created, avoid altering it. Instead, create a new ADR to reflect any changes or updates.
5. &lt;strong&gt;Timestamp Entries&lt;/strong&gt;: Include timestamps to track when each decision was made, especially for aspects that may evolve over time (e.g., costs, schedules).
6. &lt;strong&gt;Use Templates&lt;/strong&gt;: Utilize established templates for consistency and completeness in documenting ADRs.&lt;/p&gt;</description></item></channel></rss>