Introducing a new way to review your PRs.

Read the announcement

bruin-data / dac

DaC is a dashboard-as-code tool. Build interactive dashboards using YAML and JSX. Built-in semantic layer. Get your agents to build standardized, reviewable dashboards.

View on GitHub

20 documents · Updated Nov 23, 2026

overview

Knowledge Base updated: 2026-11-22

DAC knowledge base

DAC is a Go-based data and analytics CLI for defining projects, querying configured backends, and serving or exporting dashboards. Its command layer coordinates project configuration, dashboard domain services, and local delivery workflows.

Dashboard definitions, themes, semantic models, and project configuration are declarative project state. The Go server loads and validates that state, executes semantic queries, and exposes it to the embedded React application and export paths.

The repository also contains the frontend dashboard experience, MCP-specific frontend artifacts, declarative schemas and import/export adapters, plus CI and release automation for distributing the CLI.

flowchart TD
  User[CLI user] --> CLI[cmd Cobra commands]
  CLI --> Project[DAC project configuration]
  CLI --> Server[Local dashboard server]
  CLI --> Query[pkg/query semantic query service]
  Project --> Definitions[Dashboard and theme definitions]
  Definitions --> Domain[Dashboard domain model]
  Domain --> Query
  Query --> Backends[Configured data backends]
  Server --> Domain
  Server --> API[HTTP and semantic APIs]
  API --> Web[Embedded React dashboard]
  Web --> Widgets[Chart, table, metric, text widgets]
  CLI --> Export[Dashboard export paths]
  Domain --> Export
  MCP[MCP frontend artifacts] --> Web
  CI[CI and release workflows] --> CLI

Glossary

  • DAC project — the project directory and configuration consumed by CLI and dashboard workflows.
  • Semantic query — a dashboard-facing request resolved through semantic models before reaching a configured backend.
  • Widget — a typed dashboard presentation unit such as a chart, table, metric, or text block.
  • MCP dashboard tooling — dedicated frontend dashboard and theme artifacts built for machine-client use.
  • Declarative contract — versioned schema-backed configuration accepted for dashboard and theme content.

Codebase-wide invariants

  • Command behavior is registered through the Cobra command hierarchy in cmd/**; new user-facing operations must be reachable from that hierarchy.
  • Dashboard-facing project content must remain valid against the loading and validation paths under pkg/** and the embedded schemas under schemas/**.
  • The local serving path keeps Go API behavior and the frontend client compatible; changes spanning cmd/**, server packages, and frontend/src/** must preserve their request and reload contracts.
  • Frontend production and MCP-specific builds use their respective package and Vite configuration under frontend/package.json and frontend/vite*.config.ts.
  • Delivery changes must preserve automated build and release behavior defined by .github/…/*.yml, Makefile, and go.mod.

Routing table