Skip to content

Lesson 2 of 9 · 24m

Cutting the Frontend Along Domain Boundaries

Use business capabilities, user journeys, and data ownership to draw boundaries that survive redesigns and framework migrations.

The fastest way to make micro-frontends miserable is to slice them by technical layer: one team owns navigation, another owns buttons, another owns pages. That is not federation; it is distributed monolith with extra meetings. Boundaries have to follow the business domain, because that is where ownership and change naturally concentrate.

A useful rule: a boundary is good when most changes inside it require no coordination outside it. A checkout team should be able to add a payment method, tune validation, and run an experiment without asking the catalog team for permission.

Start with user journeys, not screens

Screens are deceptive because several domains often appear together. A product detail page may contain catalog data, inventory, pricing, recommendations, reviews, and cart actions. Do not assign "the page" to a team. Assign the capabilities:

/catalog/search          Discovery
/product/:id             Merchandising
/cart                    Transactions
/checkout/*              Transactions
/account/*               Identity
/recommendations/widget  Personalization

The shell composes those capabilities. Ownership is vertical: UI, client-side behavior, domain API interactions, and operational responsibility.

Follow the data

Ask who owns the truth. If inventory data can only be interpreted correctly by the inventory team, their frontend slice should render inventory-critical UI. Passing raw inventory records through five teams' components creates semantic coupling even when the runtime is isolated.

This is why shared "dumb components" are safer than shared "smart widgets." A design-system button does not know your domain. A shared cart summary absolutely does — it will drag pricing, promotions, tax, and stock rules into every consumer.

Use seams you can enforce

Write down the contract for each boundary:

# federation/checkout.contract.yaml
owner: transactions-team
routePrefix: /checkout
publicEvents:
  emits:
    - name: checkout.completed
      version: 1
  consumes:
    - name: cart.updated
      version: 2
dependencies:
  singletons: [react, react-dom, design-tokens]
  forbidden: [catalog-internal-api]

You will not enforce everything automatically on day one, but making ownership explicit turns arguments into design decisions.

Beware the nano-frontend

A footer link, a banner, and a tooltip do not each deserve deployment infrastructure. Start with slices large enough to have a roadmap and an on-call owner. If a micro-frontend cannot fail independently in a meaningful way, it is probably a component.

Field notes

  • Boundaries drawn around business capabilities age better than boundaries drawn around visual rectangles.
  • "Who gets paged when this breaks?" is a better boundary test than "where does this component live?"
  • Shared smart widgets hide coupling; share primitives and composition patterns instead.
  • Expect boundary migration. The first cut is a hypothesis, not a constitution.

Was this lesson helpful?

Sign in to rate