# Collaboration

- Human documentation: [https://docs.univer.ai/guides/bases/features/collaboration](https://docs.univer.ai/guides/bases/features/collaboration)

- Agent Markdown: [https://docs.univer.ai/guides/bases/features/collaboration.md](https://docs.univer.ai/guides/bases/features/collaboration.md)

- Requested language: `en-US`

- Content language: `en-US`

- Documentation version: `1.0.0-rc.0`

- Source: [bases/features/collaboration.mdx](https://github.com/dream-num/documentation/blob/dev/content/guides/bases/features/collaboration.mdx)

---

#### Package metadata

```json
{
  "preset": [],
  "plugins": [
    {
      "client": "@univerjs-pro/collaboration"
    },
    {
      "client": "@univerjs-pro/collaboration-client",
      "facade": "@univerjs-pro/collaboration-client/facade",
      "locale": "@univerjs-pro/collaboration-client/locale/en-US"
    },
    {
      "client": "@univerjs-pro/collaboration-client-ui",
      "facade": "@univerjs-pro/collaboration-client-ui/facade",
      "locale": "@univerjs-pro/collaboration-client-ui/locale/en-US",
      "style": "@univerjs-pro/collaboration-client-ui/lib/index.css"
    }
  ],
  "server": true
}
```

Let users open the same Base and edit tables, fields, records, and views together. They can work in different views while changing the same document.

## Integration steps

1. Follow [Collaboration integration](https://docs.univer.ai/server/collaboration/browser-integration.md) to run the collaboration example and connect login, permissions, and database storage.
2. Add Collaboration Client configuration to your existing Bases editor. Follow [Office Quick Start](https://docs.univer.ai/server/collaboration/quick-start.md) for browser setup, but create and store Bases documents instead of copying the example's Sheets data.
3. Create the Base through your application backend and return its ID to the browser.

## Open a server Base

```ts
import '@univerjs-pro/bases/facade'
import '@univerjs-pro/collaboration-client/facade'

const base = await univerAPI.getCollaboration().loadBaseAsync('your-base-id')
if (!base) throw new Error('Base could not be loaded')
```

Reuse the ID when reopening or sharing the document. Do not replace server loading with `createBase()` and a new local blank document.

## Verify synchronization and saving

Open the same ID in two independent browser sessions. Add a record or change a field in one and confirm the other receives it. Check that edits survive refresh and server restart.

Authorize viewers and unauthorized users on the server. [Local read-only settings](https://docs.univer.ai/guides/bases/features/core/permissions.md) only control editor behavior. Exchange, comments, and history need their respective backend features; see [Import and export](https://docs.univer.ai/guides/bases/features/import-export.md), [Comments](https://docs.univer.ai/guides/bases/features/thread-comment.md), and [history](https://docs.univer.ai/guides/bases/features/edit-history.md).
