Favicon of drawDB

drawDB

Open-source browser-based ERD editor for designing database schemas and generating SQL scripts, no account required.

Open Source Alternative to:
drawDB website screenshot
drawDB GitHub repository preview

drawDB is a browser-based database entity relationship diagram (ERD) editor for designing schemas visually and exporting SQL. It's built for developers, DBAs, and students who want to sketch out a database structure without installing desktop software or setting up an account. Everything runs client-side, and data stays local unless you connect optional sharing infrastructure.

Key features

  • Visual ERD editor: build tables, relationships, and diagrams with a few clicks directly in the browser.
  • SQL import/export: generate SQL scripts from your diagram or import existing SQL to reverse-engineer a diagram.
  • Migration generation: produce schema migrations from your diagram changes.
  • No account required: use the tool fully without signing up, with data stored locally (IndexedDB).
  • Multi-database support: works with common database dialects including PostgreSQL, MariaDB, and Oracle.
  • Customizable editor: adjust the editor to fit your workflow.
  • Self-hostable: run it locally, build it yourself, or deploy via Docker.
  • Optional sharing: connect the companion drawdb-server to enable sharing diagrams with others.

Ideal use cases

drawDB fits well when you need to quickly sketch a database schema before writing migrations, when you're teaching or learning ERD concepts, or when you want to reverse-engineer an existing SQL script into a visual diagram. It's also a good fit for teams who want a free, self-hosted alternative to commercial ERD tools and don't want to hand schema data to a third-party service.

It's less suited for managing live production databases directly (it doesn't connect to a running database instance to introspect schema in real time), or for teams that need built-in multi-user real-time collaboration out of the box, since collaboration/sharing requires setting up the separate drawdb-server component yourself. If you need a full database administration GUI (query running, data browsing, user management), this isn't that; it's focused on schema design and SQL generation.

Installation

Clone the repo and run it locally with Node.js and npm:

git clone https://github.com/drawdb-io/drawdb
cd drawdb
npm install
npm run dev

To build a production bundle:

git clone https://github.com/drawdb-io/drawdb
cd drawdb
npm install
npm run build

To run it in Docker:

docker build -t drawdb .
docker run -p 3000:80 drawdb

If you want sharing enabled (sending/receiving diagram links to others), set up the companion drawdb-server project and configure environment variables per the .env.sample file in this repo. This step is optional and only needed if you want file sharing beyond local use.

You can also just use the hosted version at drawdb.app without installing anything locally.

Frequently asked questions

Share:

Stars
39.3K
Forks
3.2K
Last commit
2 days ago
Repository age
3 years
License
AGPL-3.0
Self-hosted
No
Activity score
85/100
View Repository
Ad
Favicon

 

  
 

Similar to drawDB

Favicon

 

  
 
Favicon

 

  
 
Favicon