Skip to content

Add the development backlog (CRDT, browser deployment, cloud sync) - #28

Open
Martin-PB wants to merge 3 commits into
mainfrom
docs/backlog
Open

Martin-PB wants to merge 3 commits into
mainfrom
docs/backlog

Conversation

@Martin-PB

@Martin-PB Martin-PB commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Intent

Martin-PB asked for a place to gather the project's coming work, and detailed the first three items: adopt a CRDT (Conflict-free Replicated Data Type) as the backing data model to open the road to real-time co-editing and asynchronous editing; deploy Cartocortex to the Complexus Lab showcase site so visitors run it fully locally, in the browser, with nothing sent to lab servers (the lab sees none of their data); and synchronize sheets with users' own cloud accounts (Google, Amazon S3, Azure / Microsoft Drive, and S3-compatible decentralized providers such as Hippius). More items will be detailed later and added to the same page.

He then detailed the missing link for real-time co-editing: how the edits travel between participants — an identifier to send across the network, firewall traversal, sessions during meetings and video calls, local-first, and as little central infrastructure as possible. This PR therefore also carries the transport study.

What was done

Three commits on one branch, two study/plan files:

  • docs/backlog.md — the living backlog document. Every entry records the intention and the research behind it, with a status (Proposed / Studied / In progress / Done). The three initial entries:
    • CRDT-backed document model — why CRDTs (deterministic merge of concurrent edits without a central coordinator, the foundation of offline-first sync), library candidates (Yjs and its Rust port Yrs, Automerge, Loro whose movable trees match mind map trees best), fit with the pure tree operations of model.ts, open questions (library choice, tombstones and compaction, persistence format and migration, undo/redo).
    • WebAssembly deployment and the lab showcase site — fully client-side in the visitor's browser, zero data to lab servers; what already helps (static vite build, isTauri guards), what it needs (browser file open/save via the File System Access API, OPFS/IndexedDB persistence, zero-network audit of the web build, showcase-site embedding), and when WebAssembly is actually needed (only to reuse Rust code from src-tauri in the browser, via a WASI shim to OPFS).
    • Cloud drive synchronization — the user's own drive instead of local files only: one S3-compatible client covers Amazon S3, Google Cloud Storage's S3 interoperability and Hippius (endpoint s3.hippius.com, region decentralized, AWS Signature V4, path-style); Google Drive, OneDrive and Azure Blob have their own APIs; credentials stay client-side; pairs with the CRDT item (snapshots and deltas in a bucket give asynchronous multi-device sync).
  • docs/realtime-collab-study.md — the real-time co-editing transport study (status "study only — specified, never executed"):
    • What travels: CRDT deltas, not documents — the sync protocols of Yjs, Automerge and Loro are transport-agnostic, so the transport does not constrain the library choice.
    • The identifier: one random room ID shared as a link, carried in the URL fragment (never sent to servers); an optional room password encrypts peer traffic and is the access control (CRDTs merge whatever arrives).
    • Transport: WebRTC peer-to-peer data channels — the document never passes through a server; mesh caps make it comfortable for meeting-sized sessions.
    • Discovery: interchangeable signaling servers that only broker the initial handshake and never see document data, used several at once (public list plus your own); the desktop app can go broker-less (Hyperswarm DHT, same-LAN discovery), browsers cannot join UDP DHTs.
    • Firewalls and NAT: ICE/STUN/TURN — symmetric NAT defeats STUN, roughly 10–20% of sessions need the TURN relay, TURN over TLS on port 443 for networks blocking UDP; TURN carries only ciphertext and is self-hostable (coturn).
    • Single points of failure: honest conclusion — a fully serverless browser rendezvous does not exist today; the design minimizes trust instead: interchangeable self-hostable brokers, self-hostable ciphertext-only relays runnable by any participant, no vendor-proprietary dependency, the lab runs nothing; asynchronous fallback = the user's own cloud bucket as the always-on peer.
    • The backlog's item 1 now points at the study.

What the agent did

  • Checked that the repository has no backlog yet (no file at the usual paths; no docs/ folder on main), so this PR creates it.
  • Researched before writing: CRDT theory and libraries, browser deployment of Tauri-style apps, S3-compatible cloud providers including Hippius's documented endpoint parameters; then Yjs/Automerge/Loro sync protocols, y-webrtc's architecture (multi-server signaling, room passwords, mesh caps), NAT traversal facts (STUN/TURN percentages, symmetric NAT, TURN on TLS 443), and serverless discovery options (Hyperswarm, WebTorrent).
  • Wrote everything in English and verified every push byte-by-byte against GitHub after each commit (zero mojibake, zero stray escapes).

Human checks

  • Review the three backlog entries and the transport study.
  • Decide the default signaling setup (public lists plus self-hosted, or public only).
  • Add the next items as they get detailed — this page is the landing place for them.
  • The operator reviews and merges.

Doc-only from main, one branch: no conflict with any other open PR; no README change (PR #7 owns the "Not yet" section).

Agent: Vibe (Mistral, glm-5-latest-short)
Reviewed-by: Martin-PB

Three items requested by Martin-PB, each backed by research: a CRDT-backed
document model as the foundation for later real-time co-editing and
asynchronous multi-device editing (candidates Yjs/Yrs, Automerge, Loro);
a fully client-side deployment so the Complexus Lab showcase site runs
Cartocortex in the visitor's browser with nothing sent to lab servers
(browser file dialogs, OPFS persistence, zero-network audit); and
synchronization with the user's own cloud accounts - Amazon S3, Google,
Microsoft OneDrive/Azure, and S3-compatible decentralized providers such
as Hippius. A living document: more items will be added as they are
detailed.

Agent: Vibe (Mistral, glm-5-latest-short)
Reviewed-by: Martin-PB
The first commit over-escaped the inline code spans, leaving a literal
backslash before every backtick pair in docs/backlog.md. Rewritten with
the correct code-span syntax; the prose is unchanged.

Agent: Vibe (Mistral, glm-5-latest-short)
Reviewed-by: Martin-PB
How several people edit the same map at once, local-first: the edits
travel as CRDT deltas (transport-agnostic in Yjs, Automerge and Loro),
participants share one random room id carried in a link (URL fragment,
never sent to a server; optional room password encrypts the peer
traffic), WebRTC data channels carry the document peer-to-peer,
interchangeable signaling servers broker only the initial handshake, and
ICE/STUN/TURN cross firewalls - roughly 10-20% of sessions need a TURN
relay, self-hostable like every other component, so the lab owns no
single point of failure. The desktop app can go broker-less (Hyperswarm
DHT, same-LAN discovery). Backlog item 1 now points at the study.

Agent: Vibe (Mistral, glm-5-latest-short)
Reviewed-by: Martin-PB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant