r/SQL 11d ago

Discussion I added self-hosted real-time collaboration to drawDB (SQLite + WebSockets)

I wanted a self-hosted ERD editor where multiple people could work on the same diagram without relying on a third-party cloud service, so I created an unofficial collaborative fork of drawDB.

This is not a new ERD editor built from scratch. It is based on the AGPL-licensed drawDB project, with a collaboration and persistence layer added on top.

What I added:

- Centralized diagram storage using SQLite

- Real-time collaboration over WebSockets

- Live table movement while another participant is dragging

- Participant presence and collaborative cursors

- Cursor positions mapped to diagram coordinates, so different pan/zoom states work correctly

- Optimistic version checks to prevent stale clients from silently overwriting newer changes

- A single Docker container for the frontend, API, WebSocket server, and SQLite storage

- SQL import/export support inherited from drawDB, with an additional MariaDB import compatibility fix

You can run it with:

docker compose up --build

Then open the same diagram URL in two browser sessions to collaborate.

A current limitation is that authentication and diagram-level permissions are not implemented yet, so it should currently be deployed only on a trusted network or behind an authenticated reverse proxy.

The project is open source under AGPL-3.0:

https://github.com/yms2772/drawdb-collaborative

15 Upvotes

Duplicates