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 2 — Centralization

Divergence was the first crack.

The solution: centralize cart state and derived logic.

Navbar — Cart (0 items)

Checkout

Subtotal: $0

Shipping: $10

Total: $10

Decision Impact

Benefit

Consistency is restored across all surfaces.

Shift

Cart logic now lives in a shared provider.

New Coupling

All consumers depend on a global state boundary, increasing systemic coupling.

Gravity

The provider becomes a concentration point. Every new rule lands here.

Blast Radius

A bug in cart logic now affects every surface simultaneously.

Code Snapshot — Shared State Gravity

// Global reducer
function reducer(state, action) {
  switch (action.type) {
    case "SET_CART":
      return { ...state, cart: action.payload }
  }
}

// All derived logic centralized
const subtotal = state.cart.reduce(...)
const itemCount = state.cart.reduce(...)

Incident Simulation

A promotion rule introduces a subtle bug.

The provider recalculates totals incorrectly.

Every surface displays the same incorrect total.

No divergence. No visible inconsistency. Just globally wrong data.

Centralization fixes divergence — but amplifies failure.