BoardKit
Collaborative whiteboard engine with realtime sync, dual-canvas rendering, and pluggable storage for NestJS and React
BoardKit is an open-source collaborative whiteboard engine. It provides realtime collaboration, a canvas rendering engine, drawing tools, and pluggable storage. It ships as three packages that work together.
Packages
| Package | Description |
|---|---|
@hfu.digital/boardkit-core | Zero-dependency shared kernel: types, scene graph, tools, 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 sync with cursor sharing, presence tracking, delta and full sync
- 9 Drawing Tools — Pen, shape, text, sticky note, connector, select, eraser, hand (pan), laser pointer
- Pluggable Storage — Bring your own database via abstract storage adapters (Prisma adapter included)
- Dual-Canvas Renderer — Static layer for elements, interactive layer for cursors / previews / selections
- LWW Conflict Resolution — Last-Writer-Wins merge strategy for concurrent edits
- Permission Model — Role-based access control: viewer / editor / owner
- Multi-Page Boards — Up to 100 pages per board 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) sessions
- Undo / Redo — Command-based history with configurable depth
Versioning
CalVer (yyyy.mm.version). All three packages must be pinned to the same version. See the docs root for details.
Quick Links
Getting Started
Install and wire up the core, backend, and frontend packages
Architecture
Three-package design, realtime gateway, dual-canvas renderer
Core
@hfu.digital/boardkit-core — types, scene graph, tools, protocol
Backend
@hfu.digital/boardkit-nestjs — services, storage, realtime gateway
Frontend
@hfu.digital/boardkit-react — hooks, renderer, components
Guides
Custom storage, custom auth, custom tools
Examples
Working NestJS, React, and full-stack examples