Skip to content

Add Hocuspocus and Yjs collaborative notes example - #470

Draft
sdairs wants to merge 2 commits into
mainfrom
codex/collaborative-notes
Draft

sdairs wants to merge 2 commits into
mainfrom
codex/collaborative-notes

Conversation

@sdairs

@sdairs sdairs commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Two editors can share three plain-text notes, make concurrent insertions/deletions and reconnect after offline edits. Hocuspocus/Yjs synchronize the original CRDT state; a row-locked PostgreSQL binary merge preserves history when snapshots arrive late or repeat. The UI distinguishes peer synchronization from an actual post-commit snapshot receipt and reports storage failure honestly.

Includes a React/CodeMirror client, restricted owner/runtime grants, explicit CA/name verification, Origin/token/document controls, bounded protocol/state/SQL work, reproducible setup and a scoped build/unit workflow. Single trusted local workspace and one server process; no per-user accounts or horizontal live coordination.

Validation: native Linux ARM64 clean locked install, production build, three unit tests and formatting pass; six real Cloud storage/role/TLS controls pass, including competing row locks and deferred COMMIT rollback. Two separate Chromium processes converge through concurrent edits, deletion and offline/reconnect. Actual delayed/failed storage preserves prior committed data and reports its status; a later successful edit recovers. The original process exits before replacement, which loads exact committed binary/revision/time and fresh-browser text. WebSocket origin, token, document and payload negatives pass. Reviewed disposable Cloud fixture deleted; VM preserved. Companion article remains local for publication review.

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