Modules vs Vertical Slices: Macro vs Micro Architecture in the Modular Monolith (2026)


Somewhere around 2014 the industry decided monoliths were the problem and microservices the answer. By 2026 the bills have arrived — observability, network, on-call, distributed transactions, hours-long integration tests — and "modular monolith" is a respectable architecture choice again. This article reconstructs how we ended up with too many microservices, defines what a modular monolith actually is (and is not), shows the NestJS module boundaries that make a monolith genuinely modular, sets out the scaling triggers that justify a real split, walks through the Strangler Fig migration path in both directions, examines the Shopify, Basecamp and Amazon Prime Video case studies, and offers a decision table for architects choosing between the two.
Most teams that say they "do DDD" have a folder called domain/ and occasional meetings with a product manager. The genuine practice — bounded contexts that match the business, aggregates that protect invariants, ubiquitous language that survives the trip from whiteboard to code — is rare because it is harder than its surface description. NestJS is one of the few back-end frameworks whose primitives are well-suited to a serious DDD implementation. This guide covers bounded context mapping, aggregate sizing, the ideal layered folder structure, the repository pattern done correctly versus the DAO that pretends to be one, domain events through the in-process bus, and composition with the Saga, Outbox, and Event-Driven Architecture patterns.
Most enterprise AI systems built on fixed-pipeline RAG architectures are leaving significant accuracy and reliability on the table. Modular RAG replaces the retrieve-stuff-generate pipeline with a dynamic decision graph, enabling systems to retrieve adaptively, critique their own outputs, and recover from poor retrieval before it determines the final answer. Production benchmarks show 30–40% accuracy improvements on complex, multi-source queries — the exact category of query that drives the most business value and carries the most operational risk. This article explains the architecture, the economics, the governance implications, and the strategic decisions leadership must make to build retrieval infrastructure that is genuinely fit for enterprise production.
The 2026 architecture for database-per-service plus cross-service joins via Debezium CDC, Kafka, and ksqlDB / Flink materialised views — with the operational runbook.
Advertise and partner
Reach engineering leaders and CTOs reading about AI, mobile and cloud architecture.
Sponsored mentions and co-authored articles or technical deep-dives. Relevant products only, always disclosed.