Show HN: DAC – open-source dashboard as code tool for agents and humans (github.com)
When agents became a reality one of the first things I wanted to do was to automate building dashboards. The first, and the most obvious, wall that I ran into was that a lot of the tools were just driven by UI. This meant that without the agents handling browser UIs and whatnot, it wasn't possible to have the agents do that. In addition, it would be impossible to review any of the changes the agent would make.
The first instinct there is to get your agent to build a React app for the dashboard. This works beautifully for the happy path, but I quickly ran into other issues there: - every dashboard turns out to be different - have to implement a backend to centralize the query execution - there is no centralized mechanism to control the rules and standards around visualizations - there is no way to get a semantic layer working with the dashboards easily
In the end, agents ended up reinventing the wheel for every new dashboard, even under the same project. Building a standardized, local project for these turned out to be building a BI tool from scratch.
After trying these out, I asked myself: what if the dashboards were built for agents as the primary user?
A product like that would need to have a couple of features: - First of all, everything needs to be driven by version-controllable text. YAML is fine. - Changes to the dashboards should be easy to review and understand by humans. - Agents are great at writing code, it'd be great if this were driven by code to have dynamic stuff: JSX would be great. - Static analysis being a first-class citizen: validate dashboards before deploying. Agents can check their work too. - A standardized way of deploying these based on a couple of files in a folder: operationally very simple. - Built-in semantic layer to standardize metrics.
That's what I ended up building: dac (Dashboard-As-Code) is an open-source tool and a spec to define dashboards, well, as code. It contains an implementation in Go that can be deployed as a single binary anywhere. The dashboards are defined in YAML and JSX, YAML for static stuff, JSX for dynamic dashboards. You can run queries at load time to define conditional charts, generate tabs on the fly per customer, or list charts for each A/B test you are running.
I built it in Go because I do love Go, and I think it is the greatest language at the moment to work with AI agents.
dac runs as a single binary, you can get started with a `dac init` command and it'll automatically create some sample dashboards for you based on duckdb. It supports 10+ SQL backends, with more to come. It supports validation, custom themes and whatnot.
You can see it here: https://github.com/bruin-data/dac
I would love to hear what can be improved here, please let me know your thoughts.
25 comments
[ 2.1 ms ] story [ 57.0 ms ] threadYours sincerely, came here for another DAC
Some that come to mind that are potentially tangentially related/similar:
https://github.com/evidence-dev/evidence
[0] https://vega.github.io/vega-lite/
(I know why: for a platform it’s simpler to parse a yaml than to run code, but it’s almost never a good idea for anything that needs to scale in complexity)
For a while, I was thinking about starting a side project of selling E-ink screens with easily configured dashboards. The project would support hobbies who want to build dashboards powered by a raspberry pi or something. I never pursued it, but it seems like you are now halfway there.
Like imagine you have a site and there’s blank canvas. It has access to some data in the background. The user might be like “build a dashboard showing YoY performance of X and break down the shipments in a table by Y and Z”. Then the agent builds it and persists it such that when they log out and log back in they can see their custom dashboard they assembled themselves.
The two big areas that could use some docs/work: - Auth (one company was healthtech, so we needed auth even on VPN. The other didn't have a VPN so we needed auth) - Hosting: If it just needs to be run in a container and it doesn't need to be restarted that's fine. Though if there isn't a hosting document it's often a sign of a service that will need someone to keep it running all the time