|
1 | | ---- |
2 | | -layout: home |
3 | | - |
4 | | -hero: |
5 | | - name: DAC |
6 | | - text: Dashboard-as-Code |
7 | | - tagline: Define, validate, and serve dashboards from YAML and TSX. Embedded frontend, Bruin-powered query execution. |
8 | | - actions: |
9 | | - - theme: brand |
10 | | - text: Get Started |
11 | | - link: /getting-started/installation |
12 | | - - theme: alt |
13 | | - text: View on GitHub |
14 | | - link: https://github.com/bruin-data/dac |
15 | | - |
16 | | -features: |
17 | | - - title: YAML & TSX |
18 | | - details: Define dashboards in plain YAML for simplicity, or TSX for full programmatic control with loops, variables, and load-time queries. |
19 | | - - title: 17 Chart Types |
20 | | - details: Line, bar, area, pie, scatter, bubble, combo, histogram, boxplot, funnel, sankey, heatmap, calendar, sparkline, waterfall, XMR, and dumbbell. |
21 | | - - title: Semantic Layer |
22 | | - details: Declare metrics and dimensions once, reference them across widgets. DAC generates the SQL for you. |
23 | | - - title: Jinja Templating |
24 | | - details: Dynamic SQL with filter variables, conditionals, and loops. Queries react to user-selected filters in real time. |
25 | | - - title: Live Reload |
26 | | - details: Edit your YAML or TSX, save, and see changes instantly in the browser. No restart needed. |
27 | | - - title: Single Binary |
28 | | - details: Go backend with embedded React frontend. DAC ships as one binary, while query execution uses the Bruin connections you already manage. |
29 | | - - title: Static Export |
30 | | - details: Build self-contained HTML dashboards with baked-in query results. Deploy anywhere — no server required. |
31 | | - - title: Google Slides Export |
32 | | - details: Export dashboards to Google Slides presentations with charts rendered as images and data baked in. |
33 | | ---- |
| 1 | +# Overview |
| 2 | + |
| 3 | +DAC (**D**ashboard-**a**s-**C**ode) is a tool for defining, validating, and serving data dashboards from version-controlled source files. |
| 4 | +- Build dashboards in YAML or TSX, executed against your existing [Bruin](https://github.com/bruin-data/bruin) connections, and rendered through an embedded React frontend that ships in a single Go binary |
| 5 | +- Supports 17+ chart types, interactive filters, a semantic layer for reusable metrics, and validation tools to catch errors before they reach **production** |
| 6 | +- [Semantic layer](/dashboards/semantic-layer). Define metrics and dimensions once in `semantic/`, reference them from any widget. DAC generates the SQL. |
| 7 | +- A single binary deployment that can run locally, on a server, or be exported as static HTML for hosting anywhere |
| 8 | +- Designed for use by both humans and AI agents, with a focus on reviewable, reproducible, and composable dashboard definitions |
| 9 | +- Supports all the major databases: Postgres, MySQL, Snowflake, BigQuery, Redshift, Databricks, and more via [Bruin](https://github.com/bruin-data/bruin) |
| 10 | +- Interactive [filters](/dashboards/filters). Date pickers, dropdowns, multiselects, and search inputs that inject into SQL via [Jinja templating](/dashboards/queries) and re-run affected widgets in place. |
| 11 | +- Dynamic charts, tabs, loops and conditionals with TSX |
| 12 | +- Built-in AI agent via Codex: chat with your dashboard live and get it updated |
| 13 | + |
| 14 | +```tsx |
| 15 | +export default ( |
| 16 | + <Dashboard name="Simple Dashboard" connection="my_db"> |
| 17 | + <Row> |
| 18 | + <Metric |
| 19 | + name="Total Revenue" |
| 20 | + col={4} |
| 21 | + sql="SELECT SUM(amount) AS value FROM sales" |
| 22 | + column="value" |
| 23 | + prefix="$" |
| 24 | + format="number" |
| 25 | + /> |
| 26 | + <Chart |
| 27 | + name="Revenue Over Time" |
| 28 | + chart="area" |
| 29 | + col={8} |
| 30 | + sql={` |
| 31 | + SELECT |
| 32 | + STRFTIME(DATE_TRUNC('month', created_at), '%Y-%m') AS month, |
| 33 | + SUM(amount) AS revenue |
| 34 | + FROM sales |
| 35 | + GROUP BY 1 |
| 36 | + ORDER BY 1 |
| 37 | + `} |
| 38 | + x="month" |
| 39 | + y={["revenue"]} |
| 40 | + /> |
| 41 | + </Row> |
| 42 | + </Dashboard> |
| 43 | +) |
| 44 | +``` |
| 45 | + |
| 46 | +DAC is meant to be a tool to be used heavily by AI agents, such as Claude Code, Codex, or OpenCode. You can install the DAC skill via `dac skills install` and ask your agents to build you a dashboard. DAC gives your agents an easy way to build and validate their work on the dashboards. |
| 47 | + |
| 48 | + |
| 49 | +## What is DAC? |
| 50 | + |
| 51 | +A dashboard is a `.yml` or `.dashboard.tsx` file in your repo. You describe widgets, queries, filters, and layout. DAC validates the definition, runs the queries against the connection you've configured, and serves an interactive dashboard at `localhost:8321`. |
| 52 | + |
| 53 | +There is no GUI builder, no visual editor, and no separate dashboard service to operate. The source file is the source of truth — review it in pull requests, deploy it like any other code. |
| 54 | + |
| 55 | +```yaml |
| 56 | +schema: https://getbruin.com/schemas/dac/dashboard/v1 |
| 57 | +name: Sales Overview |
| 58 | +connection: warehouse |
| 59 | + |
| 60 | +rows: |
| 61 | + - widgets: |
| 62 | + - name: Revenue |
| 63 | + type: metric |
| 64 | + sql: SELECT SUM(amount) AS value FROM sales |
| 65 | + column: value |
| 66 | + prefix: "$" |
| 67 | + col: 4 |
| 68 | +``` |
| 69 | +
|
| 70 | +
|
| 71 | +- **Two authoring formats.** YAML for declarative dashboards. [TSX](/dashboards/tsx) when you need loops, variables, conditionals, or queries that resolve at load time to drive layout. |
| 72 | +- **17 chart types.** Line, bar, area, pie, scatter, bubble, combo, histogram, boxplot, funnel, sankey, heatmap, calendar, sparkline, waterfall, XMR, dumbbell — plus metrics, tables, text, images, and dividers. |
| 73 | +- **[Semantic layer](/dashboards/semantic-layer).** Define metrics and dimensions once in `semantic/`, reference them from any widget. DAC generates the SQL. |
| 74 | +- **Live reload.** Edit the file, save, see the change. No restart, no rebuild. |
| 75 | +- **Static export.** `dac build` produces self-contained HTML with query results baked in. Deploy to S3, GitHub Pages, anywhere — no runtime server needed. |
| 76 | +- **[Google Slides export](/commands/export).** Render dashboards as slide decks with charts as images and data baked in. |
| 77 | +- **Validation in CI.** `dac validate` and `dac check` catch broken queries, missing columns, and schema violations before they reach production. |
| 78 | + |
| 79 | +## Why DAC Exists |
| 80 | + |
| 81 | +Existing dashboarding tools — Looker, Metabase, Tableau, Mode — make dashboards a database row. They live in a hosted service, get edited through a UI, and can't be reviewed, diffed, or rolled back like code. Multiple people clicking through the same UI produces drift you can't see until something breaks. |
| 82 | + |
| 83 | +DAC treats dashboards as plain text: |
| 84 | + |
| 85 | +- **Diffable.** Every change shows up in `git diff`. PR review actually works. |
| 86 | +- **Reproducible.** The same source file produces the same dashboard on every machine. No "works in my workspace." |
| 87 | +- **Composable.** Define a metric once in the semantic layer, reuse it across dashboards. Loop over a list of tables in TSX to generate dozens of similar views from one definition. |
| 88 | +- **Portable.** One Go binary. Connections come from `.bruin.yml`, which you already have if you use Bruin pipelines. Static export means dashboards can live anywhere a static site can. |
| 89 | +- **Honest.** What you see in the file is what runs. There is no hidden state in a service somewhere. |
| 90 | + |
| 91 | +If your data pipelines, models, and tests live in version control, your dashboards should too. |
| 92 | + |
| 93 | +## Next Steps |
| 94 | + |
| 95 | +- [Install DAC](/getting-started/installation) and run the [quickstart](/getting-started/quickstart). |
| 96 | +- Read the [Dashboard Overview](/dashboards/overview) for the full authoring model. |
| 97 | +- Browse the [command reference](/commands/overview). |
0 commit comments