A modular monolith is like a ship with watertight compartments: it deploys as one application, but its code is divided into isolated modules. Modules run in the same memory space and share a server, yet communicate through strict interfaces rather than accessing one another’s internal logic or database tables. section 12.2.5
Vertical Slice Architecture helps make those compartments practical. Instead of putting all controllers, business logic, and queries into separate technical folders, group code by business feature. Each slice contains the pieces needed for that feature. section 12.2.5
Checkout as a slice
A Checkout slice contains its own API endpoint, business logic, and database queries. Someone changing checkout can find those pieces together instead of hunting through separate UI, Services, and Data folders. section 12.2.5
A modular monolith keeps internal boundaries without paying the networking costs of separate services. Enforce those boundaries with automated CI/CD tools; otherwise, a single deployment can still become a tangled codebase. Microservices add operational overhead and are worth considering when business needs justify it, such as large teams or highly uneven scaling demands. section 12.11 section 12.2.5
Figure 12.1 The Architecture Spectrum. Moving to Microservices is a two-step evolution. You must first decouple your internal logic using strict interfaces (The Modular Monolith) before you safely decouple your infrastructure across a network.

The architecture spectrum shows the distinction between separating internal logic and separating infrastructure across a network. section 12.2
Plan an escape hatch rather than splitting everything at once. For example, if video transcoding needs independent scaling or faster deployments, extract that module and leave the rest as a modular monolith. The Strangler Fig pattern supports gradual migration by rerouting traffic incrementally. section 12.9.2 section 12.11


