Core Concepts β
NOTE
This documentation is currently Work In Progress.
Understanding the core concepts of BoardAPI will help you build better applications.
Boards β
The central canvas where collaboration happens. Every board is an infinite whiteboard powered by Excalidraw, enhanced with BoardAPI's enterprise features.
Board Lifecycle β
Boards follow a predictable lifecycle:
- Creation - A board is created via API with an organization owner
- Active - Participants can join, collaborate, and create objects
- Archived - Board is preserved but read-only (retention policy applies)
- Deleted - Permanently removed after retention period
Board Identity β
Each board has:
- UUID - Globally unique identifier
- Name - Human-readable title
- Organization ID - Owning organization for isolation
- Access Tokens - JWT tokens for host and guest access
Board State β
Board state consists of:
- Canvas Elements - Excalidraw shapes, text, arrows synced via Yjs CRDT
- Custom Objects - Organization-defined objects with customData
- Participants - Currently connected users with presence information
- Metadata - Creation time, last activity, version
Access Control β
Two access levels:
- Host - Full control (create, edit, delete, invite, settings)
- Guest - Limited access (view, edit based on permissions)
Stateless participants join via shareable links without registration.
Objects β
Elements on the board include both Excalidraw native elements and custom objects.
Object Types β
Native Excalidraw Elements:
- Shapes (rectangle, ellipse, diamond)
- Text boxes
- Arrows and lines
- Hand-drawn paths
- Images
Custom Objects (via Object Types API):
- Organization-defined types with JSON Schema
- Custom rendering and interactions
- Typed data in
customDatafield
Object Structure β
Every object has:
{
"id": "obj_unique_id",
"type": "vocabulary-card",
"x": 100,
"y": 200,
"width": 300,
"height": 200,
"customData": {
"word": "hello",
"translation": "ΠΏΡΠΈΠ²Π΅Ρ",
"pronunciation": "https://..."
}
}Custom Data β
The customData field stores typed data validated against your registered Object Type schema. This enables:
- Rich domain models (vocabulary cards, quiz questions, tasks)
- Type safety and validation
- Custom rendering via External Components
- Searchable structured data
Object Operations β
Via REST API:
POST /boards/:uuid/objects- Create objectPUT /boards/:uuid/objects/:id- Update objectDELETE /boards/:uuid/objects/:id- Delete objectGET /boards/:uuid/objects- List all objects
Via WebSocket:
object:create- Real-time object creationobject:update- Real-time updates (position, data)object:delete- Real-time deletion
Frames β
Frames divide the infinite canvas into structured areas (slides, rooms, sections). Think of them as "slides in a presentation" or "rooms in a building."
What are Frames? β
A Frame is a rectangular region with:
- Name and description
- Position and size (x, y, width, height)
- Lock mode for access control
- Visibility state
Lock Modes β
Three levels of access control:
None - Free navigation
- Participants can scroll anywhere on the canvas
- No restrictions
Soft Lock - Gentle guidance
- Participants can leave the frame
- "Return to lesson" indicator shown when outside
- Ideal for classroom scenarios
Hard Lock - Strict boundaries
- Participants cannot scroll outside the frame
- Perfect for exams and controlled environments
Frame Navigation β
Teachers can:
- Create frames via Frame Manager UI
- Navigate participants to specific frames
- Track who is viewing each frame
- Use with Follow Me mode for synchronized navigation
Use Cases β
- Presentations - Each frame is a slide
- Lesson Plans - Structured activities in sequence
- Group Workspaces - Separate areas for teams
- Exams - Isolated problem sets
Learn more in Frames Guide.
Zones β
Student Zones enable personalized, isolated workspaces within a board. This is a unique BoardAPI feature not found in competitors.
What are Zones? β
A Zone is a designated area assigned to a specific participant:
- Only the assigned participant can edit objects inside
- Host maintains full control
- Zones can be hidden from other participants (exam mode)
Zone Features β
Assignment
- One participant per zone
- Bulk assignment for classes
- Reassignment supported
Isolation
- Only assigned participant can create/edit/delete objects inside
- Violation detection returns objects to original position
- Other participants see zone boundaries
Privacy
- Zones can be hidden from other students
- Perfect for independent work and exams
- Host always sees all zones
Zone vs Frame β
| Feature | Frame | Zone |
|---|---|---|
| Purpose | Navigation structure | Edit permissions |
| Access Control | View boundaries | Edit isolation |
| Assignment | All participants | Single participant |
| Can overlap | No | No |
Use Cases β
- Individual Assignments - Each student gets their workspace
- Exams - Isolated work areas with privacy
- Group Projects - Zones for different team members
- Presentations - Student presentation areas
Learn more in Student Zones Guide.
Participants β
People connected to a board in real-time.
Participant Roles β
Host
- Creator of the board
- Full permissions (create, edit, delete, settings)
- Can manage participants (kick, change permissions)
- Access to advanced features (Frames, Zones, AI)
Guest
- Joins via shared link
- View and edit by default
- Permissions can be restricted by host
- Stateless - no registration required
Participant Information β
Each participant has:
- ID - Unique identifier for session
- Name - Display name (can be anonymous)
- Cursor - Real-time cursor position
- Selection - Currently selected objects
- Viewport - Visible canvas area
Presence System β
Real-time awareness features:
- Cursor tracking - See where others are pointing
- Selection indicators - Who is editing what
- Typing indicators - Live collaboration feedback
- Viewport awareness - See who is viewing which area
Participant Management β
Host capabilities:
- View all connected participants
- Set view-only mode for individuals
- Remove disruptive participants
- Assign to Zones or Frames
Real-time Events β
BoardAPI uses WebSocket for instant updates across all connected participants.
Event Types β
Board Events
board:snapshot- Full state sync for new participantsboard:updated- Incremental updates
Object Events
object:create- New object createdobject:update- Object modified (position, data)object:delete- Object removed
Participant Events
participant:joined- New participant connectedparticipant:left- Participant disconnectedcursor:move- Cursor position update
Frame Events
frame:create- New frame createdframe:navigate- Host navigated to frameframe:lock- Lock mode changed
Zone Events
zone:create- Zone createdzone:assign- Participant assigned to zonezone:violation- Edit attempt in wrong zone
Event Flow β
1. User action (e.g., create object)
β
2. Frontend sends WebSocket event
β
3. Backend validates and persists
β
4. Backend broadcasts to room
β
5. Other clients receive and update UIConnection Architecture β
BoardAPI uses a hybrid WebSocket architecture:
- Single Socket.IO connection for efficiency
- Yjs CRDT for conflict-free state sync
- Custom events for ephemeral data (cursors, presence)
Benefits:
- Low latency (< 100ms p95)
- Auto-reconnect with buffering
- Optimized for mobile (battery, reliability)
- Multiplexed - one connection for everything
Offline Behavior β
When connection is lost:
- UI shows "Connection lost" indicator
- Changes are buffered locally (max 30 seconds)
- Auto-reconnect with exponential backoff
- Buffered changes sync on reconnect
Custom Components β
External Components SDK enables developers to create custom interactive elements that embed in boards.
What are Components? β
Components are iframe-embedded applications with:
- Custom UI and behavior
- Shared state across participants (CRDT-like sync)
- Access to board context (frames, participants, quota)
- Sandbox security
Component vs Object Type β
| Feature | Object Type | Component |
|---|---|---|
| Rendering | Server-defined template | Custom iframe UI |
| Interactivity | Limited | Full JavaScript |
| State Management | customData only | Shared storage + local |
| Use Case | Simple data cards | Complex apps (quiz, poker) |
SDK API Modules β
Components access platform features via board.* API:
Core APIs
board.storage- Shared state with auto-syncboard.props- Component settingsboard.participants- Participant info and presence
Advanced APIs
board.context- Frame/Zone awarenessboard.quota- Check limits before actionsboard.backend- Proxy API calls (hide secrets)board.webhooks- External integrations
Example: Planning Poker β
// Component uses Shared State
await board.storage.set('myVote', 5);
// Subscribe to reveals
board.storage.subscribe('revealed', (isRevealed) => {
if (isRevealed) showAllVotes();
});
// Check quota before upload
const canUpload = await board.quota.canUpload();Development Workflow β
- Create - Use CLI:
boardapi create my-component - Develop - Local simulator with hot reload
- Test - Testing utilities and mock board
- Publish - Deploy to your CDN
- Register - Add to BoardAPI catalog
Learn more in Components Documentation.
AI Agents β
Autonomous AI agents that react to board events and take actions without explicit user requests.
What are Agents? β
Agents are event-driven automations powered by LLM decision-making:
- Listen to board events (object created, participant joined, etc.)
- Analyze context using GPT
- Act automatically (send message, create object, move participant)
Agent Architecture β
Event occurs (e.g., zone violation)
β
Event Router β matching agents
β
LLM Decision Engine β analyze context
β
Action Executor β perform action
β
Result broadcast to participantsAgent Actions β
Communication
send_message- Send message to participantbroadcast_announcement- Notify all participants
Content
create_object- Add object to boardupdate_object- Modify existing objectdelete_object- Remove object
Navigation
move_participant- Send participant to framelock_board- Change lock mode
Gamification
award_points- Give points to participantset_timer- Start countdown timer
Agent Presets β
Ready-to-use templates:
AI Tutor
- Monitors student progress
- Generates hints on request
- Provides contextual help
Moderator
- Watches for rule violations
- Sends warnings
- Maintains order in exams
Timer
- Manages activity time limits
- Auto-advances frames
- Sends time warnings
Use Cases β
- Automated Teaching Assistant - Help students in real-time
- Exam Monitoring - Detect suspicious behavior
- Content Generation - Create practice problems on demand
- Progress Tracking - Move students to next activity when ready
Learn more in AI Agents Documentation.
How Concepts Work Together β
BoardAPI's power comes from combining these concepts:
Example: Interactive Vocabulary Lesson β
- Board - Create lesson canvas
- Frames - One frame per activity (introduction, practice, quiz)
- Object Types - Register "vocabulary-card" type
- Objects - Create cards with word/translation in customData
- Zones - Each student gets practice zone
- Participants - Students join via link
- Real-time Events - Cards sync instantly
- Components - Quiz component for assessment
- AI Agent - Tutor provides hints when students struggle
This creates a rich, interactive learning experience impossible with standalone tools.
Next Steps β
- Quick Start Guide - Build your first board
- API Reference - Complete REST and WebSocket API
- Components SDK - Create custom components
- Use Cases - Real-world examples