Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions content/configuration/realtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@ Read more about different authentication methods with Directus Realtime.
Read more about different authentication methods with Directus Realtime.
::

## Collaborative Editing

::callout{icon="material-symbols:info-outline"}
Multi-instance collaboration requires a shared Redis instance for coordination.
::

| Variable | Description | Default Value |
| :--------------------------------------------- | :------------------------------------------------------------------------------------- | :------------ |
| `WEBSOCKETS_COLLAB_ENABLED` | Toggle collaborative editing functionality specifically (when WebSockets are enabled). | `true` |
| `WEBSOCKETS_COLLAB_INSTANCE_TIMEOUT` | Duration in milliseconds before a silent node is considered dead. | `10000` |
| `WEBSOCKETS_COLLAB_CLUSTER_CLEANUP_CRON` | Cron expression for how often to garbage-collect empty rooms. | `*/1 * * * *` |
| `WEBSOCKETS_COLLAB_LOCAL_CLEANUP_INTERVAL` | Duration in milliseconds between local cleanup sweeps. | `60000` |
| `WEBSOCKETS_COLLAB_PERMISSIONS_CACHE_CAPACITY` | LRU cache size for permission checks. | `2000` |
| `WEBSOCKETS_COLLAB_STORE_NAMESPACE` | The namespace used for Redis storage. | `collab` |

## Logging

Read more about logging with Directus Realtime in the [logging configuration](/configuration/logging).
39 changes: 26 additions & 13 deletions content/guides/02.content/9.collaborative-editing/0.index.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: Collaborative Editing
description: The Directus Collaborative Editing extension enables real-time data synchronization and collaborative editing across collections, allowing multiple users to edit content simultaneously without conflicts.
description: Directus Collaborative Editing enables real-time data synchronization and collaborative editing across collections, allowing multiple users to edit content simultaneously without conflicts.
---

![Collaborative editing thumbnail](/img/collaborative-post.png)

The Collaborative Editing extension transforms your Directus project into a real-time collaborative platform where multiple users can edit content simultaneously. This extension provides conflict-free collaborative editing through smart field locking, user awareness indicators, and instant synchronization across all connected clients.
Collaborative Editing transforms your Directus project into a real-time collaborative platform where multiple users can edit content simultaneously. This feature provides conflict-free collaborative editing through smart field locking, user awareness indicators, and instant synchronization across all connected clients.

This documentation covers everything you need to know about implementing, using, and developing with collaborative editing in your Directus projects.
This documentation covers everything you need to know about configuring, using, and developing with collaborative editing in your Directus projects.

## Overview Video

Expand All @@ -19,11 +19,11 @@ This documentation covers everything you need to know about implementing, using,
- **Smart Field Locking** - Automatic conflict prevention through field-level locking
- **User Awareness** - Visual indicators show who's editing what in real-time
- **Universal Support** - Works across collections, file library, user directory, and relationships
- **Flexible Configuration** - Deploy globally or selectively per collection
- **Flexible Configuration** - Deploy globally across your project

## How It Works

The Collaborative Editing extension provides a sophisticated real-time collaboration experience:
Collaborative Editing provides a sophisticated real-time collaboration experience:

| Feature | Traditional Way | Collaborative Editing |
|---------|-------------------|----------------------|
Expand All @@ -35,25 +35,38 @@ The Collaborative Editing extension provides a sophisticated real-time collabora

## Getting Started

Follow these guides to implement collaborative editing in your Directus project:
Follow these guides to set up collaborative editing in your Directus project:

1. **[Installation & Configuration](/guides/content/collaborative-editing/installation)** - Install the extension and configure settings
2. **[Usage Guide](/guides/content/collaborative-editing/usage)** - Learn the basics of collaborative editing
3. **[Development & Custom Extensions](/guides/content/collaborative-editing/development)** - Integrate with custom interfaces
::callout{icon="material-symbols:settings-suggest-rounded" color="primary" to="/guides/content/collaborative-editing/configuration"}
**Configuration**
Configure settings and environment variables.
::

::callout{icon="material-symbols:menu-book-outline" color="secondary" to="/guides/content/collaborative-editing/usage"}
**Usage Guide**
Learn the basics of collaborative editing.
::

