BoardKit
BoardKit
A collaborative whiteboard engine with realtime sync for NestJS and React
BoardKit is an open-source collaborative whiteboard engine. It ships as three packages that work together to provide a complete whiteboard system with realtime collaboration, a canvas rendering engine, and pluggable storage.
Packages
| Package | Description |
|---|---|
@hfu.digital/boardkit-core | Zero-dependency shared kernel with types, scene graph, tools, and collaboration protocol |
@hfu.digital/boardkit-nestjs | Backend NestJS module with pluggable storage, permissions, and Socket.IO realtime gateway |
@hfu.digital/boardkit-react | Frontend library with dual-canvas renderer, input pipeline, hooks, and pre-built components |
Key Features
- Realtime Collaboration — Socket.IO-based sync with cursor sharing, presence tracking, and delta/full sync
- 9 Drawing Tools — Pen, shape, text, sticky note, connector, select, eraser, hand (pan), and laser pointer
- Pluggable Storage — Bring your own database via abstract storage adapters (Prisma adapter included)
- Dual-Canvas Renderer — Static layer for elements (re-renders on change) and interactive layer for cursors, previews, and selections (every frame)
- LWW Conflict Resolution — Last-Writer-Wins merge strategy for concurrent edits
- Permission Model — Role-based access control with viewer, editor, and owner roles
- Multi-Page Boards — Each board supports up to 100 pages with reordering
- Export — PNG and SVG export with server-side rendering support
- Session Management — Ephemeral (5-min idle) and persistent (15-min idle, snapshot on archive) session types
- Undo/Redo — Command-based history with configurable depth