
Explore modular monolith architecture in a .NET backend bootcamp, mastering vertical slice architecture, domain driven design, and the outbox pattern for reliable cross-module messaging.
Access the course prerequisites, source code on GitHub, and lecture slides; set up dotnet eight, Visual Studio, Docker Desktop with Docker Compose, and Postman to test the modular monolith.
Run the final application with Docker Compose, configure identity tokens, interact with catalog and basket APIs, implement the outbox pattern with RabbitMQ, and validate end-to-end checkout.
Explore the modular monolith code structure in Visual Studio, including bootstrapper, modules, and shared folders, with API entry points and vertical slice architecture.
Explore modular monolith and microservice architectures, applying vertical slice architecture with domain-driven design, solid principles, and outbox and publish-subscribe patterns using PostgreSQL, Redis, and RabbitMQ with MassTransit.
Follow the course flow to build a modular monolith in Visual Studio, implement catalog and basket modules with Redis caching and Keycloak security, and use RabbitMQ outbox for messaging.
Explore traditional monoliths, a single, tightly coupled deployment where presentation, business logic, and data reside in one unit with a shared database, and note when strong consistency favors this approach.
Explore how traditional monolithic architecture limits scalability, wastes resources, and creates development bottlenecks through tight coupling and large codebases, causing deployment risks and downtime.
Limit the ability of traditional monolithic architectures to adopt new technologies and respond to changing requirements, exposing the fear cycle from interlocking dependencies, maintenance challenges, and technical debt.
Explore the big ball of mud by showing how rapid development, quick fixes and shortcuts, lack of design, and inadequate refactoring create a messy, entangled codebase with no clear structure.
Explore microservices and architecture as small, independent, loosely coupled services with autonomous teams, independently deployable, each with its own database, communicating via REST, gRPC, and event streaming within bounded contexts.
Explore the pitfalls of microservice architecture, including increased complexity, data consistency and duplication, network latency and failures, and overhead, with strategies like saga patterns, event sourcing, and change data capture.
Explore the distributed monolith anti-pattern in microservices, where tight coupling and a shared database hinder deployments. Identify causes like inadequate service boundaries and lack of domain-driven design.
Rearchitecting from distributed microservices to a monolithic ecs task for Amazon Prime Video demonstrates eliminating S3 as intermediate storage, reducing data transfers and cost while scaling streams.
Explore modular monolith architecture as a bridge between monoliths and microservices, delivering modular, bounded contexts within a single deployable unit, with unified data, direct inter-module calls, and domain events.
Discover why modular monoliths are gaining traction as a middle ground between monoliths and microservices. Learn how they offer simplified communication, unified data management, scalable module design, and development simplicity.
Explore monolithic first approaches endorsed by Martin Fowler and Sam Newman, emphasizing modular monolith design, single deployable units, and bounded contexts before adopting microservices.
Learn to transition from a modular monolith to microservices through incremental refactoring, identifying candidates, defining boundaries, extracting functionality, and implementing inter-service communication.
Explore how Shopify's modular monolith architecture splits a large Ruby on Rails monolith into modules and components to handle peak traffic with loosely coupled communication, canary testing, and high reliability.
Decompose the eshop into catalog, basket, identity, and ordering modules using bounded contexts in a modular monolith, with vertical slice architecture, mediator, EF Core, and outbox pattern.
Create a modular monolith by setting up a GitHub repo and a blank solution, then structure it into bootstrapper, modules, and shared folders with a bootstrapper API.
Create and configure a GitHub repository for a modular monolith project, including naming, description, license, and Visual Studio gitignore. Clone the repository and set up a src folder for code.
Create a blank Visual Studio solution under the source folder, name it shop-modular-monoliths, and relocate the solution file within the source folder to prepare for modular monolith development.
Explore a modular monolith folder structure with bootstrapper, modules, and shared, exposing module APIs via an ASP.NET Core gateway, using domain-driven design and vertical slice architecture.
Create bootstrapper api project as the entrypoint of a modular monolith; configure an ASP.NET Core empty project to expose module endpoints, with middleware, routing, and dependency injection.
Configure an empty web project as a bootstrapper api for a modular monolith by setting up Program.cs, services, and the https pipeline, and adjust launch settings for docker compose.
Create modules folders according to domain-driven design bounded context analysis, forming catalog, basket, and ordering submodules that encapsulate each module's domain logic.
Explore external and internal architectures of modular monoliths, contrasting microservices and cloud native backends with internal modules using unique database schemas, vertical slice architecture, and domain driven design.
Explore vertical slice architecture, which organizes code by feature across the UI to database, delivering self-contained slices with reduced dependencies and cross-functional teams for scalable, testable microservices.
Learn clean architecture by uncle Bob, featuring independent frameworks, UI-agnostic and database-agnostic design, with domain entities, use cases, and a layers approach that enables modular, testable, maintainable microservices.
Compare vertical slice architecture and clean architecture, highlighting delivery of complete features rapidly, independent modules, layered separation, and domain driven design within modular monolith architecture and microservices.
Create module projects as class libraries within a modules folder to build a modular monolith with catalog, basket, and ordering modules handling products, cart, and order processing.
Learn how the shared kernel pattern in domain driven design uses a small subset of the domain model across bounded contexts to ensure consistency and reduce duplication.
Create a shared kernel class library for all modules, hosting base entities, value objects, and domain events to maintain consistency and reduce redundancy across a modular, domain-driven design.
Wire a shared project as a dependency for catalog, basket, and ordering modules in a module monolith to centralize common code, domain events, utilities, and NuGet packages in a library.
Connect the bootstrapper api project to basket, catalog, and ordering modules by adding project references, enabling access to module logic via the shared library and supporting the monolith architecture.
Wire up dependencies between modules by managing ASP.NET dependency injection, creating module classes, and registering module services via extension methods in the Bootstrapper API project.
Explore asp.net dependency injection management and Program.cs, register services with transient, scoped, and singleton lifecycles in the DI container to build and run a modular monolith.
Register module services via extension methods in the Program.cs DI container, then accumulate module dependencies (catalog, basket, ordering) for a centralized and clean API project.
Develop the add catalog module extension method in catalog module.cs. Create a module css file and move Microsoft.Extensions packages to a shared library while configuring the dependency injection in program.cs.
Register catalog dependencies into program.cs using the catalog module extension method to enable dependency injection for the module's application infrastructure and API services.
Develop basket and ordering modules by adding extension methods to IServiceCollection, configure via appsettings.json, and register module services into the dependency injection container.
Register basket and ordering dependencies in program.cs via extension methods from both modules, with proper using statements. This modular approach clarifies dependency injection and supports scalable, compile-ready solutions.
Learn ASP.Net middlewares and the HTTP request pipeline as a chain of delegates processing requests and responses, with built-in components like static files, routing, authentication, and custom middlewares.
Configure http request pipelines for modules in Program.cs by modularizing setup with extension methods on the web application, and wire modules like catalog, basket, and ordering into the pipeline.
Explore how to build extension methods on the AI application builder interface within a web application, install the right NuGet packages, and manage abstractions for modular ASP.NET Core pipelines.
Develop the catalog module extension method to configure the HTTP request pipeline with the AI Application Builder, implementing two extension methods and preparing for required fluent validation packages.
Integrate use catalogue module extension method into Program.cs by registering catalogue, basket, and ordering modules in the Bootstrapper API and dependency injection container, then configure the HTTP request pipeline.
Develop use basket module and use ordering module extension methods for module config by adding extension methods on IApplicationBuilder that configure the HTTP request pipeline and return the application.
Integrate use basket module and use ordering module extension methods in Program.cs via the Bootstrapper API, wiring up dependency injection and configuring HTTP pipeline for catalog, basket, and ordering modules.
Create a global using file in the API project to move catalog, basket, and ordering into global scope, remove redundant usings, and reduce clutter across the codebase.
Explore building the catalog module in a modular monolith using vertical slice architecture and domain driven design, with mediator, entity framework, PostgreSQL, minimal APIs, and secure patterns.
Analyze the catalog domain to model product and category, define CRUD use cases, design rest APIs, and implement relational data with PostgreSQL and EF Core, including domain and integration events.
Explore a catalog module built with vertical slice architecture, featuring feature folders, CQRS with mediator, Carter API endpoints, dependency injection, minimal APIs, EF Core PostgreSQL, and object mapping.
Follow a modular monolith development path using shared, modules, and api folders; build shared components, implement domain, infrastructure, and application layers, then expose rest apis.
Develop the shared domain layer for tactical domain driven design abstractions by implementing entities, value objects, aggregates, and domain events in a mediator-enabled class library.
Explore domain-driven design's strategic focus on modeling the business domain, with key concepts such as domain, subdomain, ubiquitous language, bounded context, and context mapping.
Explore tactical domain-driven design by modeling with entities, value objects, aggregates, and aggregate roots, illustrated through an order domain and clean architecture patterns.
Develop domain-driven design abstractions by implementing entity, aggregate, and domain event foundations in a shared library for module monolith architecture; create IEntity, IEntity<T>, and an Entity base class with metadata.
Develop the IDomainEvent interface in a tactical DDD approach using MediatR, defining event ID, occurred on, and event type for AI domain events and enabling publishing via INotification.
Develop aggregate classes in tactical ddd abstractions by implementing the aggregate interface and base class, managing domain events, and enabling integration events across bounded contexts using mediator notifications.
Develop the catalog module using domain driven design to model product and category entities, explore rich vs anemic models, and implement product created and price change domain events.
Develop product domain entity models in the catalog module according to vertical slice architecture, creating a product entity under the products models folder and inheriting from the entity with GID.
Compare anemic and rich domain model entities in domain driven design. See how the order entity encapsulates business logic with add order item and remove order item.
Develop a domain-driven design rich domain model for the product entity by adding create and update methods, enforcing domain rules with validations and encapsulation via private setters.
Explore how domain events capture past actions like an order placed and trigger side effects within a domain, then contrast with asynchronous integration events across microservices.
Develop and implement product created and product price change domain events in the catalog module, modeled as record types implementing the IDomainEvent interface, carrying the product entity to propagate changes.
Convert the product from entity to aggregate to raise domain events, and implement product created and product price change events in the catalog module's create and update methods.
Learn data management for modular monoliths by configuring PostgreSQL as the database with modular data in a single database, schema separation, and backing services, using Docker Compose and Visual Studio.
learn data management for modular monoliths by exploring data isolation’s importance—maintainability, scalability, security, and conflict reduction—and four strategies: separate table, separate schema, separate databases, and different persistence mechanisms.
Explore best practices for database schema separation in modular monoliths, applying a separate schema per module in PostgreSQL for data isolation and easier management and security.
Demonstrates a multi-context entity framework core DbContext approach with separate schemas for catalog, basket, and order in a single PostgreSQL database, using Model Builder to set default schemas.
Explore backing services for cloud-native architectures, including databases (PostgreSQL, MongoDB), caching (Redis), messaging (RabbitMQ), and authentication (Keycloak), enabling a modular monolith with scalable, decoupled components.
Learn the Icap modular monolith deployment strategy by setting up a PostgreSQL database as a backing service with Docker Compose for local development and end-to-end testing.
Set up a PostgreSQL database using a Docker Compose file in a multi-container environment, exposing ports and linking the monolith application, while leveraging the official image and Docker Compose YAML.
Add a PostgreSQL database image to the docker-compose.yml to enable a multi-container environment, backing the e-shop modular monolith, and configure environment variables, ports, and volumes.
Run the docker compose profile in Visual Studio to spin up a PostgreSQL database container on docker, then verify the setup with Docker Desktop and an interactive terminal.
Connect and browse a PostgreSQL database using pgadmin, accessing the docker-hosted server on localhost:5232 to explore the public schema and tables for catalog, basket, and ordering.
In this bootcamp, you'll learn how to build robust, scalable, and maintainable applications using cutting-edge technologies and architectural patterns.
We will develop;
Modular Monoliths (Modulith) Architecture
Vertical Slice Architecture (VSA)
Domain-Driven Design (DDD)
Command Query Responsibility Segregation (CQRS)
Outbox Pattern for Reliable Messaging
We start with the basics and progressively dive deeper into each topic. You'll get hands-on experience building a complete EShop Modular Monolith application, implementing features like CQRS and the Outbox pattern.
We'll follow CQRS (Command Query Responsibility Segregation) and Vertical Slice architectures for module development.
Modules will communicate over In-process method calls-public APIs and use RabbitMQ for event-driven communication.
We'll secure our APIs with Keycloak, using OpenID Connect and Bearer Tokens.
We'll implement the Outbox Pattern for reliable messaging between modules.
Along with this you’ll develop following modules and items:
Catalog module which;
Using Asp.Net Core Minimal APIs and latest features of .Net8 and C# 12
Develop Vertical Slice Architecture implementation with Feature folders
Develop DDD, CQRS Patterns using MediatR library w/ following Best Practices
Use Domain Events & Integration Events when UpdatePriceChanged event
Use Entity Framework Core Code-First Approach and Migrations on PostgreSQL Database
Use Carter for expose Minimal Api endpoints
Cross-cutting Concerns including Logging with Serilog, Validation with MediatR Pipeline Behaviors, Exceptions, Pagination
Basket module which includes;
Similar to Catalog Module; Develop DDD, CQRS, Vertical Slice Architecture implementation
Additionally;
Using Redis as a Distributed Cache over PostgreSQL database
Develop and Implements Proxy, Decorator and Cache-aside patterns
Publish BasketCheckoutEvent to RabbitMQ via MassTransit library
Implement Outbox Pattern For Reliable Messaging w/ BasketCheckout Use Case
Module Communications;
Sync Communications between Catalog and Basket Modules with In-process Method Calls (Public APIs)
Async Communications between Modules w/ RabbitMQ & MassTransit for UpdatePrice Between Catalog-Basket Modules
Identity Module which includes;
Develop User Identity Module with Keycloak Authentication
OAuth2 + OpenID Connect Flows with Keycloak
Setup Keycloak into Docker-compose file for Identity Provider as a Backing Service
Secure EShop Modules with Keycloak OpenId Connect in AspNet
JwtBearer token for OpenID Connect with Keycloak Identity
Ordering Module which includes;
Similar to the Catalog and Basket Module; Develop DDD, CQRS, Vertical Slice Architecture implementation
Implement Outbox Pattern For Reliable Messaging w/ BasketCheckout Use Case
Lastly, we will discuss
Migrating to Microservices: EShop Modules to Microservices w/ Stranger Fig Pattern
This course is more than just learning .NET, it's a deep dive into the world of Modular Monoliths with Vertical-Slice Architecture, Domain-Driven Design (DDD), CQRS, and advanced architectural patterns for Backend Development.