메뉴
HN
Hacker News 31일 전

오픈소스 대시보드 도구 DAC: 코드와 AI로 대시보드 제작

IMP
8/10
핵심 요약

에이전트와 개발자 모두를 위해 설계된 오픈소스 대시보드-as-코드(Dashboard-as-Code) 도구인 DAC(으)로 YAML과 TSX를 사용해 동적 대시보드를 정의하고 제공할 수 있습니다. 내장된 AI 에이전트를 통해 실시간으로 대시보드와 채팅하며 수정할 수 있으며, 주요 데이터베이스를 지원하고 한 번 정의된 지표를 재사용할 수 있는 시맨틱 레이어(Semantic Layer)를 갖추고 있어 실무 개발 생산성을 크게 높일 수 있습니다.

번역된 본문

DAC는 YAML과 TSX를 통해 대시보드를 정의, 검증 및 제공하는 대시보드-as-코드(Dashboard-as-Code) 도구입니다. TSX를 사용하여 동적 차트, 탭, 루프 및 조건부 렌더링을 구현할 수 있습니다.

Codex를 통한 내장 AI 에이전트: 대시보드와 실시간으로 채팅하며 즉시 업데이트할 수 있습니다. Bruin을 통해 Postgres, MySQL, Snowflake, BigQuery, Redshift, Databricks 등 모든 주요 데이터베이스를 지원합니다.

내장 시맨틱 레이어(Semantic Layer): semantic/ 디렉토리에 지표와 차원을 한 번만 정의하면, 모든 위젯에서 이를 참조할 수 있습니다. DAC가 SQL을 자동 생성합니다. 이 도구는 AI 에이전트가 안정적이고 검토 가능한 방식으로 대시보드를 구축할 수 있도록 설계되었습니다.

TSX 예시: export default ( )

YAML 예시: name: Sales Overview connection: warehouse rows:

  • widgets:
    • name: Revenue type: metric sql: SELECT SUM(amount) AS value FROM sales column: value prefix: "$" col: 4

설치 방법 최신 안정 버전의 DAC 설치: curl -fsSL https://raw.githubusercontent.com/bruin-data/dac/main/install.sh | bash

main 브랜치의 최신 엣지(edge) 빌드 설치: curl -fsSL https://raw.githubusercontent.com/bruin-data/dac/main/install.sh | bash -s -- --channel edge

DAC는 기존의 Bruin 연결을 사용하며, 현재 쿼리 실행을 위해 bruin query를 호출합니다. 설치 스크립트는 시스템 PATH에 bruin이 없는 경우, Bruin CLI를 먼저 설치합니다.

빠른 시작 새로운 스타터 프로젝트를 생성합니다: dac init my-dashboards cd my-dashboards dac validate --dir . dac serve --dir . --open

스타터에는 SQL 기반 YAML 대시보드, 시맨틱 YAML 대시보드, 그리고 semantic/ 디렉토리 하위의 시맨틱 모델이 포함되어 있습니다. dac init은 Claude와 Codex를 위한 DAC의 내장 대시보드 제작 스킬도 설치합니다: ls .claude/skills/create-dashboard/SKILL.md ls .codex/skills/create-dashboard

이미 존재하는 프로젝트의 경우, 다음 명령어를 실행하십시오: dac skills install --dir .

저장소를 클론하고 DAC를 설치한 상태라면, 포함된 예제 프로젝트를 실행해 볼 수 있습니다: dac serve --dir examples/basic-yaml

예제 저장소의 examples/ 디렉토리에는 4개의 독립적인 예제 프로젝트가 포함되어 있습니다:

  • examples/basic-yaml: 필터, SQL 쿼리 및 쿼리 파일이 포함된 표준 YAML 대시보드.
  • examples/basic-tsx: 로드 시간 쿼리를 사용하여 데이터베이스에서 레이아웃을 생성하는 TSX 대시보드.
  • examples/semantic-yaml: semantic/에서 시맨틱 모델을 읽어 백엔드에서 위젯을 컴파일하는 YAML 대시보드.
  • examples/semantic-tsx: 외부 시맨틱 모델 및 백엔드 시맨틱 쿼리 컴파일을 사용하는 TSX 대시보드.

프로젝트 구조 . ├── cmd/ CLI 진입점 ├── pkg/ 대시보드 로딩, 시맨틱 엔진, 서버, 쿼리 백엔드 ├── frontend/ DAC 바이너리에 임베드된 React 프론트엔드 ├── docs/ VitePress 문서 소스 ├── examples/ YAML, TSX 및 시맨틱 대시보드를 위한 실행 가능한 예제 프로젝트 ├── resources/ README 및 문서 에셋 └── testdata/ 테스트에 사용되는 내부 픽스처

개발 make deps make test make build make dev

주요 개발 명령어는 Makefile에 정의되어 있습니다. 프론트엔드 임베딩 및 빌드 플래그의 일관성을 유지하기 위해 임의의 go build나 npm run build 명령어 대신 Make 타겟을 사용하십시오.

