Introduction
Clean Architecture Fundamentals
- Architectural principles & Design principles
- Clean Architecture layers
- What we are building & why
- Chapter recap
Domain Layer and Domain-Driven Design
- Introduction
- Creating the Domain project
- Defining our first domain entity
- What is an Entity in Domain-Driven Design?
- Introducing Value Objects for solving primitive obsession
- The importance of private setters in the domain model and encapsulation
- Using the Static Factory pattern in the domain
- Introducing the Domain Events pattern to the solution FREE PREVIEW
- Adding Repositories and the Unit of Work to the domain
- Creating the Booking entity
- Implementing a Domain service
- Using Double Dispatch for a better domain model
- Introducing the Result class to the project
- Defining a dictionary of domain errors
- Chapter recap
Application Layer and CQRS
- Introduction
- Creating the Application project
- Configuring dependency injection and installing MediatR
- Adding the required abstractions for CQRS FREE PREVIEW
- Implementing Commands with the rich domain model & repositories
- Defining a domain event handler
- Implementing Queries with Dapper for blazing performance
- Solving logging as a cross-cutting concern
- Creating a Validation pipeline for commands
- Chapter recap
Infrastructure Layer
- Introduction
- Creating the Infrastructure project
- Configuring infrastructure services with dependency injection
- Adding Entity Framework Core to the solution
- Configuring Entity Framework Core with dependency injection FREE PREVIEW
- Creating the Domain entity configurations
- Automatically applying entity configurations
- Implementing repository interfaces using a generic repository
- Implementing the SQL connection factory
- Publishing domain events inside the Unit of Work
- Solving race conditions with optimistic concurrency
- Chapter recap
Presentation Layer
- Introduction
- Creating the Presentation project
- Configuring services with dependency injection
- Adding Controllers and endpoints
- Setting up Docker Compose and running the API
- Creating EF migrations and applying them
- Seeding initial data
- Adding Middleware - Global exception handler
- Demo: Presentation layer & API
- Chapter recap
Authentication and API Security
- Introduction
- Keycloak identity provider setup
- Keycloak admin panel overview
- Demo: Obtaining JWTs using Keycloak
- Configuring authentication middleware & services FREE PREVIEW
- Configuring JWT authentication options
- Demo: Authentication in action
- Implementing the user registration feature
- Adding an API endpoint for registering a user
- Implementing the authentication service
- Configuring the authentication service as a typed HTTP client
- Demo: User registration with Keycloak
- Implementing the user login feature
- Demo: User login with Keycloak
- Chapter recap
Authorization, Roles and Permissions
- Introduction
- Implementing Role-based Authorization
- Implementing Permission-based Authorization
- Implementing Resource-based Authorization
- Chapter recap
Advanced Topics: Serilog, Redis, Outbox
- Introduction
- Structured Logging with Serilog and Seq
- Distributed Caching with Redis
- Health Checks in Clean Architecture
- Implementing API Versioning
- Transactional Outbox Pattern
- Minimal APIs
- Chapter recap
Testing Clean Architecture
- Introduction
- Domain Layer Unit Testing
- Application Layer Unit Testing
- Integration Testing
- Functional Testing
- Architecture Testing
- Chapter recap
Cloud Deployment, .NET Aspire (coming soon)
- Introduction
- Integrating .NET Aspire
- Deploying to Azure
- Chapter recap
BONUS - Get Started Faster
- Clean Architecture Template
- Code Quality Shortcut
- CI/CD Blueprint