MeridiansMeridians

2. Sources of truth — the exact words

Source path: knowledge-base/knowledge/architecture/overview/authority.md

# 2. Sources of truth — the exact words

Two orthogonal axes. Don't conflate them.

**Axis A — which STORE is authoritative** (record vs cache): §1, Idea 3. The **record** (fs) is
canon; **IndexedDB** is its projection.

**Axis B — which INSTANCE is authoritative** (master vs client): decided by **origin**, once per
session (`getSyncRole`, `src/lib/server/sync/role.ts`).

| Instance role | Who | Authority |
|---|---|---|
| **master** | localhost / Electron / the canonical web app | **Sovereign owner** of its own record. The single source of truth for its world. Validates credentials, holds keys, hosts the broker. |
| **client** | a **tunnel** origin (someone who joined a host) | Renders from synced state, pushes optimistic edits up to the master, never holds credentials. |

So the full phrase "the master's record" = *the authoritative instance's canonical on-disk store*.
A client has neither — it's a live view of the master's, reached over an ngrok tunnel.

> **Terminology note:** historical prose sometimes said the Director's **browser** was the SSOT and
> called a client a "clone." Post-daemon (E1), the precise statement is: **the record is canon; the
> master daemon owns it; the browser is one caller.** "clone" is retired for the role — say
> **client**. ([PERSISTENCE.md](../PERSISTENCE.md) is the store-linkage + replication deep-dive and follows this framing.)

---
Open on GitHub

Raw Markdown source