zed-industries/zed
Collaboration
Active contributors: ConradIrwin, maxdeviant, mikayla-maki
Purpose
Zed's headline collaboration features: shared projects, calls with audio, persistent channels, presence, and notifications. Two or more users can edit the same files in real time, follow each other's cursors, and talk over LiveKit-powered audio.
Crates
| Crate | Role |
|---|---|
crates/collab |
Backend service (separate binary) |
crates/client |
High-level client driving collab + cloud |
crates/collab_ui |
The collab panel, contacts, channels UI |
crates/call |
Real-time call orchestration |
crates/livekit_api, crates/livekit_client |
LiveKit SDK integration |
crates/channel |
Channel model (membership, topics, threads) |
crates/notifications |
In-app notifications surface |
crates/proto |
Shared protobuf schema |
crates/rpc |
Transport / message routing |
How it works
sequenceDiagram
participant A as Zed (User A)
participant S as collab::Server
participant B as Zed (User B)
A->>S: WebSocket connect (auth)
A->>S: ShareProject(project)
S->>B: ProjectShared(...)
B->>S: JoinProject(project_id)
S-->>B: Project snapshot + worktree state
A->>S: BufferEdited(...)
S->>B: BufferEdited(...)
B->>S: BufferEdited(...)
S->>A: BufferEdited(...)Shared projects
Sharing a project sends the worktree, open buffers, language-server state, and presence info to other participants. Edits are CRDT-flavored (replica IDs in crates/text), so concurrent edits merge without conflict.
Calls
Calls are signaled through crates/call and use LiveKit for media. Each call has a room ID minted by collab; clients exchange tokens before connecting to the LiveKit room.
Channels
A channel is a persistent room with members, threads, and a notes document. The state lives server-side in Postgres; clients sync via the same RPC channel as everything else.
Presence
The collab server tracks who is online and what project they're working in. The collab panel renders contacts with status and lets you join their projects (subject to permissions).
Notifications
crates/notifications shows in-app toasts for incoming calls, channel events, and follow requests. Schema in crates/proto.
Entry points for modification
- New RPC message —
crates/proto/proto/..., then handlers on both sides. - Backend behaviour —
crates/collab/src/rpc/. - UI —
crates/collab_ui/src/. - Audio —
crates/livekit_client(andcrates/audio,crates/denoise,crates/media).
Related pages
- collab — the deployed backend
- RPC — wire format
- Remote development — shares the same RPC plumbing
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.