Documentation
Real-Time Collaboration

Real-Time Collaboration

Flokan's document editor supports real-time collaborative editing — multiple team members can work on the same document simultaneously, seeing each other's changes as they happen. This is powered by industry-standard technology that ensures no edits are ever lost, even when two people edit the same paragraph at the same time.

How It Works

When you open a document that supports collaboration, Flokan automatically establishes a real-time connection with other editors. There's nothing to configure — collaboration is built into the document editing experience.

How Synchronization Works

Flokan uses a multi-layer sync strategy for reliability:

  1. Real-time Broadcasting — Edits are broadcast immediately to all connected editors. This provides near-instant synchronization — you see other people's keystrokes as they type.

  2. Persistent Storage — Document updates are periodically saved to the database. This ensures that even if all editors disconnect, the document state is preserved and can be restored when someone reconnects.

  3. Automatic Conflict Resolution — Concurrent edits are handled automatically. If two people edit the same word at the same time, both changes are merged deterministically — no "save conflict" dialogs, no lost work.

Live Cursors & Presence

Presence Indicators

When other team members are viewing or editing the same document, you'll see:

  • Avatar Stack — A row of avatars in the top bar showing who's currently in the document. Each avatar shows the user's profile picture and name on hover.
  • Presence Count — A number indicating how many collaborators are currently connected.

Cursor Tracking

Each collaborator's cursor position is visible in the document in real-time. Cursors are color-coded by user, so you can see exactly where each person is working. This helps avoid editing conflicts and makes it easy to coordinate work on different sections of a document.

Cursor positions are broadcast to all connected collaborators in real time, so everyone can see where others are working.

Collaboration Features

Concurrent Editing

Multiple editors can type in different parts of the document simultaneously. Changes appear in real-time for all connected users. The collaboration engine ensures that all editors converge to the same document state, regardless of network latency or the order in which edits arrive.

Awareness

The collaboration system maintains awareness of each user's state:

  • Which document they're viewing
  • Where their cursor is positioned
  • Whether they're actively typing or idle
  • Their display name and avatar

Offline Resilience

If your connection drops temporarily:

  • Your local edits are preserved in the document
  • When the connection is restored, your changes are automatically synced with the server and other editors
  • No manual "reconnect" or "merge" is needed — everything is handled automatically

Audit Trail

All collaborative editing activity is logged automatically, providing a complete record of:

  • Who opened and edited the document
  • When editing sessions started and ended
  • The nature of changes made

This audit trail is separate from version history and is intended for compliance and accountability purposes.

Version History with Blame

Real-time collaboration integrates with the version history system:

  • Version snapshots capture the document state at that point in time
  • Blame view replays the edit history to attribute each change to the user who made it
  • Diff view compares any two versions with word-level granularity, showing insertions and deletions

This means you can always answer the question "who changed this and when?" — even in a heavily collaborative document with many editors.

When Collaboration is Active

Collaboration is available on documents in Storage that have been created or opened through the Flokan document editor. The collaboration features are automatically enabled — there's no toggle or setting to turn on. If multiple people open the same document, they'll see each other's presence and edits immediately.

⚠️

When collaboration is active, the editor's local undo/redo history is disabled to ensure consistency across all collaborators. Instead, use version history to review and revert changes if needed.