Inside ShopFlow's LVD Architecture

Picture one platform serving around 350 independent shops, built by fifteen engineers in three teams. The classic way this goes wrong is that everyone ends up editing the same few files. The book's ShopFlow example shows the alternative: let the layers draw the lines, and let the teams follow them.

The platform in brief

ShopFlow is the book's representative example of a mid-market specialty retailer: a multi-tenant platform with a broad product catalogue, inventory that must stay in sync across warehouse and storefront, and a purchase funnel that sees seasonal spikes of several times its normal load. It is a generic composite rather than a named company, and the book labels its figures as projected outcomes. This article therefore sticks to structure, which is where the interesting ideas are.

Nine layers in a shop

Walking up the stack, each layer has an obvious job in a retail setting:

  • Schema carries the data contracts for products, orders, users and payments.
  • Utils holds pure pricing, tax, shipping and validation logic.
  • Resources wraps the database, cache, search engine, payment processor and email service.
  • Tools are the business operations themselves: create a product, place an order, issue a refund.
  • API exposes those tools over REST and GraphQL with token-based authentication.
  • MCP offers a curated handful of them to AI agents, chosen from the operations support staff and shoppers use most.
  • Skills and Agents teach and run two assistants, one that helps customers find and buy things and one that helps internal support.
  • UI is the customer storefront, a single-page application that lives in the same repository as everything below it.

Notice what is shared. A product schema defined once serves the tools that create products, the API that returns them, the MCP descriptor an agent reads and the screen that displays them. That reuse is the practical payoff of putting types at the bottom.

Teams follow layers

The three teams are organised around business areas, and each owns a band of layers rather than a single service. The catalogue team works across the lower four layers, from Schema through Tools. The orders team covers Schema through the API layer, because checkout and payments need an interface. The customer-experience team works from Tools up through Agents, where recommendations and support live.

One shared platform engineer looks after the things nobody should own twice: the build pipelines, observability, and the shared Schema and Utils layers. The book ties this deliberately to Conway's Law, the observation that systems come to mirror the communication structure of the organisations that build them. Here the mirror is intentional. Layer boundaries double as natural module boundaries, so a team's ownership has edges the compiler can see.

Worth noticing are the overlaps. All three teams work in the Tools layer, and two of them also write Schema. Layering does not remove the need for coordination. What it does is tell you where the coordination has to happen: in the shared lower layers, which is exactly where the platform engineer sits. Teams that rarely talk can still work safely above that line, because the contract beneath them is explicit.

The takeaway

The lesson is less about retail than about where you let the seams fall. Splitting by feature gives every team a slice of every concern. Splitting by layer gives teams a clear contract with the layers below them and a clear audience above. It is worth asking, in your own system, who owns the bottom two layers, because everyone else depends on them. For the principles behind the layout, start with the nine layers explained, and for the new top layer see why the UI is its own layer.

What the book covers

  • Layer-by-layer detail of ShopFlow's schemas, utilities, resources and tools
  • How the REST, GraphQL and MCP interfaces expose the same business operations
  • The two agent systems that sit on top of the MCP layer
  • The storefront as the ninth layer
  • Metrics and lessons from the case study, presented as projected outcomes