Minimal React + Zustand example that mirrors state to a Loro CRDT via @sqlrooms/crdt and syncs against sqlrooms-server with CRDT enabled.
cd python/sqlrooms-server
uv run sqlrooms-server --db-path main.db --crdt-db crdt.db --port 4000cd examples/sync
pnpm install
pnpm devOpen two tabs at http://localhost:4173 to see live sync. State persists locally via localStorage and on the server via --crdt-db.
Environment overrides (optional):
VITE_SYNC_WS_URL(defaultws://localhost:4000)VITE_SYNC_ROOM_ID(defaultdemo-room)
Minimal example that wires @sqlrooms/crdt into a vanilla Zustand store and syncs through the sqlrooms-sync WebSocket server.
cd python/sqlrooms-sync
uv run python -m pkg.server # listens on ws://localhost:4800cd examples/sync
pnpm install
pnpm build
pnpm devYou should see console logs of the mirrored state. Start a second process to observe updates flowing through the server. State is persisted locally via createLocalStorageDocStorage.