When Systems Stop Being Enough

Understanding how frontend systems evolve under pressure.

How Systems Typically Begin

Most frontend systems do not begin with architecture. They begin with delivery.

Systems rarely fail because of patterns.

They fail because prior decisions stop holding under new pressure.

Level 3 — Domain Protection

Centralization solved divergence.

But business rules are changing weekly.

Tax laws differ by region. Shipping depends on geography. Promotions overlap.

Pricing logic is no longer UI behavior. It is a financial boundary.

Navbar — Cart (0 items)

Checkout

Subtotal: $0

Shipping: $10

Total: $10

Architectural Decision

Extraction

Pricing logic is moved into pure domain functions.

Boundary

UI renders. Domain computes. State stores.

Benefit

Rules are testable. Framework-independent. Explicit.

New Cost

Increased indirection. More cognitive overhead. More structural complexity.

Invariant Protection

Financial rules now live behind an explicit domain boundary.

Code Snapshot — Domain Boundary

// domain/cart.ts

export function calculateSubtotal(cart) {
  return cart.reduce(...)
}

export function calculateShipping(subtotal) {
  return subtotal > 100 ? 0 : 10
}

// UI
const subtotal = calculateSubtotal(cart)

Incident Simulation

A regional tax rule changes.

Without a domain boundary, pricing logic is scattered across UI components.

One surface updates. Another does not.

Legal exposure increases. Financial totals drift.

With a protected domain layer, rules change in one place.

When rules carry financial weight, they must be isolated from the interface.