> ## Documentation Index
> Fetch the complete documentation index at: https://superdoc-nick-sd-2099-images-core-lifecycle-placement-seman.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Collaboration

Enable multiple users to edit the same document simultaneously with real-time collaboration powered by [Yjs](https://docs.yjs.dev/).

<iframe src={`https://superdoc-collab-example.pages.dev/doc/example?hide-toolbar=true`} title="Embedded content" className="w-full h-96 rounded-xl border border-gray-200" style={{ zoom: 0.7, height: "510px" }} />

## Choose your approach

<Tabs>
  <Tab title="Cloud Providers">
    No server to manage — get started in minutes.

    | Provider                                       | Best For                   | Pricing             |
    | ---------------------------------------------- | -------------------------- | ------------------- |
    | [Liveblocks](/guides/collaboration/liveblocks) | Quick start, any framework | Free tier available |
  </Tab>

  <Tab title="Self-Hosted">
    Full control over your data and infrastructure.

    | Option                                             | Best For                           |
    | -------------------------------------------------- | ---------------------------------- |
    | [SuperDoc Yjs](/guides/collaboration/superdoc-yjs) | Recommended — the official package |
    | [Hocuspocus](/guides/collaboration/hocuspocus)     | TipTap ecosystem users             |
  </Tab>
</Tabs>

## Quick start

Get collaboration working in 5 minutes with Liveblocks:

```bash theme={null}
npm install @liveblocks/client @liveblocks/yjs yjs
```

```javascript theme={null}
import { createClient } from "@liveblocks/client";
import { LiveblocksYjsProvider } from "@liveblocks/yjs";
import * as Y from "yjs";
import { SuperDoc } from "superdoc";

const client = createClient({ publicApiKey: "pk_..." });
const { room } = client.enterRoom("my-document");
const ydoc = new Y.Doc();
const provider = new LiveblocksYjsProvider(room, ydoc);

provider.on("sync", (synced) => {
  if (!synced) return;

  new SuperDoc({
    selector: "#editor",
    user: { name: "John", email: "john@example.com" },
    modules: {
      collaboration: { ydoc, provider },
    },
  });
});
```

See the [full quickstart guide](/modules/collaboration/quickstart) for framework-specific examples (React, Vue, Vanilla JS).

If you are also using the SDK for backend automation, see [SDK collaboration sessions](/document-engine/sdks#collaboration-sessions).
