Collaboration SDK overview

Understand what the Univer Collaboration SDK solves, how its modules compose, its extension points, and the product boundaries your application retains.

The Univer Collaboration SDK is a server-side SDK for the Univer document model. It handles operational transformation (OT1), revisions2, snapshots, realtime synchronization, and persistence, so that multiple Univer clients can edit the same authoritative Unit.

Applications embed the SDK in their Node.js services. Identity and authorization connect through Middleware, and logging and other application logic attach to Middleware or Events. A separate Database Adapter connects collaboration data to the application's database.

It is not a complete document product

The SDK provides only the collaboration core. Users, roles, hierarchy, sharing, file spaces, and business workflows are outside its scope, and the application still owns those product capabilities and their data models.

What it solves

The Web SDK displays and edits Sheet, Doc, Slide, Board, Base, and PDF content in the browser. Realtime multi-user editing requires a server-side authority on top of the Web SDK. That authority loads content, confirms concurrent changes, advances revisions, and lets a disconnected client recover to a consistent state.

It fits applications that:

  • already use Univer to build an editor and want realtime multi-user editing;
  • want to host collaboration data themselves and choose their own database;
  • need to connect existing identity, authorization, or tenant rules to collaboration operations;
  • need History, Thread Comment, Worktree, file storage, or Office import and export on top of core collaboration.

One complete collaboration service

100%
ModulePrimary responsibility
Collaboration ClientLoads Units, submits changesets, and keeps the browser's collaboration state current
Node TransportReceives HTTP/WebSocket traffic and runs the application's entry Middleware
UniverCollabEndpointImplements the client protocol, Sessions, Rooms, Presence, ACKs, and broadcasts
UniverCollabServiceManages the Unit lifecycle, performs OT, and confirms continuous revisions
Database AdapterStores snapshots, changesets, revisions, and submission idempotency state atomically

What the SDK provides

Core capabilities include:

  • creating, loading, deleting, and recovering Units for Sheet, Doc, Slide, Board, Base, and PDF;
  • snapshots, changesets, revisions, OT, and submission idempotency;
  • HTTP content loading, along with WebSocket Sessions, Rooms, Presence, ACKs, and broadcasts;
  • Middleware at the Transport, Endpoint, and Service boundaries;
  • process-local Events for Unit creation, changeset commits, deletion, and recovery;
  • storage for collaboration data through a built-in or custom Database Adapter;
  • horizontal scaling through multi-node deployment: nodes cooperate through a pub/sub adapter and a shared Session Ticket store, and the SDK provides a Redis implementation.

Once the core path is in place, applications can add version history, Thread Comments, Worktree drafts, file storage, and server-side Office import and export. Each of those capabilities has its own Services, Middleware, Events, or Database Adapters.

What the application owns

Collaboration SDKApplication
Unit collaboration stateUsers, tenants, hierarchy, and sharing relationships
OT, revisions, and snapshotsLogin, Sessions, and identity mapping
Collaboration Sessions, Rooms, and PresenceRoles, ACLs, and product policy
Collaboration and File Database AdaptersProduct databases and storage operations
Middleware and Event extension pointsLogging, audit, metrics, and external integrations
Client protocol EndpointsBusiness APIs and workflows such as document creation

Three general extension points

Extension pointProblems it solves
MiddlewareInspects or enriches Context, rejects a request, or records what happened while an operation runs
EventObserves confirmed state changes to update in-process derived state or start non-critical follow-up work
Database AdapterSelects where data lives and implements the atomicity, CAS, and idempotency contracts

Identity and authorization connect through Middleware. Middleware validates and restricts an operation before it runs, and Events record changes or trigger follow-up work once state is confirmed. Either can carry logging, request tracing, metrics, and derived-state updates. Middleware and Events explains where each one runs.

Where to start

  1. Run the quick start and check the full path in two browsers.
  2. Read Module boundaries and relationships to understand why each package exists.
  3. Choose Middleware and Events, Identity and authorization, or Database Adapters for the integration task at hand.
  4. Go to Collaboration extension modules for History, Comments, Worktrees, file storage, and import and export.

Footnotes

  1. Operational transformation (OT) adjusts operations created concurrently against different document revisions so they can be applied consistently. It operates on edits, rather than replacing the whole document with whichever snapshot arrives last. ↩

  2. A revision identifies a position in a Unit’s confirmed edit history. A changeset contains the operations in a submission; its confirmation advances that history. A revision is not an SDK package version or a timestamp. ↩

How is this guide?

© 2026 DreamNum Co., Ltd.