This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Architecture
Marc Bollmann edited this page Jan 28, 2021
·
2 revisions
- Client requests a new a new whiteboard via HTTP
GET /whiteboard/create
. - Whiteboard gets persisted in Database.
- Backend responses to Client with reference to whiteboard (join-code).
- Client requests an existing whiteboard with a join-code
GET /whiteboard/{id}
. - Backend retrieves existing whiteboard (including all existing objects on the whiteboard).
- Backend responds with whiteboard.
- Frontend redirects to whiteboard-page.
- Objects from the whiteboard are drawn (
enlivened
) onto the fabric.js canvas. - Client joins socket.io room (via join-code) to receive live-updates from other connected clients
- Client creates, updates or deletes an object on the fabric.js canvas.
- Client sends the created, changed, updated object via socket.io to its connected room.
- The created, updated or changed object gets in database.
- The creation, update or change is send to all connected clients except sender.
- On each client the received object gets rendered by the
enliven
-function of fabric.js.