How codewithmukesh/dotnet-webapi-zero-to-hero-course works
1. Repository shape
This is a course monorepo, not a single product. The top level contains many independent sample applications grouped by learning module, plus an archive/ folder with older .NET 8-era examples. Each sample has its own solution/project layout and can be run in isolation.
2. Primary architectural boundary
The strongest boundary is module-level isolation. Nothing in one lesson depends on another lesson’s code. For diagramming, treat each lesson folder as a separate system with its own runtime, dependencies, and sometimes its own database or Docker setup.
3. Common application shape
Most samples are ASP.NET Core Web APIs using either Minimal APIs or controllers. Typical layers are:
- API entry point in Program.cs
- feature/endpoint classes
- application services or handlers
- persistence via EF Core
- DTOs/models/validators
This makes request flow easy to diagram as: HTTP request → API endpoint → service/handler → database/caching/security component → HTTP response.
4. Data access backbone
Many lessons use Entity Framework Core with a DbContext and entity/configuration classes. Database-focused modules commonly include:
- Persistence or Data folders
- migrations
- seed scripts
- PostgreSQL via docker-compose.yml
Some lessons use a single DbContext, while others demonstrate multiple DbContexts, concurrency, soft deletes, interceptors, bulk operations, or tracking behavior.
5. Feature organization styles
The repo demonstrates two major code organization models:
- Vertical slice / feature folders: commands, queries, handlers, notifications grouped by feature
- Layered/Clean Architecture: separate Domain, Application, Infrastructure, and Api projects
A diagram should reflect that some samples keep business logic near endpoints, while others enforce strict project boundaries.
6. CQRS and MediatR-based flows
Several modules split commands and queries into separate request/handler pairs. In those samples, the request path is:
HTTP endpoint → command/query object → MediatR or custom dispatcher → handler → persistence/domain
Some versions also include pipeline behaviors for validation, caching, or logging before the handler runs.
7. Cross-cutting concerns
The repository contains dedicated samples for:
- global exception handling
- validation with FluentValidation
- middleware / filters
- structured logging
- caching
- health checks
These are important architectural overlays, not business features. In diagrams, they sit on the request pipeline or around the data access path rather than inside the core domain.
8. Security subsystem
The security module group shows multiple authentication/authorization strategies:
- JWT authentication
- refresh tokens
- API key auth
- role-based, claim-based, and policy-based authorization
- custom user management and Identity endpoints
These samples usually introduce an Auth/Identity boundary in front of secured endpoints, with token generation/validation and database-backed user stores.
9. Performance and caching
Caching is treated as a separate subsystem with multiple implementations:
- in-memory cache
- Redis distributed cache
- HybridCache
- response caching via behaviors in CQRS samples
Benchmarks appear in dedicated projects. For diagrams, show cache as a side store between API/service layer and the database or expensive computation.
10. Observability and runtime operations
The observability module includes health checks and external dependency checks. Logging samples use Serilog and correlation IDs. These features typically plug into the host startup and request pipeline rather than the domain model.
11. Background processing
The background-processing module shows IHostedService and BackgroundService patterns. These run outside normal HTTP requests and interact with application services or persistence on a timer or startup event. In architecture terms, they are a separate execution path within the same host.
12. Supporting infrastructure
Several lessons include:
- docker-compose.yml for database or supporting services
- launchSettings.json for local host configuration
- .http request files for manual API testing
- benchmark projects for performance comparisons
These are development/runtime supports rather than core business components, but they matter for environment diagrams.
13. Technology profile
The repo is centered on .NET 10, ASP.NET Core, EF Core, PostgreSQL, Docker, FluentValidation, MediatR, Serilog, and in some samples Redis and Identity. The archive/ folder contains older .NET 8 variants, but the main course content targets .NET 10.
14. How to read the repository in one diagram
The best high-level diagram is a collection of isolated sample apps, each with:
- an HTTP/API entry point
- optional pipeline concerns
- application logic in services/handlers
- persistence via EF Core and PostgreSQL
- optional cache/auth/background worker integrations
The repo is best represented as a teaching platform of multiple small architectures, not one unified distributed system.
Main entry points: MovieApi.Api EF CRUD · 02-database-management-with-ef-core Database Mgmt · 03-advanced-api-patterns Advanced APIs · 08-architecture-best-practices Architecture
Components 22
01 Getting Started
Introductory ASP.NET Core samples and lightweight API patterns.
- Getting Started · Entry-level API and ASP.NET Core middleware/filter examples.
modules/01-getting-started - HTTP Pipeline · Program.cs host wiring, endpoints, middleware, filters, and request handling.
modules/01-getting-started/filters-in-aspnet-core/FilterSamples.Api/Program.cs - Cross-Cutting · Logging, exception handling, validation, response wrapping, and timing concerns.
02 Database Management
EF Core CRUD, migrations, performance, and persistence behavior samples.
- Database Mgmt · EF Core persistence, migrations, concurrency, and query behavior examples.
modules/02-database-management-with-ef-core - EF CRUD · Minimal API CRUD backed by a DbContext, entities, and migrations.
modules/02-database-management-with-ef-core/aspnet-core-webapi-crud-with-entity-framework-core-full-course/MovieApi.Api - EF Advanced · Interceptors, soft deletes, tracking, concurrency, bulk operations, and multiple DbContexts.
03 Advanced API Patterns
CQRS, MediatR, custom dispatching, versioning, and mapping patterns.
- Advanced APIs · CQRS, MediatR, custom dispatching, and mapping patterns.
modules/03-advanced-api-patterns - CQRS + MediatR · Command/query handlers, notifications, and MediatR pipeline behaviors.
modules/03-advanced-api-patterns/cqrs-and-mediatr-in-aspnet-core/CqrsMediatr.Api - Custom CQRS · Homegrown dispatcher with request, notification, and behavior abstractions.
modules/03-advanced-api-patterns/cqrs-without-mediatr/CqrsCustom.Api
04 Performance & Caching
Caching strategies and benchmark-driven comparisons.
- Perf & Cache · Caching implementations and benchmark suites.
modules/04-performance-and-caching - Cache Layer · In-memory, Redis, HybridCache, and response caching behaviors.
05 API Security
Authentication and authorization strategies with JWT, Identity, and policies.
- Security · JWT, refresh tokens, API keys, roles, claims, and policies.
modules/05-api-security - Auth Boundary · JWT issuance, refresh tokens, API keys, and Identity-backed user stores.
08 Architecture Best Practices
Clean architecture and vertical slice comparisons.
- Architecture · Clean architecture and vertical slice contrasts.
modules/08-architecture-best-practices - Clean Arch · Domain, Application, Infrastructure, and API project boundaries.
modules/08-architecture-best-practices/clean-architecture-dotnet/src - Vertical Slice · Feature-centric endpoints and handlers kept close to the API surface.
modules/08-architecture-best-practices/clean-architecture-vs-vertical-slice-architecture/VerticalSlice/VerticalSlice.Api
10 Observability
Health checks and runtime visibility samples.
- Observability · Health checks and runtime diagnostics samples.
modules/10-observability - Health Checks · Application and dependency health probes wired into the host.
modules/10-observability/health-checks-in-aspnet-core/src/HealthChecks.Api
12 Background Processing
Hosted service and background worker samples.
- Background Jobs · Hosted services and non-HTTP execution paths.
modules/12-background-processing - Hosted Services · IHostedService and BackgroundService execution outside normal requests.
modules/12-background-processing/ihostedservice-backgroundservice/HostedServices.Api
archive
Older .NET 8-era course examples and legacy variants.
- Archive · Older .NET 8-era variants and earlier course lessons.
archive
Other components
- Course Repo · Teaching platform of isolated sample applications, grouped by module.
Connections 30
- Course Repo → Getting Started: contains · Course module boundary
- Course Repo → Database Mgmt: contains · Course module boundary
- Course Repo → Advanced APIs: contains · Course module boundary
- Course Repo → Perf & Cache: contains · Course module boundary
- Course Repo → Security: contains · Course module boundary
- Course Repo → Architecture: contains · Course module boundary
- Course Repo → Observability: contains · Course module boundary
- Course Repo → Background Jobs: contains · Course module boundary
- Course Repo → Archive: contains · Legacy examples
- Getting Started → HTTP Pipeline: hosts · API host and request pipeline samples
- HTTP Pipeline → Cross-Cutting: applies · Filters and middleware wrap the request path
- Database Mgmt → EF CRUD: hosts · Representative CRUD + EF Core sample
- Database Mgmt → EF Advanced: shows · Advanced persistence behaviors
- EF CRUD → EF Advanced: shares · Common EF Core backbone
- Advanced APIs → CQRS + MediatR: hosts · MediatR-based flow
- Advanced APIs → Custom CQRS: hosts · MediatR alternative flow
- CQRS + MediatR → EF CRUD: uses · Handlers persist through EF Core
- Custom CQRS → EF CRUD: uses · Dispatcher-driven handlers persist through EF Core
- Perf & Cache → Cache Layer: contains · Cache implementations and benchmarks
- Cache Layer → EF CRUD: fronts · Cache sits between API/service and database
- Security → Auth Boundary: contains · Authentication and authorization strategies
- Auth Boundary → EF CRUD: stores · Identity and token data use persistence
- Architecture → Clean Arch: contains · Layered architecture sample
- Architecture → Vertical Slice: contains · Feature-folder sample
- Clean Arch → EF CRUD: depends on · Infrastructure persistence behind application layer
- Vertical Slice → EF CRUD: uses · Feature endpoints still depend on EF Core persistence
- Observability → Health Checks: contains · Health probe sample
- Background Jobs → Hosted Services: contains · Background execution sample
- Hosted Services → EF CRUD: runs with · Workers can interact with persistence or app services
- Archive → HTTP Pipeline: includes · Older structured logging and exception samples