πŸ›οΈ

.NET Reference Architecture Repositories

System Architecture Intermediate 3 min read 400 words
System Design Microservices Clean Architecture Domain-Driven Design

.NET Reference Architecture Repositories

A curated collection of high-quality .NET reference applications demonstrating production-grade software architecture patterns.

1. Evolutionary Architecture by Example

GitHub: evolutionary-architecture-by-example (2.3k+ stars)

Key Packages: Dapper, EF Core, FluentValidation, MassTransit, MediatR, Testcontainers, xUnit

Features:

  • Clean Architecture
  • Microservices
  • Modular Monolith
  • Architecture Diagrams
  • Docker
  • CI/CD
  • Comprehensive Tests

Why It’s Valuable: Shows evolution from monolith to microservices, demonstrating how architecture can grow with requirements.


2. eShop Reference Application

GitHub: dotnet/eShop (7.7k+ stars)

Key Packages: Aspire, EF Core, FluentValidation, OpenTelemetry, Polly, MediatR, NSubstitute, YARP

Features:

  • Clean Architecture
  • Microservices
  • Modular Monolith
  • Architecture Diagrams
  • Docker
  • CI/CD
  • Comprehensive Tests
  • Cloud Services Integration
  • Security Best Practices

Why It’s Valuable: Official Microsoft reference showing a complete e-commerce cloud-native microservices architecture built with .NET. Demonstrates .NET Aspire for cloud-native development.


3. Modular Monolith with DDD

GitHub: kgrzybek/modular-monolith-with-ddd (11.9k+ stars)

Key Packages: Autofac, Dapper, EF Core, FluentValidation, Polly, Quartz, NSubstitute, Serilog

Features:

  • Clean Architecture
  • Modular Monolith
  • Domain-Driven Design
  • Architecture Diagrams
  • Docker
  • Comprehensive Tests

Why It’s Valuable: Production-grade modular monolith implementation. Shows how to build a complex domain with proper boundaries, not just another simplistic β€œOrders” demo.


4. FullStackHero .NET 9 Starter Kit

GitHub: fullstackhero/dotnet-starter-kit (5.6k+ stars)

Key Packages: Ardalis.Specification, EF Core, FluentAssertions, FluentValidation, Hangfire, MediatR, OpenTelemetry, Serilog

Features:

  • Clean Architecture
  • CQRS Pattern
  • Modular Monolith
  • Docker
  • CI/CD
  • Security Implementation

Why It’s Valuable: Comprehensive starter kit for modern .NET applications with focus on modular monolith architecture and best practices.


5. Contoso University

GitHub: jbogard/ContosoUniversityDotNetCore-Pages (1.4k+ stars)

Key Packages: AutoMapper, EF Core, FluentValidation, MediatR, Moq, Respawn, Shouldly, xUnit

Features:

  • CQRS Pattern
  • Vertical Slice Architecture
  • Comprehensive Tests

Why It’s Valuable: Created by Jimmy Bogard (author of MediatR and AutoMapper). Demonstrates vertical slice architecture as an alternative to layered architecture.


Architecture Patterns Comparison

Repository Clean Arch Microservices Modular Monolith CQRS DDD Vertical Slices
Evolutionary Architecture βœ“ βœ“ βœ“ - - -
eShop βœ“ βœ“ βœ“ - - -
Modular Monolith DDD βœ“ - βœ“ - βœ“ -
FullStackHero βœ“ - βœ“ βœ“ - -
Contoso University - - - βœ“ - βœ“

Common Package Stack

Most reference architectures share these packages:

Core:
- MediatR           # CQRS/Mediator pattern
- FluentValidation  # Request validation
- AutoMapper        # Object mapping

Data:
- EF Core           # ORM
- Dapper            # High-performance queries

Resilience:
- Polly             # Retry, circuit breaker

Testing:
- xUnit             # Test framework
- Moq/NSubstitute   # Mocking
- FluentAssertions  # Assertion library
- Testcontainers    # Integration testing

Learning Path Recommendation

  1. Start with Contoso University - Learn vertical slices and CQRS basics
  2. Move to Modular Monolith DDD - Understand bounded contexts and DDD patterns
  3. Study eShop - See how microservices work at scale
  4. Use FullStackHero - Start new projects with proven patterns

Sources

  • C#/net-blueprints.pdf - Credit: Kristijan Kralj

πŸ“š Related Articles