Open source · no build step
AI-generated dashboards, safe to embed¶
BI Components are HTML tags like <bar-chart> that a language model can write for your users, or that you can drop into a static page.
A dashboard is a few lines of HTML¶
This is the whole source of the dashboard below. It is live: click a bar to filter the rest, Ctrl / Cmd + click to select several.
<source-table name="orders" url="orders.csv" date-column="date"></source-table>
<score-card title="Revenue" table="orders" measure="sum(revenue)" format="eur"></score-card>
<score-card title="Orders" table="orders" measure="count(*)" format="int"></score-card>
<score-card title="Average order" table="orders" measure="avg(revenue)" format="eur"></score-card>
<bar-chart table="orders" measure="sum(revenue)" by="country" order_by="sum(revenue) desc" format="eur"></bar-chart>
<line-chart table="orders" measure="sum(revenue)" by="date_trunc('month', date)" breakdown-by="channel" format="eur"></line-chart>
<script type="module" src="https://unytics.io/bi-components/src/connectors/duckdb-wasm.js"></script>
<script type="module" src="https://unytics.io/bi-components/src/components/source_tables.js"></script>
<script type="module" src="https://unytics.io/bi-components/src/components/echarts.js"></script>
<script type="module" src="https://unytics.io/bi-components/src/components/score_cards.js"></script>
No build step, no framework: the page above queries a CSV file with DuckDB-WASM inside your browser.
Made for generated dashboards¶
-
A grammar a model gets right
A dozen declarative tags and a handful of attributes. The system prompt that teaches them fits on one screen.
-
A sandbox for what it writes
Generated HTML and JavaScript run in an isolated frame with no network access. They cannot read your application, its cookies or its tokens.
-
A semantic layer, or direct queries
Give the model the names of your measures (
revenue,margin_rate), or let it write SQL expressions on tables you expose. Either way your application checks every request before it runs. -
The viewer's rights, always
Every query is validated and answered by your application, which applies row-level security for the person looking at the dashboard.
-
Custom charts, contained
When no component fits, the model writes a script with ECharts and the same data access as the components. It runs in the same sandbox.
-
Errors that correct themselves
A refused query shows its reason in the component. Send that text back to the model and the next version is fixed.
The playground shows the result: a chat on the left, the dashboards it produced on the right, and the HTML behind each of them.
Two ways to run the same components¶
| Where queries run | Use it for | |
|---|---|---|
| Standalone | In the browser, with DuckDB-WASM, on Parquet / CSV / JSON files | Static sites, documentation, reports, data apps without a backend. Get started |
| Embedded in your application | In your backend, through a sandboxed frame and a small Host | Dashboards generated or written by your users, on your own engine and access rules. Embed in your app |
Open source¶
BI Components is MIT licensed, on GitHub, and made by Unytics. It is built on Apache ECharts, DuckDB-WASM and standard Web Components.