::callout{icon="material-symbols:code-blocks-rounded" color="green" to="/guides/content/collaborative-editing/development"}
**Development & Custom Extensions**
Integrate with custom interfaces.
::

## Requirements

- **Directus 11.8.0 or higher**
- **Directus 11.15.0 or higher**
- **[WebSockets enabled](/configuration/realtime)** in your Directus configuration
- **[Marketplace trust settings](/configuration/extensions#marketplace)** configured for non-sandboxed extensions (if installing through Marketplace)

## Technology Overview

The extension uses Y.js CRDT technology for conflict-free collaborative editing and WebSocket communication for real-time synchronization. All collaborative actions respect Directus user permissions and access controls.
The feature uses a custom WebSocket implementation for real-time synchronization and smart field locking to prevent conflicts. All collaborative actions respect Directus user permissions and access controls.


## Next Steps

Ready to enable collaborative editing? Start with the [Installation & Configuration](/guides/content/collaborative-editing/installation) guide to get up and running, then explore the [Usage Guide](/guides/content/collaborative-editing/usage) for daily workflows.
::callout{icon="material-symbols:arrow-forward-rounded" color="primary" to="/guides/content/collaborative-editing/configuration"}
**Ready to get started?**
Start with the Configuration guide to get up and running.
::

Transform your Directus project into a collaborative workspace where teams can work together seamlessly on content creation and management.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: Configuration
description: Learn how to configure the Collaborative Editing feature in your Directus project.
---

This guide covers the configuration settings for the Collaborative Editing feature.

## Configuration

::callout{icon="material-symbols:info-outline"}
**Enabled by Default**
Collaborative Editing is automatically enabled when WebSockets are active. For detailed configuration options and environment variables, please refer to the [Collaborative Editing Configuration](/configuration/realtime#collaborative-editing) documentation.
::

## Verification

To verify that collaborative editing is working correctly:

1. **Verify WebSockets**: Ensure your Directus instance has WebSockets enabled (`WEBSOCKETS_ENABLED=true`).
2. **Verify Project Settings**: Ensure your Directus instance has Collaborative Editing enabled in Project Settings.
3. **Test Collaboration**: Open any collection item and look for the collaboration indicators (avatar stack in the header).
4. **Multi-User Test**: Have another user open the same item and you should see their avatar appear.

## Troubleshooting

### WebSocket Connection Failed
- Confirm `WEBSOCKETS_ENABLED=true` is set.
- Check that your server/proxy supports WebSocket connections.
- Verify firewall settings allow WebSocket traffic.

### Redis Issues (Multi-Instance)
- Ensure all instances are connected to the same Redis server.
- Verify the `WEBSOCKETS_COLLAB_STORE_NAMESPACE` if sharing a Redis instance with other applications (default is `collab`).

### Debug Logging

Enable debug logging to troubleshoot issues.

```bash
LOG_LEVEL="debug"
```

This will provide detailed information about WebSocket connections, user events, and collaboration activities in your Directus logs.
209 changes: 0 additions & 209 deletions content/guides/02.content/9.collaborative-editing/1.installation.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Usage Guide
description: Learn how to use the Collaborative Editing extension for real-time collaboration on content in your Directus project.
description: Learn how to use the Collaborative Editing feature for real-time collaboration on content in your Directus project.
---

This guide covers the essential features you'll use when collaborating on content in real-time.
Expand Down Expand Up @@ -39,8 +39,8 @@ Collaborative editing works across:

## Summary

Collaborative editing happens automatically once the extension is enabled. Multiple users can work on the same content simultaneously without conflicts, with clear visual indicators showing who's working where.
Collaborative editing happens automatically once enabled. Multiple users can work on the same content simultaneously without conflicts, with clear visual indicators showing who's working where.

**Next Steps:**
- Test with teammates to see real-time collaboration in action
- Check out the [Installation Guide](/guides/content/collaborative-editing/installation) if you need to configure settings
- Check out the [Configuration Guide](/guides/content/collaborative-editing/configuration) if you need to configure settings
Loading