How ShopFlow's Architecture Absorbed Change

A diagram can look wonderful on day one and still tell you nothing about whether the architecture is any good. The honest test is what happens when the business asks for something new. The book's ShopFlow case study is built around exactly that test: a series of changes, and a record of which layers each one had to touch.

Built from the bottom

ShopFlow is the book's representative retail platform, a composite rather than a real company, and its figures are projected outcomes. The structure is the interesting part. The first phase concentrates entirely on the lower four layers: schemas, utilities, resource clients and an initial set of tools. Later phases add the API layer, then GraphQL, the MCP layer and an assistant, and finally performance work and a support bot.

The storefront follows the UI layer's folder rules. It reads types from Schema and formatting from Utils, reaches the server only through a generated client, and keeps its features from importing one another, so different teams' screens do not collide. For team ownership and the layer-by-layer layout, see inside ShopFlow's LVD architecture; the storefront has its own article in the ShopFlow storefront example.

Three shapes of change

Looking across the events the book records, they fall into three shapes. Seeing which shape a request has is a handy diagnostic for your own system.

Contained below

The business adds a second payment provider. The Resources layer already exposed a provider-agnostic payment interface, so the work was a new client for the second provider plus a router that picks between them. The Tools layer kept calling the same interface. In the book's projection that is three modified files, all in one directory, and no change above it. The lesson is that an abstraction paid for early is repaid on the first provider swap.

Added above

Mobile developers ask for GraphQL. The resolvers are thin adapters over the same tools the REST endpoints call, and the GraphQL schema is generated from the Schema layer's definitions. Nothing existing needed editing, and no business logic was duplicated, so the two protocols behave identically by construction.

The internal support bot follows the same pattern. It reuses the MCP tools that already exist, with elevated permissions, and the only edit to existing code is in the MCP layer's authorisation, which learns to accept internal-agent tokens. The book's conclusion is that the MCP layer works as a capability boundary: new agent systems compose existing tools rather than touching business logic.

Cutting across

Multi-currency support touches Schema, Utils and Resources, and the book is frank that cross-layer changes are the most expensive kind. The compensation is visibility. Extending the schema made the compiler flag every consumer, which produced a checklist nobody had to write. The performance work in the later phase also spans four layers. It succeeds because each layer's contribution, caching in Resources, compression at the API, algorithmic tweaks lower down, can be tested and deployed on its own.

A redesign that could not break the totals

One event deserves a mention for being so ordinary. Product analytics showed shoppers abandoning a multi-page checkout, so the team replaced it with a single page. From the browser's side the same tools were invoked in a new sequence, yet none of them was edited, and the order schema and API routes stayed as they were. The book's point is that a redesign, the most frequent change in any customer-facing product, becomes cheap when the UI holds no business rules. The new page could not have broken an order total because it never calculated one.

The takeaway

When you review your own change history, sort each request into contained, additive or cross-layer. If most of yours are cross-layer, the layers are not doing their job. If the cross-layer ones are the schema-driven kind, expect them to be loud but safe. For the provider-abstraction pattern behind the first event, see four patterns that keep external systems at arm's length, and for the second, GraphQL, gRPC and living API documentation.

What the book covers

  • The four implementation phases and what each added
  • Detailed change analyses for six architectural events
  • How a schema change became an automatic checklist of consumers
  • A performance optimisation spread across four layers
  • Projected velocity, defect, coverage and availability figures for the project