SSE Synchronization Architecture
When you open http://localhost:4747 in your browser, the frontend establishes a long-lived Server-Sent Events (SSE) connection with the local OpenBoard server:
- An AI agent in your terminal (e.g. Claude Code) invokes an MCP tool like
create_shapeorbatch_create_shapes. - The MCP server writes the new shapes into SQLite and broadcasts a lightweight
board_updatedSSE event. - The browser canvas receives the event and renders the new shapes in real time with smooth CSS transitions.
Mutation Event Protocol
Event payloads are optimized JSON packets describing the mutated entity ID, shape properties, and bounding boxes, avoiding full-canvas re-renders.