Part 1: DDD Bounded Contexts — Magento to 21 Services

Every Magento team that decides to migrate to microservices faces the same first question: how many services? The industry says 4–6. “Catalog service, Order service, Customer service, Inventory service, Payment service, and maybe CMS.” Every blog post, every conference talk converges on this list. It’s a reasonable starting point — and it’s wrong for serious e-commerce at scale. The Composable Commerce Platform we’re documenting in this series has 21 microservices across 6 bounded context groups. That’s 3–4× the industry recommendation. This article explains why — with a complete Magento module → service mapping table, and the two counter-intuitive domain splits that Magento engineers almost always get wrong. ...

April 8, 2026 · 9 min · Lê Tuấn Anh

Part 3: Domain-Driven Design (DDD) Boundaries in a Modular Monolith

Part 3: Domain-Driven Design (DDD) Boundaries in a Modular Monolith The biggest reason engineering teams fear the Monolith architecture is due to terrible past experiences with “Spaghetti Monoliths” or the “Big Ball of Mud” — where the code for the Billing function calls directly into the database of the Cart function, creating an inextricable web of cross-dependencies. To leverage the performance advantages of a Monolith while still achieving independent development velocity like Microservices, we must build a Modular Monolith. The key to this architecture is strictly applying Domain-Driven Design (DDD) principles and establishing hard “borders” right within the code. ...

July 3, 2026 · 4 min · Lê Tuấn Anh

Architecting 21-Service E-commerce with Golang & DDD

Answer-first: We decompose the monolith into 21 microservices using Domain-Driven Design (DDD) to isolate business boundaries. Implementing the Kratos framework in Go enables strong structural subtyping for clean layer segregation, while Dapr Workflows handle distributed transactions asynchronously via the Saga pattern to avoid race conditions. What You’ll Learn That AI Won’t Tell You The exact performance overhead of using Go’s structural subtyping versus manual dependency injection in high-throughput microservices. Why scoping database transactions to a single Aggregate root is critical, and how we resolved out-of-order event delivery using Kafka partition keys. Scaling an e-commerce platform past 10,000+ orders per day containing multiple SKUs across dynamic warehouses is where naive architecture breaks down. Hardware scaling ceases to be a magic bullet when distributed transactions, race conditions, and eventual consistency are involved. ...

April 12, 2026 · 8 min · Lê Tuấn Anh

Deconstructing the Ecosystem: Service Details by Domain

Answer-first: We partition the e-commerce domain into six logical business domains—Identity, Catalog, Cart, Checkout, Order, and Fulfillment—containing 21 isolated services. Each service owns its database exclusively, communicating asynchronously via event brokers to ensure scalability and prevent tight coupling. What You’ll Learn That AI Won’t Tell You Why microservices must own their schema migrations (via Golang-Migrate) independently, and the specific event schemas that prevent transactional coupling. Real-world database deadlocks encountered when segregating order history from the catalog database, and how they were solved using CQRS. “Why 21 services? Isn’t that overkill?” ...

April 12, 2026 · 10 min · Lê Tuấn Anh