# kgrzybek/modular-monolith-with-ddd

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/kgrzybek-modular-monolith-with-ddd).**

13,761 stars · 2,165 forks · C# · MIT

## Links

- GitHub: https://github.com/kgrzybek/modular-monolith-with-ddd
- awesome-repositories: https://awesome-repositories.com/repository/kgrzybek-modular-monolith-with-ddd.md

## Topics

`architecture` `clean-architecture` `clean-code` `cqrs` `ddd` `ddd-architecture` `ddd-cqrs` `ddd-example` `design-patterns` `design-systems` `domain-driven-design` `dotnet` `dotnetcore` `entity-framework-core` `event-sourcing` `modularity` `monolith` `rest` `rest-api` `software-architecture`

## Description

This project provides a structured template for building enterprise applications using a modular monolith architecture. It demonstrates how to organize complex business logic into independent, domain-specific modules that remain contained within a single deployment unit.

The architecture enforces strict boundaries between components to minimize coupling and complexity. It utilizes domain-driven design principles to map software components directly to real-world business concepts, ensuring that logic remains independent of infrastructure concerns. Communication between these isolated modules is handled through asynchronous domain events, while a centralized bus pattern decouples request handling from core business logic.

The codebase incorporates practices for maintaining long-term technical strategies, including the use of architectural decision records to document significant design choices. By utilizing persistence-ignorant modeling and internal access modifiers, the framework ensures that domain entities remain testable and protected from cross-module dependency leakage.

## Tags

### Software Engineering & Architecture

- [Modular Monoliths](https://awesome-repositories.com/f/software-engineering-architecture/modular-monoliths.md) — Provides a structured template for building enterprise applications as modular monoliths.
- [Domain-Driven Designs](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/abstraction-domain-modeling/domain-driven-designs.md) — Offers a structured template for organizing business logic using domain-driven design.
- [Command Pattern Implementations](https://awesome-repositories.com/f/software-engineering-architecture/command-pattern-implementations.md) — Routes commands and queries through a centralized bus to maintain separation of concerns.
- [Command Patterns](https://awesome-repositories.com/f/software-engineering-architecture/command-patterns.md) — Decouples request handling from business logic using a centralized command bus.
- [Dependency Inversion Patterns](https://awesome-repositories.com/f/software-engineering-architecture/project-management-governance/dependency-boundary-enforcers/dependency-inversion-patterns.md) — Implements dependency inversion to decouple core business logic from infrastructure concerns.
- [Software Design Patterns](https://awesome-repositories.com/f/software-engineering-architecture/software-design-patterns.md) — Implements enterprise design patterns for managing large-scale codebases.
- [Modular Software Design](https://awesome-repositories.com/f/software-engineering-architecture/modular-software-design.md) — Structures large codebases into independent, domain-specific modules. ([source](https://github.com/kgrzybek/modular-monolith-with-ddd/tree/master/docs/))
- [Module Boundary Enforcement](https://awesome-repositories.com/f/software-engineering-architecture/project-management-governance/dependency-boundary-enforcers/module-boundary-enforcement.md) — Enforces strict module boundaries using access modifiers to prevent dependency leakage.
- [Architecture Decision Records](https://awesome-repositories.com/f/software-engineering-architecture/architecture-decision-records.md) — Maintains architectural decision records to document significant design choices. ([source](https://github.com/kgrzybek/modular-monolith-with-ddd/tree/master/docs/))

### Data & Databases

- [Event-Driven](https://awesome-repositories.com/f/data-databases/data-synchronization/event-driven.md) — Uses asynchronous domain events to propagate state changes between modules.
- [Persistence-Ignorant Architectures](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/data-persistence-storage/persistence-ignorant-architectures.md) — Defines domain entities independently of database schemas to ensure portability.
