Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,101 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



drawdb logo

drawDB

Free, simple, and intuitive database schema editor and SQL generator.

demo

DrawDB is a robust and user-friendly database entity relationship (DBER) editor right in your browser. Build diagrams with a few clicks, export sql scripts, customize your editor, and more without creating an account. See the full set of features here.

Getting Started

Local Development

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

Build

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

Docker Build

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

Local full stack (Docker Compose)

Run the frontend + collab WS + backend locally in containers (good for testing sharing/collab):

  1. Clone this repo and drawdb-server side by side (e.g., ~/dev/drawdb-stack/drawdb and ~/dev/drawdb-stack/drawdb-server).
  2. Create a .env next to docker-compose.local.yml if you need overrides like VITE_BACKEND_URL, VITE_COLLAB_WS_URL, PORT, COLLAB_PORT, CLIENT_URLS, or GITHUB_TOKEN (required for gist sharing/revisions to show up). Set PERSIST_BASE_URL if you want collab changes to be persisted (strongly recommended outside dev).
  3. From drawdb/, run docker compose -f docker-compose.local.yml up --build -d.
  4. Iterating on code: backend hot-reloads via the volume mount + npm run dev; frontend/collab server changes need a rebuild (docker compose -f docker-compose.local.yml up --build -d).

Sharing backend (drawdb-server)

If you want to enable sharing, you need the optional drawdb-server running and a GitHub token with gist scope:

  • Create a PAT with the gist scope (GitHub → Settings → Developer settings → Personal access tokens (classic) → New token).
  • Put that token in the drawdb-server .env as GITHUB_TOKEN=<your_token> (keep it off the frontend).
  • Start drawdb-server (see its README) and point the app to it using the .env.sample values (e.g., VITE_BACKEND_URL).
  • For live collaboration, also start the collab WS server in server/ (COLLAB_PORT, optional PERSIST_BASE_URL to flush to drawdb-server). See docs/collab/COLLAB_SETUP.md / docs/collab/COLLAB_DEPLOYMENT.md for details.

Docs

  • Sharing links and local persistence: docs/sharing.md
  • Collaboration setup and deployment: docs/collab/

About

Free, simple, and intuitive online database diagram editor and SQL generator.

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages