Skip to content
2 min

Package Overview

Understand the public Collaboration SDK packages for Core, History, Thread Comment, Worktree, and Office Exchange.

This page is a package selection map for the Collaboration SDK. Assemble Core Collaboration first, then add extension modules required by the product. You do not need to install every package.

Core Collaboration

Core Collaboration provides the main path for browser collaboration, server protocol handling, OT, revisions, and persistence.

RuntimePackagePrimary responsibility
Browser@univerjs-pro/collaborationRegisters foundational browser collaboration capabilities
Browser@univerjs-pro/collaboration-clientLoads Units, submits changesets, and maintains realtime synchronization
Browser@univerjs-pro/collaboration-client-uiProvides collaboration status UI and styles
Server@univerjs-pro/collaboration-transport-nodeReceives Node.js HTTP and WebSocket traffic
Server@univerjs-pro/collaboration-endpointImplements the Client protocol, Sessions, Rooms, and Presence
Server@univerjs-pro/collaboration-serviceManages Units, OT, revisions, and core Service APIs
Database@univerjs-pro/collaboration-database-memoryIn-process storage for tests, examples, and temporary development
Database@univerjs-pro/collaboration-database-sqliteSQLite persistence for development, testing, local, and small-scale use

A Core Server needs Transport, Endpoint, Service, and one Database Adapter. Memory and SQLite implement the same Adapter contract; applications normally select one.

History

History builds a version-history index from Core Unit creation and changeset commit Events.

RuntimePackagePrimary responsibility
BrowserReuses Core Client/UIDisplays and reads history entries
Server@univerjs-pro/collaboration-history-serviceBuilds and queries the history index
Server@univerjs-pro/collaboration-history-endpointProvides History protocol capabilities to the Client
Database@univerjs-pro/collaboration-history-database-sqliteStores the derived History index

History data is a rebuildable derived index. Core changesets remain authoritative for Unit content.

Thread Comment

Thread Comment manages comment bodies, replies, and solved state for Sheets and Docs.

RuntimePackagePrimary responsibility
BrowserReuses Core Collaboration packagesUses Comment Client and UI capabilities
Server@univerjs-pro/collaboration-comment-serviceManages comment operations and the commentCommitted Event
Server@univerjs-pro/collaboration-comment-endpointProvides the comment protocol and publishes updates through Unit Rooms
Database@univerjs-pro/collaboration-comment-database-memoryIn-process comment storage
Database@univerjs-pro/collaboration-comment-database-sqliteSQLite comment persistence

The Comment Adapter stores comment data. Anchors that move with content remain part of Core snapshots and changesets.

Worktree

Worktree provides isolated drafts, status transitions, and per-Unit merge.

RuntimePackagePrimary responsibility
Browser@univerjs-pro/collaboration-worktree-clientConnects Worktree draft, status, and merge capabilities
Server@univerjs-pro/collaboration-worktree-serviceManages draft changesets, status, and merge
Server@univerjs-pro/collaboration-worktree-endpointProvides protocol capabilities to Worktree Client
Database@univerjs-pro/collaboration-worktree-database-memoryIn-process Worktree storage
Database@univerjs-pro/collaboration-worktree-database-sqliteSQLite Worktree persistence

Worktree Service eventually merges into the trunk through Core Service, so Middleware must be configured for both Service boundaries.

Office Exchange

Office Exchange is an application workflow combining file conversion with Collaboration Service. It has no independent collaboration Database Adapter.

RuntimePackagePrimary responsibility
Browser@univerjs-pro/exchange-clientProvides foundational browser file-exchange capabilities
Browser@univerjs-pro/sheets-exchange-clientProvides Sheet file import and export
Server@univerjs-pro/exchange-nodeConverts Office files and Univer data in Node.js

For import, the application passes converted data to createUnitFromSnapshot(). For export, it reads a confirmed Unit revision through Core Service. Files, tasks, and business APIs remain under application control.

Selection rules

  1. Start with the Core packages from Quick Start.
  2. Select one Core Database Adapter from Memory, SQLite, or a custom implementation.
  3. Install only the extension-module packages used by the product.
  4. Create separate Adapters for each module even when they share one SQLite file.

See Collaboration extension modules for module relationships and the examples index for runnable assemblies.