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 underschemas/**. - The local serving path keeps Go API behavior and the frontend client compatible; changes spanning
cmd/**, server packages, andfrontend/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, andgo.mod.
Routing table
-
cmd/root.go, cmd/*.go -> CLI platform and command architecture
-
cmd/init*.go, cmd/build*.go, cmd/validate*.go, cmd/check*.go, cmd/list*.go, cmd/skills*.go, cmd/upgrade*.go,
cmd/skill_templates/**-> Project lifecycle commands -
cmd/query*.go, cmd/connections*.go -> Query and connection commands
-
cmd/serve*.go, cmd/export*.go, cmd/import*.go -> Dashboard CLI operations
-
pkg/dashboard/**,pkg/project/**-> Dashboard domain model and pipeline -
pkg/dashboard/**,pkg/project/**, *.yaml, *.yml, *.tsx -> Dashboard definition lifecycle -
pkg/query/**,pkg/semantic/**-> Dashboard queries and semantic modeling -
pkg/export/**,pkg/dashboard/**, cmd/export*.go -> Dashboard rendering and export -
pkg/theme/**,themes/**,templates/**-> Dashboard theming and templating -
cmd/serve*.go,
pkg/server/**,frontend/**-> Local server and web experience -
pkg/server/**, cmd/serve*.go,frontend/dist/**-> Local server APIs and live reload -
frontend/src/**, frontend/index.html, frontend/vite.config.ts -> Frontend dashboard experience -
frontend/src/components/widgets/**,frontend/src/components/**/export*,frontend/src/**/csv*-> Frontend widgets and export interactions -
frontend/mcp/**, frontend/vite.mcp.config.ts, frontend/tsconfig.app.json -> MCP dashboard tooling -
pkg/import/**,pkg/export/**, cmd/import*.go, cmd/export*.go -> Interoperability and declarative contracts -
pkg/import/**,pkg/export/**, cmd/import*.go, cmd/export*.go -> Project import and export conversion -
schemas/**,pkg/**schema*, *.schema.json -> Declarative dashboard and theme schemas -
.github/workflows/**,Makefile,go.mod,go.sum-> Platform operations and delivery -
cmd/version*.go, cmd/upgrade*.go,
pkg/**telemetry*,pkg/**update*-> Updates, versioning, and telemetry