Persistent graph — log → state survives reload
The substrate property: a graph is a function of its mutation log.
Append AddNode and AddEdge rows to a log,
store the log anywhere — localStorage here, JouleDB on the server,
a flat file on disk — and the graph is bit-for-bit recoverable.
This page hosts the log in your browser's localStorage; reload at
any time and the state hash should match. Reload it in another
tab — same log in → same hash out.
Add an edge
State, replayed from log
- state hash
- —
- nodes
- —
- edges
- —
- log mutations
- —
The state hash is FNV-1a-64 over the canonical JSON serialization of the replayed Graph. Same log → same hash. Reload this page and watch the hash hold.
Live edges
Mutation log (the source of truth)
[]
This is what lives in localStorage. Persist it via
JouleDB on the server / a flat file on disk / a network log
— the graph rebuilds deterministically from it. mgai-graph's
from_log is the in-substrate replay.