Why Every System Needs a Center of Truth
Hatched by tfc
Jul 11, 2026
10 min read
3 views
92%
The hidden problem behind almost every broken system
What do a tangled user interface and a messy software domain have in common? At first glance, almost nothing. One lives in the browser, where buttons and forms fight for coherence. The other lives in the architecture of business rules, where entities and boundaries decide what may change, and who is allowed to change it. Yet both are trying to solve the same problem: how to stop meaning from splintering.
The deeper issue is not merely where data lives. It is where truth lives. Whenever the same fact can be changed in two or more places, systems begin to drift. A checkbox says one thing, a parent component says another, and a database record quietly implies a third. The result is not just technical inconsistency. It is cognitive inconsistency, the kind that makes a system hard to trust, hard to reason about, and hard to evolve.
The most powerful idea connecting front end state management and domain boundaries is this: every coherent system needs a center of truth, and every object or component should speak truth only through that center.
Truth cannot be shared casually
In user interfaces, state duplication feels convenient until it becomes dangerous. Imagine two sibling components, each holding its own copy of whether a panel is open. One closes while the other stays open. The interface no longer expresses a single reality. The fix is not to patch symptoms. It is to lift the state up to the nearest common parent, make that parent the owner, and let the children receive the same truth through props.
That pattern is deceptively simple, but its significance is broader than UI. It says something fundamental about coordination: if two things must always agree, they cannot each be authoritative. There must be one place where the decision lives.
Domain-driven design reaches the same conclusion from a different direction. An Aggregate is a cluster of associated objects treated as a unit for data changes. It has a root and a boundary. The root is the only object outside the boundary allowed to be referenced directly. Everything inside the boundary may collaborate, but the outside world must go through the root.
At first, this sounds like an architectural rule. In practice, it is a governance rule for truth. The Aggregate Root says: if the outside world wants to change something inside, it must do so through one accountable point. This prevents hidden mutations, conflicting updates, and accidental violations of invariants.
The real job of architecture is not to store data. It is to protect coherence.
This is why the two ideas resonate so strongly. Lifting state up in a component tree and enforcing an Aggregate Root in a domain model are both answers to the same question: who gets to say what is true?
Why duplication feels productive until it becomes expensive
Humans like duplication because it feels local. A component can keep its own state and move fast. An entity can expose its own fields and appear flexible. But local convenience creates global fragility.
Consider a booking system. A calendar widget stores selected dates. A sidebar stores the same dates so it can show a summary. A pricing component also stores them so it can compute costs. At first, this seems fine. Then the user changes one date. One component updates instantly. Another lags. A third recomputes from stale input. The system is now technically functional but semantically broken.
The same pattern appears in the domain layer. Suppose an Order contains Line Items, a total price, a discount, and a shipping rule. If external code can mutate line items directly, the order total may no longer reflect the true sum. If different parts of the code update discounts independently, business rules become accidental rather than enforced. The invariant is no longer protected by the model. It is merely hoped for.
This is the hidden cost of duplication: every extra place where truth is stored is also another place where truth can diverge. That divergence is expensive because it is often invisible at first. Bugs are not introduced as loud failures. They begin as subtle disagreements between parts that were supposed to cooperate.
A useful mental model is this:
- State duplication creates the illusion of flexibility.
- State ownership creates the reality of reliability.
The more critical the invariant, the less tolerant the system should be of multiple sources of truth.
The boundary is not a wall, it is a contract
People sometimes misunderstand boundaries as rigid isolation. But in both component design and domain modeling, the point is not to shut everything off. The point is to make interaction deliberate.
A parent component does not hoard state because it distrusts its children. It owns state because it can coordinate children consistently. The children are still free to render, react, and emit intent. They just do not become competing authorities.
Likewise, an Aggregate does not mean every object is trapped inside a bunker. It means the root mediates access so that all changes obey the same rules. Objects inside the boundary can still collaborate richly. They can maintain local identities, hold references to each other, and evolve together. But the outside world must not bypass the root and make ad hoc changes.
This distinction matters because boundaries are often mistaken for limitations. In reality, they are what make complexity manageable. A boundary says: within here, there is one coherent story. Outside this boundary, you may observe or request change, but you may not fracture the story.
Think of a restaurant kitchen. The chef does not want every diner wandering in and adjusting the seasoning of individual pans. That would be chaos. But the kitchen is not isolated from the dining room. Orders come in, meals go out, feedback returns. The boundary exists to preserve the integrity of the meal, not to prevent service.
The same logic applies to software. The boundary is a contract for consistency, not a moat for control.
The best abstractions are political, not just technical
There is a subtle political dimension to both ideas. To “own” state is to assign authority. To make something an Aggregate Root is to choose a representative. These are governance decisions disguised as design patterns.
Every system has to decide what counts as legitimate change. Without that decision, power gets distributed implicitly, which usually means chaotically. In a UI, any child component that can directly mutate shared state becomes a rival legislature. In a domain model, any entity that can be changed independently becomes a competing policy center.
This is why coherent systems often have a single place where updates are allowed, but many places where information is displayed or proposed. The owner is not the most important participant. It is the most accountable one.
A helpful analogy is a city. Residents can request road repairs, but they do not each repaint traffic lines on their own block. The road authority centralizes the truth about infrastructure because consistency matters more than local freedom. That does not make the city less alive. It makes it navigable.
The lesson is not that everything should be centralized. It is that the narrower the set of things that must remain consistent, the more important it is to centralize their authority. For purely local concerns, decentralization is healthy. For shared invariants, fragmentation is dangerous.
So the real skill is not choosing between centralization and distribution in the abstract. It is identifying which facts are sacred. Those facts deserve a single source of truth.
A practical framework: decide what must never disagree
One way to apply these ideas is to stop asking, “Where should I put this data?” and instead ask, “What must never disagree?” That question quickly reveals the right structure.
If two pieces of information can diverge without harming meaning, they can live separately. But if divergence would create inconsistency, they need one authority. This is true whether you are designing a component tree, a form, or a business object.
Use this checklist:
-
Is this value an invariant? If it must always be true, it needs protection.
-
Will multiple views depend on the same fact? If yes, do not let each view maintain its own copy.
-
Can this state be changed from more than one direction? If yes, you need a coordinator.
-
Would a stale copy cause a user-visible contradiction or a business-rule violation? If yes, duplication is too risky.
-
What is the smallest boundary that can still enforce consistency? The answer is usually not the entire application. It is the nearest coherent unit.
This is where the two worlds align most beautifully. In React, the nearest common parent is often the right owner because it is the smallest place that can coordinate the children. In domain modeling, the Aggregate Root is the smallest boundary that can enforce the invariant across related entities. In both cases, the guiding principle is locality of control paired with clarity of truth.
A good boundary is the smallest place where disagreement becomes impossible.
The art of designing for coherence
Once you see systems this way, a lot of design choices become easier. You start noticing that many “performance” problems are really coherence problems. Many “maintainability” issues are really truth management problems. Many “architecture” debates are just arguments about where authority should live.
For example, it is tempting to let each child component manage a form field locally because it reduces prop drilling. But if the fields must be validated together, submitted together, or reset together, separate ownership becomes a liability. The parent should own the form state, even if that means a bit more coordination overhead.
Likewise, it is tempting to let every entity expose direct setters because it makes object manipulation feel natural. But if a rule says an order cannot be submitted unless all items are valid, then the order itself should be the only place where submission state changes. External code should request the change, not perform it blindly.
This is the deeper pattern: coherence is worth more than convenience when the cost of disagreement is high.
That does not mean centralization should be maximal. Over-centralizing everything makes systems brittle and chatty. But under-centralizing truth makes them contradictory. The skill is to find the level where coordination is just strong enough to preserve the invariant and no stronger.
This is one reason mature systems often feel less magical than immature ones. They have fewer hidden copies of truth. They make fewer assumptions. They place responsibility where it can be inspected. They prefer explicit coordination over accidental alignment.
And that is exactly why they scale better, not just in code size but in human trust.
Key Takeaways
- Ask where truth lives, not just where data lives. If a fact matters across multiple parts of a system, give it one owner.
- Use the smallest boundary that can preserve consistency. In UI, that may be the nearest common parent. In domain modeling, it may be the Aggregate Root.
- Treat duplication as a risk signal. Multiple copies of the same fact are fine only when disagreement does not matter.
- Design boundaries as contracts, not cages. Their purpose is to coordinate change, not eliminate collaboration.
- Protect invariants more carefully than convenience. The more important the rule, the less tolerant you should be of independent mutation.
Conclusion: coherence is the real architecture
The most important thing shared by component state and domain aggregates is not structure. It is discipline. Both teach the same lesson in different languages: if a system depends on agreement, it must appoint an authority.
That authority may be a parent component, an Aggregate Root, or some other carefully chosen center. But the principle remains: truth should be singular where consistency matters. Everything else can be distributed around it.
Once you start seeing software this way, architecture stops being a set of patterns and becomes a question of epistemology. Who knows what? Who may change what? And what must never disagree?
If you can answer those questions clearly, your code becomes easier to trust. More importantly, your system becomes something humans can understand as one story, not many conflicting versions of the same one.
Sources
Hatch New Ideas with Glasp AI 🐣
Glasp AI allows you to hatch new ideas based on your curated content. Let's curate and create with Glasp AI :)
Start Hatching 🐣