TopGit
GitHub Repo Review

drawDB: Browser-Based ERD Editor and SQL Generator

drawdb-io/drawdb
DTopGit review image for drawdb-io/drawdb
Review by Topgit.dev for drawdb-io/drawdb, with GitHub repository stats and README context.
Quick verdict

drawDB is a free, browser-based ERD editor that lets you sketch a database schema and walk away with real SQL, without installing anything or creating an account. Reach for it when you want a fast, no-friction diagram before you touch a real database; skip it if you need built-in team collaboration or diagram version history, since neither ships in the open-source package.

Stars
★ 38.7k
Forks
⑂ 3.2k
Language
JavaScript
License
AGPL-3.0
Topic
Updated
Aug 2026
Homepage
GitHub

What is drawDB?

drawDB is an entity relationship diagram editor that runs entirely in your browser, built with React and Tailwind CSS. You drag out tables, define columns and relationships, and drawDB turns that diagram into a SQL script you can export — it also reads an existing SQL script back into a diagram. Diagrams save to IndexedDB in your browser, so the core editing workflow doesn't need a server round-trip.

Core Capabilities

  • Visual ERD editor for building tables, columns, and relationships in a few clicks, with no account or sign-up required.
  • Two-way SQL workflow: export a diagram as a SQL script, or import an existing SQL script and get a diagram back.
  • Migration generation, so schema changes come out as SQL you can run against a real database instead of diffing screenshots by hand.
  • Diagrams persist locally via IndexedDB, so reloading the page doesn't lose your work even without a backend.
  • Optional file sharing through a companion server, drawdb-io/drawdb-server, configured with its own environment variables — only needed if you want to share diagrams with others.
  • Editor customization, per the README, on top of the core diagram-and-export loop.
How this repository's GitHub stars have grown over time. Source: star-history.com.View the star history

Getting Started with drawDB

Local development needs Node and npm: git clone https://github.com/drawdb-io/drawdb, then npm install and npm run dev. A production build is npm run build after the same clone-and-install steps. For a containerized run, docker build -t drawdb . followed by docker run -p 3000:80 drawdb serves the app on port 3000. None of this requires an account or a database connection string — drawDB works standalone until you specifically want the sharing feature, which needs the separate drawdb-server project and the environment variables in its .env.sample.

Strengths

  • No account, no sign-up, no server dependency for the core editor — clone it or use the hosted version and start diagramming right away.
  • Two-way SQL support (export and import) means drawDB isn't just a drawing tool with SQL as an afterthought — a script you already have becomes a diagram.
  • Self-hostable with a one-line Docker build and run, which matters if the diagrams describe a schema you don't want leaving your infrastructure.
  • The whole workflow — modeling, SQL export/import, migrations — stays in one browser tab instead of bouncing between a diagramming app and a separate SQL client.

Current Considerations

  • Sharing diagrams with others isn't built into the client — it requires standing up a separate drawdb-server project and configuring its own .env.sample, real extra work for most single-user setups.
  • The README doesn't document step-by-step in-app usage beyond 'a few clicks,' so exact workflow details aren't confirmed here.
  • AGPL-3.0 is a copyleft license, not a permissive one like MIT — running a modified version as a network service generally carries source-disclosure obligations a permissively licensed alternative wouldn't.
  • No collaboration or version-history feature is mentioned in the README, so multi-person editing on the same diagram isn't part of the open-source package as documented.

Other Diagramming Tools

prisma — a schema-first ORM that also generates and manages migrations, but you define the schema in code (schema.prisma) rather than drawing an ERD.next-ai-draw-io — AI-assisted draw.io diagramming; general-purpose, not built specifically around SQL export and import like drawDB.dbdiagram.io — a hosted ERD tool with a DSL-based editor; not self-hostable the way drawDB is.MySQL Workbench — a heavier, MySQL-specific desktop client with ERD modeling plus admin features drawDB doesn't attempt.pgAdmin — a Postgres-specific administration tool with an ERD view, tied to one database engine rather than drawDB's multi-flavor SQL export.

Common Questions

Is drawDB free for commercial use?

drawDB is released under the AGPL-3.0 license, so commercial use is allowed, but AGPL is copyleft: if you modify drawDB and run it as a network service, you're generally required to make your modified source available too. Read the full license text before deploying a modified version commercially.

What databases does drawDB support?

Per the repository's own topics, drawDB targets PostgreSQL, MariaDB, SQL Server, SQLite, and Oracle Database for SQL export and import, alongside generic SQL generation.

Can I self-host drawDB?

drawDB is designed to be self-hosted: clone the repo and run npm run dev or npm run build locally, or build and run the provided Dockerfile with docker build -t drawdb . and docker run -p 3000:80 drawdb.

Does drawDB require an account to use?

drawDB's core editor works without creating an account, per the README, and diagrams persist locally via IndexedDB. An account only becomes relevant if you stand up the optional sharing server separately.

How do I contribute to drawDB development?

drawDB's repository includes a CONTRIBUTING.md with guidelines for contributors, and the project runs a Discord server for discussion beyond GitHub issues and pull requests.

The problem it solves

Sketching a database schema before you've built anything usually forces a choice: free-hand boxes and arrows in a generic diagramming tool that has no idea what SQL is, or open a full database client that assumes you already have a live connection to model against. drawDB sits between those two — it's built specifically around entity-relationship modeling with SQL as a first-class output, so you can design a schema, export it as a script, or import an existing script to visualize it, all before a database exists to connect to.

Best use cases

  • Whiteboarding a new schema with a team before writing any migration files, then exporting the result as SQL to seed the first migration.
  • Reverse-engineering an unfamiliar schema by importing an existing SQL script and getting a visual ERD back.
  • Visualizing schemas from various SQL databases (e.g., PostgreSQL, MariaDB, SQL Server, SQLite, Oracle).
  • Running a private, self-hosted instance via Docker for teams that don't want schema diagrams touching a third-party SaaS.
  • Quick one-off diagrams for documentation or a pull request description, since the core editor needs no account or setup.

Who should try it — and who should skip

Reach for drawDB if you want a fast, no-install way to sketch a schema and walk away with real SQL — solo developers, small teams prototyping a data model, or anyone who wants an ERD without opening a heavyweight database client. Skip it if you need built-in multi-user collaboration, diagram version history, or you're not comfortable with AGPL-3.0's copyleft terms for a commercial deployment — none of those are solved by the open-source package as documented.

Related repositories

Source & attribution

Facts and quotes sourced from the drawdb-io/drawdb GitHub repository and its README.

GitHub data · last synced Aug 11, 2026Reviewed by Henry
Back to TopGit

Still deciding about drawdb?

One click hands the question to an AI along with this page — see what it says about drawdb.

GitHub