Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_code-reactive-state-stores

Reactive Client State Stores (Server Cache vs UI State Separation)

6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[![Reactive Client State Stores (Server Cache vs UI State Separation) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_code-reactive-state-stores/opengraph-image)](https://archos.sageideas.dev/d/dgm_code-reactive-state-stores)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_code-reactive-state-stores)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_code-reactive-state-stores" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Reactive Client State Stores (Server Cache vs UI State Separation) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0["UI Component"]
  n1_1[("Server State Cache")]
  n2a_2[("Local UI / Canvas Store")]
  n2b_3["Optimistic Mutator"]
  n3_4[("URL & Local Persistence")]
  downstream_5["Downstream & OTel"]
  client_0 -->|"1. Fetch/Sync · HTTP"| n1_1
  n1_1 -->|"2a. Select O · RAM"| n2a_2
  n1_1 -->|"2b. Optimistic · Patch"| n2b_3
  n2a_2 -->|"3a. Persist · IDB"| n3_4
  n2b_3 -->|"3b. Merge · RAM"| n3_4
  n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5

COMPONENT STACK (6)

  • UI ComponentSTATELESS
    Reads & Mutates State
  • Server State CacheSTATEFUL
    React Query / SWR dedup + SWR
  • Local UI / Canvas StoreSTATEFUL
    Zustand atomic selector slices
  • Optimistic MutatorSTATELESS
    Instant UI + rollback on 5xx
  • URL & Local PersistenceSTATEFUL
    Deep-linkable filters + IndexedDB
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (6)

  1. UI Component → Server State Cache (Fetch/Sync)[HTTP]
  2. Server State Cache → Local UI / Canvas Store (Select O)[RAM]
  3. Server State Cache → Optimistic Mutator (Optimistic)[Patch]
  4. Local UI / Canvas Store → URL & Local Persistence (Persist)[IDB]
  5. Optimistic Mutator → URL & Local Persistence (Merge)[RAM]
  6. URL & Local Persistence → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →