MATIH Platform is in active MVP development. Documentation reflects current implementation status.
15. Workbench Architecture
Real-Time Collaboration

Real-Time Collaboration

The BI Workbench collaboration components at frontend/bi-workbench/src/components/collaboration/ enable multi-user real-time dashboard editing with cursor tracking and presence awareness.


Components

CollaboratorCursors

File: frontend/bi-workbench/src/components/collaboration/CollaboratorCursors.tsx

Renders colored cursors showing where other editors are working on the dashboard grid. Each cursor shows the collaborator's name and is color-coded.

CollaboratorPresence

File: frontend/bi-workbench/src/components/collaboration/CollaboratorPresence.tsx

Shows avatars and status of users currently viewing or editing the dashboard.

useCollaboration Hook

File: frontend/bi-workbench/src/hooks/useCollaboration.ts

Manages the WebSocket connection for collaboration features:

const {
  collaborators,
  cursors,
  broadcastCursorPosition,
  broadcastWidgetLock,
  releaseWidgetLock,
} = useCollaboration(dashboardId);

Collaboration Service

File: frontend/bi-workbench/src/services/collaboration-service.ts

Handles persistence and API calls for collaboration features including shared dashboard state, conflict resolution, and operational transforms for concurrent edits.