yrby

Demos

Each demo syncs a different kind of Yjs document through the same Rails app. Five of them use one DocumentChannel. It saves every update with Y::Document, sends it to everyone in the room, and has no code for any particular demo. The Lexxy demo uses NoteChannel, a small subclass of lexxy-realtime's own channel for this site's public rooms. It creates each room's note when the first person joins, and the parent channel renders the note's body to HTML after each change. Every demo page has a panel that shows what Ruby reads from the saved state.

New to yrby? Start with the record-backed editor. It runs the quickstart code on a single record, with collaborative_document_tag and a CodeMirror editor.

Each demo opens in a new room with its own URL. Share the URL to edit together. Anyone with the link can edit the room. A room is deleted after 24 hours with no edits and nobody connected, so please don't paste anything private.