Overview
Discover what makes ChartDB powerful
ChartDB is a self‑hosted, web‑based database diagramming engine that turns raw schema data into interactive visual models in seconds. Its core premise is a **single “Smart Query”** that returns the entire schema as JSON, allowing developers to skip traditional migration tools and jump straight into design or documentation. The application is built with a modern JavaScript stack, exposing a RESTful API for schema ingestion and DDL generation, while the front‑end offers drag‑and‑drop editing, annotation, and export to multiple SQL dialects via an AI‑powered transformer.
Schema Import API
Export Engine
Diagram Persistence
Webhooks & Events
Overview
ChartDB is a self‑hosted, web‑based database diagramming engine that turns raw schema data into interactive visual models in seconds. Its core premise is a single “Smart Query” that returns the entire schema as JSON, allowing developers to skip traditional migration tools and jump straight into design or documentation. The application is built with a modern JavaScript stack, exposing a RESTful API for schema ingestion and DDL generation, while the front‑end offers drag‑and‑drop editing, annotation, and export to multiple SQL dialects via an AI‑powered transformer.
Technical Stack & Architecture
ChartDB follows a classic Node.js + React architecture. The backend, written in TypeScript, runs on Express and connects to a PostgreSQL or SQLite database that stores user sessions, diagram metadata, and export templates. The schema import layer uses the pg, mysql2, mssql, and sqlite3 drivers to execute the user‑supplied query against a target database, converting the result set into a canonical JSON representation. The front‑end leverages React with Redux Toolkit for state management and D3.js for SVG rendering of tables, relationships, and annotations. All heavy lifting—such as AI‑based DDL translation—is performed on the server via a lightweight inference engine (currently TensorFlow.js or ONNX Runtime), ensuring that client resources remain minimal.
Core Capabilities & APIs
- Schema Import API (
POST /api/import) – accepts a raw SQL query and returns a JSON schema tree. The API supports multiple dialects automatically detected from connection parameters. - Export Engine (
POST /api/export) – accepts a target dialect and optional transformation rules, returning a DDL script. The engine is pluggable; developers can supply custom transformers via JSON schema or a small JS module. - Diagram Persistence (
GET /api/diagrams/:id,PUT /api/diagrams/:id) – CRUD operations for diagram files stored as JSON blobs in the local database. Authentication is optional; self‑hosted deployments can enforce OAuth or JWT if desired. - Webhooks & Events – external services can subscribe to diagram changes via configurable webhooks, enabling CI/CD pipelines that auto‑generate documentation or run schema validation tests.
Deployment & Infrastructure
ChartDB is designed for containerized environments. A Docker image exposes port 3000 and can be run behind any reverse proxy (NGINX, Traefik). The application requires a writable data directory for persistence; no external database is mandatory beyond the target schema source. For scaling, a stateless deployment can be paired with an external PostgreSQL instance for diagram storage, allowing horizontal scaling behind a load balancer. The AGPL license encourages community contributions while ensuring that any derived work remains open source.
Integration & Extensibility
Extending ChartDB is straightforward: the plugin system accepts JSON configuration that maps new SQL dialects or custom export rules. Developers can also hook into the AI pipeline by providing a pre‑trained model in ONNX or TensorFlow.js format, which is loaded at startup. The REST API can be consumed by any language—Python scripts, Go microservices, or even CI tools—to programmatically generate diagrams or validate schema changes. Webhooks make it trivial to trigger downstream actions, such as posting a diagram preview to Slack or committing the DDL to a Git repository.
Developer Experience
Configuration is minimal: a single config.json file defines database connection strings, API keys for AI services, and optional authentication providers. The documentation covers the API contract in detail, with example payloads and response schemas. Community support is active on Discord, where developers share custom transformers and troubleshoot integration issues. The codebase follows strict TypeScript typing, ESLint rules, and CI tests, making it safe to fork and extend.
Use Cases
- Rapid Documentation – pull a live schema from a staging database, generate a diagram, and embed it in technical docs or Confluence pages.
- Schema Migration – use the AI export to produce DDL for a target database, reducing manual conversion errors.
- Team Collaboration – host an instance on-premises so architects can discuss designs without exposing credentials to a cloud service.
- Continuous Integration – integrate the import/export API into pipelines that validate schema drift or generate visual regressions.
Advantages Over Alternatives
- Zero Credential Exposure – ChartDB never stores database passwords; the import query is executed on the fly, mitigating credential leakage risks.
- Open‑Source & AGPL – full source code is available, allowing enterprises to audit and modify the tool without vendor lock‑in.
- Performance – a single query fetches the entire schema, avoiding repetitive introspection calls that slow down other tools.
- AI‑Driven Flexibility – built‑in dialect translation out of the box, with the ability to swap models for custom business rules.
- Developer‑First API – clean, well‑typed endpoints that fit into any modern stack, unlike GUI‑only solutions.
ChartDB offers a lightweight yet powerful platform for developers who need instant, editable database diagrams without the overhead of managing external services or complex tooling.
Open SourceReady to get started?
Join the community and start self-hosting ChartDB today
Related Apps in databases
NocoDB
Build databases like spreadsheets, no code required
Bytebase
Database CI/CD for DevOps teams
Datasette
Explore and publish data as interactive websites
Adminer
Single‑file database manager in PHP
Evidence
Generate BI reports from SQL and markdown
Mathesar
Spreadsheet‑like UI for PostgreSQL data, no code required
Weekly Views
Repository Health
Information
Tags
Explore More Apps
Planka
Collaborative Kanban boards with real‑time sync
SRS (Simple Realtime Server)
High‑performance real‑time video streaming server
Tiledesk
Open‑source, AI‑powered live chat for all channels

Forgejo
Self-hosted lightweight code forge
Piwigo
Open‑source photo gallery for teams and individuals
Fess
Enterprise Search Server with Built‑in Crawler