FastBI is an open-source business-intelligence tool built with FastHTML — a server-side, HTMX-driven port of the core of Frappe Insights. Python-first, no JavaScript framework: a synthetic data warehouse, saved queries that render Plotly charts, dashboards, a SQL lab, and an AI text-to-SQL assistant.
Live at fastbi.org.
Ask your data anything. Runs on port 5008.
Synthetic data only. Everything runs on a deterministic, fully synthetic retail sales warehouse generated by
seed.py.
Captured views: desktop landing, mobile landing, and integrations and migrations.
python -m venv .venv
.venv/bin/python -m pip install -r requirements.txt
cp .env.sample .env # add an LLM key to enable AI text-to-SQL
.venv/bin/python web_app.py # http://localhost:5008 (self-seeds on first boot)Set FASTBI_ADMIN_EMAIL and FASTBI_ADMIN_PASSWORD in the ignored .env for
local password sign-in, or configure Google SSO. Rebuild the warehouse with
.venv/bin/python seed.py.
docker compose up --build # http://localhost:5008Dockerfile (python:3.12-slim, port 5008) seeds on first boot;
docker-compose.yml mounts a fastbi-data volume at /data.
- Home (
/) — KPI cards (revenue, margin, AOV, customers) + two flagship Plotly charts + dashboard links. - Dashboards (
/dashboards) — curated boards of charts in a responsive grid. - Queries & Charts (
/queries) — saved SQL queries, each bound to a chart type; open one for the chart, the SQL, and the result table. - SQL Lab + Ask AI (
/sql) — run read-only SQL against the warehouse, or describe what you want in plain English and the AI writes the SQL, runs it, and charts the result. The schema is shown alongside. - Data Source (
/sources) — browse the warehouse tables with row counts and samples. - Integrations (
/integrations) — pull a bounded public schema or catalogue endpoint for Microsoft Fabric/OneLake, BigQuery, Redshift, Snowflake, Databricks, or a major SQL database. - Migrations (
/migrations) — upload Power BI, Tableau, Looker, report definition, PDF, or screenshot artefacts and generate an editable dashboard grounded in a selected schema. WithXAI_API_KEYconfigured, PNG/JPEG report screenshots are interpreted by the multimodal model before generation. - AI Assistant (right rail) — metric Q&A grounded in a live data summary;
slash-commands
/metrics/tables/topwork with no API key.
The SQL Lab's Ask the data box sends your question plus the live warehouse
schema to the configured LLM, which returns a single SQL query. That query is
run through db.run_sql() — which enforces a single read-only SELECT
(no INSERT/UPDATE/DELETE/DDL, single statement) — and the result is rendered as
a chart and table. The model never touches the database directly.
MODEL_PROVIDER=xai # xai | openai | anthropic | google
MODEL_NAME=grok-4.5
XAI_API_KEY=...Without a key, dashboards, saved queries, the SQL lab, and slash-commands all still work — only AI generation is disabled.
web_app.py routes, auth, SQL-run + AI-SQL endpoints, SSE chat, boot
db.py warehouse + app schema, read-only run_sql() guard
seed.py synthetic retail star schema + saved queries/charts/dashboards
web/charts.py Plotly chart + result-table rendering
web/layout.py 3-pane shell, CSS, chat JS
web/views.py page renderers
web/integrations.py schema import and report migration workflows
web/ai.py grounded chat, slash-commands, text_to_sql()
See SKILLS.md for the capability reference + migration playbook, and docs/ROADMAP.md for the comparison vs Frappe Insights.
MIT. Part of the
fasthtml-oss-migrations
initiative.
