ChartBrew
Open-source reporting platform to build live dashboards from SQL, NoSQL, APIs, and SaaS tools with an AI assistant that creates charts from natural language.
ChartBrew is an open-source business intelligence platform that connects directly to relational databases (MySQL, PostgreSQL, TimescaleDB, RDS), document stores (MongoDB, Firestore, Realtime Database), analytics APIs (Google Analytics, ClickHouse, Supabase), and SaaS platforms (Stripe, Customer.io, Jira, Strapi) to generate interactive, real-time dashboards. Version 5 introduced a major architectural shift toward an AI-first workflow where a conversational orchestrator backed by OpenAI’s function-calling API can query data sources, generate SQL or MongoDB queries from plain English, pick chart types, and push the resulting visualizations directly onto a dashboard in a single guided session.
The platform is built as a monorepo with a React + HeroUI frontend and an Express backend, both running on Node.js 22. BullMQ handles background jobs for scheduled data refreshes and automated chart snapshots, while Redis serves as both the cache layer and the job queue broker. Teams can share dashboards internally, restrict access with role-based permissions at the project and dataset level, or embed live charts into external web applications via an iframe or public API — all without requiring any paid subscription for self-hosted instances.
ChartBrew’s plugin architecture makes it straightforward to add new data sources as standalone packages. Each source plugin exposes a standard interface covering connection validation, schema discovery, query execution, and AI-assisted query generation so the built-in AI orchestrator can introspect any connector without special-casing. The result is a platform where non-technical users can ask questions in natural language and receive publishable charts, while engineers retain full control over raw query editors, variable bindings, and dataset configuration.
What You Get
- AI-Powered Dashboard Builder - A conversational AI orchestrator backed by OpenAI function-calling that translates natural language questions into SQL, MongoDB, or ClickHouse queries, selects appropriate chart types, and places finished visualizations on a dashboard in one guided session.
- Multi-Source Data Connectivity - Native source plugins for MySQL, PostgreSQL, MongoDB, Firestore, Realtime Database, ClickHouse, TimescaleDB, Supabase, Stripe, Google Analytics, Customer.io, Jira, Strapi, and generic REST APIs — each with schema discovery and AI query generation support.
- Embeddable Live Charts - Share individual charts or full dashboards via a public link, embed them in any web app with an iframe, or fetch rendered data through the public API to power your own front-end visualizations.
- Scheduled Data Refreshes and Snapshots - BullMQ-driven cron jobs automatically refresh dataset queries, update chart caches, and capture and distribute dashboard snapshots on a configurable schedule — ensuring stakeholders always see current data.
- Dynamic Variables and Formula Engine - Bind user-controlled variables to dataset queries so viewers can filter, drill down, or switch date ranges without touching SQL; a formula engine lets non-technical users create calculated metrics with real-time syntax guidance.
- Client Reporting with Templates - Duplicate entire dashboards and their underlying dataset configurations for new clients or projects, swapping connection parameters without rebuilding every chart from scratch — critical for agencies and multi-tenant SaaS products.
- Team and Role-Based Access Control - Granular permissions at the project and dataset level let team owners invite members with viewer or editor roles, isolate client workspaces, and gate access to sensitive connections.
- Slack Data Conversations - Mention the ChartBrew bot in any Slack channel to ask data questions and receive chart-based answers inline, bringing analytics into existing team communication workflows.
Common Use Cases
- SaaS product analytics - A product team connects ChartBrew to their PostgreSQL database and Google Analytics account, then uses the AI assistant to build an engagement dashboard showing retention cohorts, page funnels, and revenue metrics without writing a single query manually.
- Client reporting portal for agencies - A digital marketing agency uses ChartBrew templates to spin up branded dashboards for each client, pulling data from their Google Analytics, Stripe, and custom API endpoints and scheduling weekly snapshot emails automatically.
- Embedded analytics in a web application - A B2B SaaS company embeds live ChartBrew dashboards into their customer portal via iframe, giving each customer real-time visibility into their own usage data without building a custom analytics module.
- Operations monitoring across microservices - A DevOps team connects ChartBrew to a ClickHouse analytics database and multiple REST APIs to build a unified ops dashboard tracking error rates, latency distributions, and deployment frequencies from several systems in one view.
- Customer success KPI tracking - A customer success team uses the Stripe and Customer.io plugins to monitor MRR, churn indicators, and email engagement side by side, setting up alert thresholds that trigger Slack notifications when key metrics drop.
Under The Hood
Architecture
ChartBrew is organized as a two-package monorepo — a React client and an Express server — without a build orchestration tool like Lerna, relying instead on separate package.json files and a root-level npm run setup script. The server follows a layered architecture: Express routes delegate to controller files, which call service modules and source plugins, with Sequelize models providing the database abstraction. The AI orchestrator sits as a distinct module within the server that coordinates OpenAI function-calling across a defined toolset (query generation, chart creation, dataset management), emitting progress events over WebSockets so the client can render streaming feedback. Source connectors are isolated as plugin packages under sources/plugins/, each implementing a standard interface for connection validation, schema discovery, query execution, and AI query generation, which decouples the core runtime from any particular database dialect. BullMQ queues power all asynchronous workloads — scheduled refreshes, snapshot generation, and alert evaluation — with Redis serving as both the queue broker and the short-lived chart cache.
Tech Stack
The frontend is a React 18 single-page application bundled with Vite, styled with Tailwind CSS, and built on the HeroUI v3 component library with Framer Motion animations. Chart rendering is handled by Chart.js via react-chartjs-2, extended with chartjs-chart-matrix and chartjs-plugin-datalabels; the Monaco editor provides a full IDE-grade query editing experience. Redux Toolkit manages global state alongside TanStack Table for complex data grids, and date-fns handles all temporal operations. The server runs on Node.js 22 with Express, Sequelize ORM connected to MySQL or PostgreSQL, Redis for caching and queue brokerage, BullMQ for background job processing, Socket.io for real-time client communication, and the OpenAI Node SDK for AI orchestration. ClickHouse is accessed through the official @clickhouse/client package, and Helmet, CORS, and custom SSRF-mitigation middleware harden the HTTP layer.
Code Quality The test suite is comprehensive and layered: Vitest unit tests cover chart runtime filters, data extraction logic, variable application, and AI conversation ownership; Supertest integration tests exercise route-level behavior including public chart access policies, connection security, dataset project scoping, and CDC bindings; and Playwright end-to-end tests cover full browser workflows. Test isolation is enforced through Testcontainers — spinning up real database containers per test run — and a factory pattern generates deterministic fixtures. Error handling is structured throughout the server with explicit HTTP status codes, custom error messages, and middleware-level validation. Security testing is particularly thorough: dedicated test files verify SSRF mitigation for private-network API calls, password hashing correctness, token rotation, and AST-level validation of MongoDB queries. Oxlint enforces code style on the server side.
What Makes It Unique The AI orchestrator is ChartBrew’s most architecturally distinctive feature: rather than a simple prompt-to-SQL translator, it is a stateful multi-step agent that uses OpenAI function-calling to list available connections, retrieve schema, generate and validate queries, run them, interpret results, suggest chart types, and then materialize a complete chart or dashboard through the same API used by human users. Each source plugin exposes AI capability metadata so the orchestrator knows which connectors support natural-language query generation and which support template-based data planning — making the AI layer source-aware rather than generic. The variable-binding system allows viewers to parameterize dashboard queries without accessing the underlying query editor, and the formula engine lets non-technical users build calculated metrics on top of existing datasets, bridging the gap between raw data access and business-facing reporting without requiring a separate BI semantic layer.
Self-Hosting
ChartBrew is released under the Functional Source License v1.1 with an MIT future license (FSL-1.1-MIT). In plain terms: you can self-host, modify, and use ChartBrew freely for personal projects or for internal company use, including embedding its dashboards in commercial SaaS products you build. What the license prohibits is offering ChartBrew itself as a hosted service to paying customers — reselling managed ChartBrew instances or building a client-facing reporting platform where ChartBrew is the primary product requires a separate commercial license from the ChartBrew team. Each released version transitions to a standard MIT license two years after its publication date, at which point that version becomes fully open-source with no restrictions.
Self-hosting ChartBrew carries genuine operational overhead. The stack requires MySQL or PostgreSQL (version 12.5+ for Postgres, version 5+ for MySQL), Redis 6+, and Node.js 22 — all of which need to be provisioned, monitored, backed up, and patched independently. The recommended deployment path is Docker Compose, and a one-click DigitalOcean Marketplace droplet is available for teams who want a faster start. However, you are fully responsible for uptime, database migrations (managed through Umzug/Sequelize), SSL termination, secret rotation (ChartBrew uses AES-256 encryption for connection credentials and requires a 32-byte key you generate and manage), and scaling the BullMQ worker layer when scheduled job volume grows. The application has no built-in high-availability mode for the scheduler or cache, so Redis and database redundancy must be arranged at the infrastructure level.
The managed cloud offering at chartbrew.com removes these operational concerns in exchange for a subscription fee. The cloud tier includes managed uptime, automatic upgrades to new versions, built-in backups, and access to ChartBrew support channels. Self-hosters rely on the GitHub issue tracker, Discord community, and the docs at docs.chartbrew.com. The cloud product also gains new features first — particularly the AI assistant capabilities, which require the operator to supply their own OpenAI API key in the self-hosted configuration — so teams that want AI-powered dashboards need to manage that dependency and its associated costs separately.
Related Apps
Supabase
Developer Tools · Databases · Search
The open-source Postgres development platform that replaces Firebase with authentication, real-time APIs, edge functions, storage, and vector embeddings — all built on PostgreSQL.
Supabase
Apache 2.0Grafana
Monitoring · Analytics
The open-source observability platform that unifies metrics, logs, and traces from any data source into dynamic, queryable dashboards.
Grafana
AGPL 3.0OpenBB
Databases · Analytics · Invoicing Finance
The AI Workspace for Finance: Connect Data, Run AI Agents, Build Analytics