원격 측정(Telemetry) DAC는 어떤 명령어가 사용되고 어디서 실패하는지 파악하기 위해 익명의 사용 이벤트를 전송합니다. 각 이벤트에는 명령어 이름, 실행 시간, OS/아키텍처, DAC 버전, 그리고 ~/.dac/telemetry.json에 저장된 익명 설치 ID가 포함됩니다.

당사는 다음 정보를 수집하지 않습니다:

  • SQL 쿼리, 쿼리 결과 또는 행(row) 수
  • 대시보드 또는 위젯의 내용, 이름 또는 파일 경로
  • 연결 이름, 호스트, 자격 증명, 프로젝트 ID 또는 데이터세트 이름
  • 모든 환경 변수 또는 쉘 기록

원격 측정을 비활성화하려면 다음 환경 변수 중 하나를 설정하십시오: export TELEMETRY_OPTOUT=1

또는 산업 표준:

export DO_NOT_TRACK=1

원격 측정 쓰기 키가 없는 빌드(make build의 기본값)는 아무것도 전송하지 않습니다.

문서 문서 소스: docs/ 예제 프로젝트: examples/

원문 보기
원문 보기 (영어)
DAC DAC is a Dashboard-as-Code tool for defining, validating, and serving dashboards from YAML and TSX. Dynamic charts, tabs, loops and conditionals with TSX. Built-in AI agent via Codex: chat with your dashboard live and get it updated. Supports all the major databases: Postgres, MySQL, Snowflake, BigQuery, Redshift, Databricks, and more via Bruin Built-in semantic layer: define metrics and dimensions once in semantic/ , reference them from any widget. DAC generates the SQL. It is built for AI agents to build dashboards in a reliable and reviewable way. TSX YAML export default ( < Dashboard name = "Simple Dashboard" connection = "my_db" > < Row > < Metric name = "Total Revenue" col = { 4 } sql = "SELECT SUM(amount) AS value FROM sales" column = "value" prefix = "$" format = "number" /> </ Row > </ Dashboard > ) name : Sales Overview connection : warehouse rows : - widgets : - name : Revenue type : metric sql : SELECT SUM(amount) AS value FROM sales column : value prefix : " $ " col : 4 Install Install the latest stable DAC release: curl -fsSL https://raw.githubusercontent.com/bruin-data/dac/main/install.sh | bash Install the latest edge build from main : curl -fsSL https://raw.githubusercontent.com/bruin-data/dac/main/install.sh | bash -s -- --channel edge DAC uses your existing Bruin connections and currently shells out to bruin query for query execution. The install script installs the Bruin CLI first when bruin is not already available on your PATH . Quickstart Create a new starter project: dac init my-dashboards cd my-dashboards dac validate --dir . dac serve --dir . --open The starter includes a SQL-backed YAML dashboard, a semantic YAML dashboard, and a semantic model under semantic/ . dac init also installs DAC's bundled dashboard authoring skill for Claude and Codex: ls .claude/skills/create-dashboard/SKILL.md ls .codex/skills/create-dashboard For existing projects, run dac skills install --dir . . If you cloned the repository and have dac installed, you can also run one of the bundled example projects: dac serve --dir examples/basic-yaml Examples The repository includes four self-contained example projects under examples/ : Example What it shows examples/basic-yaml A standard YAML dashboard with filters, SQL queries, and query files. examples/basic-tsx A TSX dashboard that uses load-time queries to generate layout from the database. examples/semantic-yaml A YAML dashboard that reads semantic models from semantic/ and compiles widgets in the backend. examples/semantic-tsx A TSX dashboard using external semantic models and backend semantic query compilation. Project Layout . ├── cmd/ CLI entrypoints ├── pkg/ Dashboard loading, semantic engine, server, query backends ├── frontend/ React frontend embedded into the DAC binary ├── docs/ VitePress documentation source ├── examples/ Runnable example projects for YAML, TSX, and semantic dashboards ├── resources/ README and documentation assets └── testdata/ Internal fixtures used by tests Development make deps make test make build make dev The main development commands are defined in the Makefile . Use make targets rather than ad-hoc go build or npm run build commands so frontend embedding and build flags stay consistent. Telemetry DAC sends anonymous usage events to help us understand which commands are used and where they fail. Each event includes the command name, run duration, OS/architecture, DAC version, and an anonymous install ID stored at ~/.dac/telemetry.json . We do not collect: SQL queries, query results, or row counts Dashboard or widget contents, names, or file paths Connection names, hosts, credentials, project IDs, or dataset names Any environment variables or shell history To disable telemetry, set either of these environment variables: export TELEMETRY_OPTOUT=1 # or the industry-standard: export DO_NOT_TRACK=1 Builds without a telemetry write key (the default for make build ) are silent and send nothing. Documentation Docs source: docs/ Example projects: examples/ Contribution guide: CONTRIBUTING.md Security policy: SECURITY.md License AGPL-3.0-only. See LICENSE .