ChartDB: Visualize and Design Your Database with a Single Query

Summary
ChartDB is an open-source, web-based database diagramming editor designed to visualize and design your database schemas instantly. It generates diagrams from a single "Smart Query" and offers AI-powered export for seamless migrations across various database types, all without requiring installation or database passwords.
Repository Info
Tags
Click on any tag to explore related repositories
Introduction
ChartDB is a powerful, open-source, web-based database diagramming editor that revolutionizes how you visualize and design your database schemas. It allows you to instantly generate interactive diagrams from a single "Smart Query," making complex database structures easy to understand and manage. With features like AI-powered export for migrations and intuitive editing capabilities, ChartDB streamlines your database design workflow without requiring any installations or database passwords.
Installation
You can use ChartDB directly via its cloud version or deploy it locally.
Local Deployment:
To run ChartDB locally, you'll need Node.js and npm.
npm install
npm run dev
Building with AI Capabilities:
To include AI features, provide your OpenAI API key during the build process:
npm install
VITE_OPENAI_API_KEY=<YOUR_OPEN_AI_KEY> npm run build
Docker Container:
Run ChartDB using Docker. For AI capabilities, include your OpenAI API key:
docker run -e OPENAI_API_KEY=<YOUR_OPEN_AI_KEY> -p 8080:80 ghcr.io/chartdb/chartdb:latest
For more detailed instructions, including building and running locally with Docker or using a custom inference server, please refer to the official GitHub repository.
Examples
ChartDB offers a straightforward way to visualize your database:
- Go to the ChartDB website.
- Click "Go to app."
- Choose the database that you are using.
- Take the magic query and run it in your database.
- Copy and paste the resulting JSON set into ChartDB.
- Enjoy Viewing & Editing!
You can also explore various examples and templates on their website.
Why Use
ChartDB stands out for several reasons:
- Instant Schema Import: Quickly retrieve and visualize your database schema as JSON with a single query, perfect for documentation, team discussions, or quick understanding.
- AI-Powered Export for Easy Migration: Generate DDL scripts in your desired dialect, simplifying migrations between different database systems like MySQL to PostgreSQL or SQLite to MariaDB.
- Interactive Editing: Fine-tune and annotate your database schema with an intuitive editor to better visualize complex structures.
- No Installation, No Password: Access all features directly from your browser without any local installations or requiring your database password, enhancing security and convenience.
- Broad Database Support: Supports popular databases including PostgreSQL, MySQL, SQL Server, MariaDB, SQLite, CockroachDB, and ClickHouse.