.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
- Start with Contoso University - Learn vertical slices and CQRS basics
- Move to Modular Monolith DDD - Understand bounded contexts and DDD patterns
- Study eShop - See how microservices work at scale
- Use FullStackHero - Start new projects with proven patterns
Sources
C#/net-blueprints.pdf- Credit: Kristijan Kralj