A real-time collaborative whiteboard. Start a board, share the link, and draw together: shapes, freehand ink, text and live cursors sync instantly between everyone on the board.
- Live sync: every create, move, resize, rotate, restyle and delete is broadcast to the board over Socket.IO.
- Presence: named, colored cursors and avatars for everyone on the board.
- Tools: select, pen, eraser, rectangle, ellipse, triangle, line and text, with colors, stroke widths and fills.
- Shareable boards: each board lives at
/board/<id>; late joiners receive the current drawing. - Export: download the board as a PNG cropped to its content.
- Optional accounts: email/password sign-up and sign-in (bcrypt + JWT, stored in Postgres). Without a database, everyone joins as a named guest.
Keyboard shortcuts: 1–8 pick tools, Del/Backspace deletes the selection, Esc returns to select.
client/ React + Vite + fabric.js front end
server/ Express + Socket.IO server (boards in memory, accounts in Postgres)
Requires Node 18+ and pnpm 8 (npx pnpm@8 ... works too).
# terminal 1: server on http://localhost:5000
cd server
pnpm install
pnpm dev
# terminal 2: client on http://localhost:5173
cd client
pnpm install
pnpm devOpen http://localhost:5173, click Start a new board, and open the same board link in a second window to see it sync.
Client (client/.env.local, see client/.env.example)
| Variable | Default | Purpose |
|---|---|---|
VITE_SERVER_URL |
http://localhost:5000 |
Where the API and Socket.IO server live |
Server (server/.env, see server/.env.example)
| Variable | Default | Purpose |
|---|---|---|
PORT |
5000 |
HTTP/WebSocket port |
CLIENT_ORIGIN |
any origin | Comma-separated list of allowed browser origins |
POSTGRES_URL |
unset | Postgres connection used for accounts |
SECRET_KEY |
unset | JWT signing secret; accounts are enabled only when this and POSTGRES_URL are set |
DATABASE_URL |
unset | Used by pnpm migrate up (node-pg-migrate) to create the users table |
To enable accounts: create a Postgres database, set the three variables above in server/.env, then run
pnpm migrate up in server/.
Boards are stored in server memory and discarded six hours after the last person leaves. A server restart clears them, though a client that reconnects with a drawing still open re-uploads it.
MIT