Experiment
Collaborative Whiteboard
Understanding synchronisation by building a board to share.
- My role
- Prototype design and development
- Status
- Public prototype
- Technology
- React, Konva.js, Firebase, TypeScript
Finding out how it works
While I was a student, I wanted to understand how several people could draw on the same board from their browsers. I started this experiment out of personal curiosity, with an idea for my website: give visitors something fun to try.
Synchronisation was the focus of my research. A shape created in one window needs to appear in the others and reflect subsequent changes. I also had to distinguish those objects from participants’ movements around the board.
From a gesture to a shared shape
I kept the tools simple: rectangles, circles, lines and text, with a selection of colours. React handles the interface and Konva renders the canvas. Each shape has coordinates, dimensions and the information needed to draw it again.
Each object corresponds to a Cloud Firestore document. The interface subscribes to changes in the collection and rebuilds the board from the shapes it receives. When a participant moves an object, the prototype saves its new position at the end of the drag. Text can also be edited with a double-click.
Two rhythms of synchronisation
A shape and a cursor position represent different kinds of information. To return to a rectangle, its state needs to be stored. To locate a participant, their current position is enough; their full mouse trajectory does not need to become part of the board’s objects.
I separated the two flows: Firestore for shapes and Firebase Realtime Database for cursor positions. The browser groups movements and limits how often it sends the cursor position. Cursors have their own Konva layer, which does not intercept clicks intended for shapes.
An open playground
All visitors join one shared public board. Anonymous Firebase sign-in gives each participant an identity without an account form. That identity also links shapes to their creator: the rules allow shared reading, while restricting updates and deletion to the author.
The board remains a place to experiment. The interface limits the number of shapes, and a scheduled cleanup removes old items. The browser also attempts to remove a participant’s shapes when they leave the page. Drawings can therefore disappear after a visit.
What I would revisit next
The experiment covers shared shapes and a separate presence channel. It has limits: undo uses a local action stack, and the prototype does not merge concurrent changes to the same object. Cursor presence still requires the read permissions to be aligned with the board subscription.
If I returned to the project, I would start by replaying interactions across two browsers: create, move, delete and undo, then leave the board or lose the connection. I would also make ownership visible in the interface so it does not offer to edit someone else’s shape. I would keep the scope of a small prototype that is easy to discover and try from my website.