Dashboards as code
Dashboards as code is the practice of defining a dashboard as a versioned, schema-validated document, so every query, chart, layout position, and color is a named property you can read, diff, review, and roll back like source code.
The alternative is the model most BI tools still use: a dashboard is whatever the editor saved after a series of clicks, stored in a format only the vendor’s renderer understands. Nothing outside that tool can read it, so nothing can review a change to it or explain why a number moved last Tuesday.
How it works in dvt
Every dvt dashboard is a JSON dashboard spec, and that spec is the only thing the renderer reads. A person editing in the browser, an agent writing over MCP, and a script calling the REST API all change the same document. Here is one complete panel:
{ "id": "revenue-by-month", "title": "Revenue by month", "type": "chart:bar",
"data": { "rows": [{ "month": "Jan", "revenue": 120 }, { "month": "Feb", "revenue": 150 }] },
"spec": { "series": [{ "type": "bar", "barMaxWidth": 48 }] } }
Change barMaxWidth and the bars change; there is no hidden setting elsewhere. Because the dashboard is a document, every save becomes a revision with a diff and an author, every write is validated against the schema first, and any version can be restored.