Skip to content

Real-Time Updates

Deckyard uses two connections for live updates: Server-Sent Events (SSE) for presentation and saved-editor updates, and an optional WebSocket for editor presence and live edits.

Starting a presentation creates or resumes a live session. Deckyard returns a session ID, a companion join path, and follow codes for the deck’s available languages. A live session expires after about 24 hours without activity. Follow codes have their own expiry and can be refreshed when a session resumes.

Audience clients can subscribe to GET /api/live-sessions/{sessionId}/events. The session ID acts as the access key for that stream; share its join link only with people who should follow the presentation. The server sends the current state and controlEnabled values when a client connects. Later events include slide state, control changes, deckUpdated, branch, and interactionState for live polls and other interactions. An SSE heartbeat comment is sent every 15 seconds.

The presenter creates or resumes a session with POST /api/live-sessions and { "presentationId": "..." }. Pushing slide state and changing presentation control require write access to the deck. Followers use the session ID to read the stream. Session broadcasts reach SSE clients connected to the same server process; a multi-process installation needs broadcast coordination.

Saved changes from another editor reach the editor through SSE. In the default mode, Deckyard uses slide locks and merges saved changes on different slides. Comments and lock changes also update through the editor’s live connection.

With COLLAB_ENABLED=true, the editor additionally connects to the /collab Yjs WebSocket for presence: avatars, the slide a collaborator is viewing, and field focus. Presence is disabled by default. With both COLLAB_ENABLED=true and COLLAB_LIVE_EDITS=true, the WebSocket also carries edits as people type; this mode is experimental and does not use slide locks.

For lock behavior, connection recovery, and editing conflicts, see Real-time Editing.