React Forum
Blog & Guide Responses
Aug 23, 2022 · 04:00 PM

[Deep Dive #20] Monolith Bearings - discussion

Started by Camille Duarte
blogarchitecturemonolithboundariesroutessignals

We're doing a slow split-the-monolith effort and I'm trying to avoid the common trap where boundaries are just folder structure with no runtime truth.

Read the post

What bearings do you actually use to keep boundaries real (route surfaces, adapter layers, signals/evidence)? How do you migrate a route to a new boundary without breaking deep links and back/forward behavior? And what do you do to keep boundary decisions from turning into a docs-only story?

Comments (10)

Back to latest
Maya Henson
Aug 23, 2022 · 04:05 PM

If the boundary isn't observable at runtime, it isn't real. Otherwise you'll still have cross-boundary coupling, just with nicer folders.

Dmitri Kline
Aug 23, 2022 · 04:14 PM

Our best bearing was the route contract itself: stable surface keys + signals that prove which boundary owns what.

Related: Architecture Guides and Migration Runbooks (Deep Dive #8).

Salma Qureshi
Aug 23, 2022 · 04:26 PM

We made boundary ownership explicit in signals during migrations:

ts
doc.write('boundarySignal', { surface: 'Orders', owner: 'billing-service', contract: 'v3' });
doc.write('adapterSignal', { adapter: 'legacy->new', version: 'v2', aligned: true });

It sounds ceremonial, but it made code review and incident triage much calmer.

Hana Saito
Aug 23, 2022 · 04:35 PM

Counterpoint: signals can give a false sense of boundary purity.

We also kept a no-cross-boundary-imports rule, because runtime signals won't catch everything.

Camille Duarte
Aug 23, 2022 · 04:40 PM

Agree. I like signals for the runtime story and tooling rules for the static story.

The worst case is boundary exists in docs, but not in build or runtime.

Hana Saito
Aug 23, 2022 · 04:43 PM

Yep. You need both or the boundary will leak through a side door.

Keira Santos
Aug 23, 2022 · 04:48 PM

Deep links were the forcing function for us. If a boundary change breaks a deep link, the migration isn't done.

Theo Bennett
Aug 23, 2022 · 04:56 PM

We migrated file routes last, motion first.

Once component motion and route surfaces were stable, rewriting file route maps was mostly a mapping exercise with signals to catch drift.

Amina Farouk
Aug 23, 2022 · 05:10 PM

We had a monolith split that created two competing sources of truth for a while.

The only thing that made it survivable was alignment signals plus a clear delete criteria in the runbook.

Jules Kwon
Aug 23, 2022 · 05:21 PM

If the route contract includes contractVersion and the shell renders it, you can move boundaries without scaring everyone every deploy.

tsx
const doc = useRouteDoc('orders');
return (
  <div
    data-contract={doc.read('contractVersion')}
    data-boundary={doc.read('boundarySignal')?.owner ?? 'unknown'}
  />
);
Inez Park
Aug 23, 2022 · 05:36 PM

When boundaries are real, support can tell from a signal which system to page. When boundaries are fake, every incident is a guessing game.

Benji Rios
Aug 23, 2022 · 05:49 PM

A boundary that can't be asserted in tests isn't a boundary. Signals give you a cheap way to assert it without importing internals.