Getting Started
Installation
Claude Code Skill
Add vuer-rtc knowledge to Claude Code for intelligent assistance with the library:
Option 1: Plugin Marketplace (Recommended)
Option 2: CLAUDE.md Import
Add to your project's CLAUDE.md:
After installation, Claude Code will have access to:
- vuer-rtc skill — CRDT operations, client state, React hooks, and text collaboration
- Context-aware assistance for scene graph operations
To verify installation:
The skill uses hierarchical documentation — Claude loads a structured overview first, then fetches detailed docs as needed for specific operations.
Quick Start
Core Concepts
State Model
The client maintains four key data structures:
| Component | Purpose |
|---|---|
graph | Current state shown in UI. Derived from snapshot + journal + edits. |
journal | Committed messages. Tracks ack status and deletion (undo) state. |
edits | Uncommitted ops. Merged during gestures, committed as one message. |
snapshot | Periodic checkpoint. Bakes in acked entries for fast replay. |
Edit Buffer
Operations are accumulated in the edit buffer during gestures (like dragging), then committed as a single message:
The edit buffer merges additive operations, so 60 small deltas become 1 message.
Messages & Operations
Changes are expressed as messages containing one or more operations:
Undo / Redo
Undo and redo are synced messages that mark entries with deletedAt:
All clients see the same undo state. Undo is not local-only.
Conflict Resolution
| Operation | Merge Strategy | Example |
|---|---|---|
*.set | Last-Write-Wins (higher lamport) | color.set '#ff0000' |
*.add | Sum values | vector3.add [1, 0, 0] |
meta.undo | Sets deletedAt on target | Synced undo |
meta.redo | Clears deletedAt on target | Synced redo |
Next Steps
Next: See the Complete Integration Guide and Examples to build your first collaborative application.