Skip to content

Full separation between domains

Every domain is a standalone app with its own backend, frontend, and tests — runnable alone, with no cross-domain shell.

nx-isolation-full-separation

Why it matters

Failure modes if this rule is ignored
StakeIf ignored
Spreads failure
  • Fix one domain bug — boot every app and lib because nothing is isolated.
  • Workspace widget throws — catalog screen goes blank because everything shares one shell.
Blind in prod
  • Failure spans domains — no boundary to assign, two teams ping-pong the incident.
Hard to change
  • Shared libs become merge bottlenecks — every feature waits on the same conflict queue.

How to fix

Every domain is a standalone app: own backend, own frontend, runnable alone. The test: I want to work on catalog — I bring up that app alone, open the browser, and work. No workspace, no workflow builder, nothing else.

Verification: nx serve catalog runs with zero connection to workspace. nx graph shows islands, not a pile.

Examples

Bad
text
/apps
  monolith/                 # one giant app
/libs
  shared/
    components/
    services/
Good
text
/apps
  catalog/
  workspace/
  account/
/libs
  catalog/
    feature-item-list/
    feature-item-create/
    data-access/
    ui/
  workspace/
    feature-workflow-builder/
    data-access/
    ui/
  shared/
    ui-kit/                 # only truly shared
    util-types/

Contribute

Released under the MIT License.

esc