Package Overview

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

This page explains how to select packages from the Collaboration SDK. Start with Core Collaboration, then add the extension modules that the product requires. Installing every package is not necessary.

The server packages for Database Adapters, File, and Office Exchange are open source under Apache-2.0, and their source code is published in univer-collaboration-sdk-community. These packages use the same package prefix and version as every other package, and they are installed in the same way.

Core collaboration

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

RuntimePackageWhat it does
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
Database@univerjs-pro/collaboration-database-postgresPostgreSQL persistence shared by several nodes
Database@univerjs-pro/collaboration-database-postgres-s3Stores Sheet blocks in S3 to reduce PostgreSQL database and backup size
Multi-node@univerjs-pro/collaboration-cluster-redisRedis pub/sub adapter and session ticket store for multi-node deployment

A Core Server requires Transport, Endpoint, Service, and one Database Adapter. Memory, SQLite, PostgreSQL, and PostgreSQL + S3 implement the same Adapter contract, so an application normally selects one of them. A multi-node deployment additionally requires a pub/sub adapter and a shared session ticket store. The Endpoint defines both contracts (IPubSubAdapter, ISessionTicketStore), and the SDK provides a Redis implementation.

History

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

RuntimePackageWhat it does
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-memoryIn-process storage for the History index
Database@univerjs-pro/collaboration-history-database-sqliteSQLite persistence for the History index
Database@univerjs-pro/collaboration-history-database-postgresStores the History index in PostgreSQL

History data is a derived index and can always be rebuilt. Core changesets remain authoritative for Unit content.

Thread Comment

Thread Comment manages comment bodies, replies, and resolution status.

RuntimePackageWhat it does
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
Database@univerjs-pro/collaboration-comment-database-postgresStores comments and replies in PostgreSQL

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.

RuntimePackageWhat it does
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
Database@univerjs-pro/collaboration-worktree-database-postgresPersists Worktree drafts in PostgreSQL

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

File

File stores the binary files that Univer clients upload: images and attachments inserted into a Unit, together with the source and result files of an import or export. Unit data records only the file ID.

RuntimePackageWhat it does
BrowserReuses the Core Collaboration ClientUploads images and attachments and resolves file IDs to URLs
Server@univerjs-pro/collaboration-file-serviceApplies ownership rules, Middleware, and temporary-file cleanup
Server@univerjs-pro/collaboration-file-endpointProvides the upload, sign-url, and download routes
Database@univerjs-pro/collaboration-file-memoryIn-process storage for metadata and content
Database@univerjs-pro/collaboration-file-database-sqliteSQLite persistence for file metadata
Database@univerjs-pro/collaboration-file-database-postgresPostgreSQL persistence for file metadata
Storage@univerjs-pro/collaboration-file-blob-localStores file content in a local directory
Storage@univerjs-pro/collaboration-file-blob-s3Stores file content in S3-compatible object storage, with signed direct links

Metadata and content are two independent contracts, so each can use the storage that the application already provides. Metadata can reside in the database while content resides in object storage.

Office Exchange

Office Exchange imports Office files into collaborative Units and exports Units as files. File stores the source and result files.

RuntimePackageWhat it does
Browser@univerjs-pro/exchange-clientProvides foundational browser file-exchange capabilities
Browser@univerjs-pro/sheets-exchange-clientProvides Sheet file import and export
Server@univerjs-pro/collaboration-exchange-serviceManages import and export tasks, Middleware, and Unit creation and reads
Server@univerjs-pro/collaboration-exchange-endpointProvides the import, export, and task routes
Server@univerjs-pro/exchange-nodeConverts Office files and Univer data in Node.js

Exchange Service creates and reads Units through Core Service and reads and writes files through File Service, so it must be assembled together with Core and File.

Selection rules

  1. Start with the Core packages from Quick Start.
  2. Choose one Core Database Adapter for the application.
  3. For a multi-node deployment, add the Redis pub/sub adapter and session ticket store.
  4. Install only the extension-module packages that the product uses.
  5. If the product requires images, attachments, or import and export, assemble File first and add Office Exchange only when it is needed.
  6. Create a separate Adapter for each module even when several modules share one database.

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

How is this guide?

© 2026 DreamNum Co., Ltd.