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

Auto-creates a node of kind concept for each label if it isn't present. Each click appends one AddEdge mutation (and up to two AddNode) to the log.

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

empty graph — add an edge above to get started.

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.