{"id":51118562,"url":"https://github.com/weiwenda/effect-bi","last_synced_at":"2026-06-25T00:00:50.219Z","repository":{"id":356258104,"uuid":"1215097925","full_name":"WeiWenda/effect-bi","owner":"WeiWenda","description":"一站式报表平台","archived":false,"fork":false,"pushed_at":"2026-05-16T10:56:30.000Z","size":3718,"stargazers_count":31,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-16T12:42:42.277Z","etag":null,"topics":["bi","businessintelligence","dashboard","data-visualization","dataease","metabase","superset"],"latest_commit_sha":null,"homepage":"https://zread.ai/WeiWenda/effect-bi","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WeiWenda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-19T13:31:38.000Z","updated_at":"2026-05-16T10:56:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/WeiWenda/effect-bi","commit_stats":null,"previous_names":["weiwenda/effect-bi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WeiWenda/effect-bi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WeiWenda%2Feffect-bi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WeiWenda%2Feffect-bi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WeiWenda%2Feffect-bi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WeiWenda%2Feffect-bi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WeiWenda","download_url":"https://codeload.github.com/WeiWenda/effect-bi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WeiWenda%2Feffect-bi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34753781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bi","businessintelligence","dashboard","data-visualization","dataease","metabase","superset"],"created_at":"2026-06-25T00:00:49.407Z","updated_at":"2026-06-25T00:00:50.209Z","avatar_url":"https://github.com/WeiWenda.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Effect BI · 数据工作台\n\n面向分析型数据栈的一体化前端：**对话（LangGraph）**、**血缘（Neo4j）**、**Cube 语义层**、**可视化查询与看板**、**ETL / Airflow** 等，由 **React + Vite** 与 **`backend/node`（Express）** 承载主 API；**`backend/langgraph`** 为独立 FastAPI 子模块（Git submodule）。产品与技术说明见 **[docs/README.md](docs/README.md)**。\n\n## 平台使用指南\n\n报表开发典型流程：**数据转换 → 指标语义层建模 → 可视化查询出图 → 看板配置**\n\n### 1 · 数据与任务（`/etl`）\n\n![ETL：任务开发、依赖与调度相关能力](public/etl.png)\n\n在 ETL 模块维护任务与版本、配置运行依赖（上游表 / 分区），并与调度侧衔接，保证报表所需表与分区持续就绪。\n\n![Ad-hoc：页内 SQL 调试与结果回溯](public/adhoc.png)\n\n同一模块内可使用 **Ad-hoc** 对 Gravitino 目录下的表做即席查询，便于加工或排查数据后再进入语义层。\n\n### 2 · 指标语义层建模（`/cube`）\n\n![Cube：画布建模与动态模型发布](public/cube.png)\n\n在 Cube 画布中拖拽事实 / 维度表、声明度量与维度，发布为可供查询页消费的 **Cube View**（支持版本化与回滚）。\n\n### 3 · 可视化查询（`/query`）\n\n![可视化查询：选择 View、维度 / 指标与图表类型](public/query.png)\n\n选择已发布的 View，配置维度、指标、过滤与排序，即时出图；满意后可 **Pin** 到看板。\n\n### 4 · 看板（`/dashboard`）\n\n![看板：左侧文件夹树与看板列表](public/dashboard-tree.png)\n\n进入 **`/dashboard`** 列表视图时，左侧为 **文件夹树**：可按目录收纳看板，支持展开 / 折叠、拖拽调整文件夹顺序，以及将看板拖入文件夹或根目录以整理结构（与标题拖拽移动目录的行为一致）。\n\n![看板：图表布局与看板级筛选](public/dashboard.png)\n\n打开某一看板后，阅览 Pin 下的图表，使用看板级筛选；图表侧还可按需启用动态过滤、维度下钻等能力。\n\n![看板：编辑模式下的布局与图表配置](public/dashboard-config.png)\n\n在看板编辑模式下调整网格布局、标签页与单个图表占位，完成后再保存以便阅览端使用统一的筛选与下钻体验。\n\n### （可选）血缘（`/lineage`）\n\n![血缘：表依赖与上下游理解](public/lineage.png)\n\n建模或排障时打开血缘，确认报表依赖的表、任务产出关系，再调整 ETL 或语义层。\n\n### （可选）链路治理（`/dags`）\n\n![链路治理：DAG 与运行态一览](public/monitor.png)\n\n在**报表补数**、**产出延迟**或**产出失败**等场景下，结合调度侧视图排查链路：确认相关 DAG / 任务是否已触发、运行是否成功、是否存在依赖未就绪或重试滞后，从而定位是上游数据、调度窗口还是任务本身的问题。\n\n### （可选）对话（`/chat`）\n\n![对话：LangGraph 驱动的助手界面](public/chat.png)\n\n该模块作为**预留入口**：后续可在此基础上扩展 **AI 查数**（自然语言对接语义层 / 查询）、**AI 数据开发**（辅助 SQL、ETL 与建模说明）、**AI 分析**（解读图表与指标）等能力；当前实现以对话框架与路由占位为主，具体能力与产品范围以版本说明为准。\n\n## 架构概览\n\n下图概括 **Docker Compose**（`docker-compose.stack.yaml`）下的主要组件与数据流；本地开发时由 Vite 将 `/api`、`/langgraph` 等代理到本机 Node 与 LangGraph，逻辑关系一致。\n\n```mermaid\nflowchart TB\n  subgraph client[\"浏览器\"]\n    U[用户]\n  end\n\n  subgraph app[\"Effect BI 应用\"]\n    SPA[\"React + Vite 前端\"]\n    API[\"Express · backend/node\"]\n    LG[\"FastAPI · LangGraph\"]\n  end\n\n  subgraph data[\"数据与查询\"]\n    PG[(\"PostgreSQL + pgvector\")]\n    Neo[(\"Neo4j\")]\n    Cube[\"Cube.js\"]\n    Trino[\"Trino\"]\n    Grav[\"Apache Gravitino\"]\n  end\n\n  subgraph orch[\"调度\"]\n    AF[\"Apache Airflow\"]\n  end\n\n  U --\u003e SPA\n  SPA --\u003e|/api| API\n  SPA --\u003e|/langgraph| LG\n  API --\u003e PG\n  API --\u003e Neo\n  API --\u003e Trino\n  API --\u003e Cube\n  API --\u003e AF\n  LG --\u003e PG\n  Cube --\u003e PG\n  Trino --\u003e Grav\n```\n\n\n\n更细的分层、路由表与开发期代理说明见 **[docs/README.md](docs/README.md)** 第 3 节。\n\n## 主要开源组件\n\n以下为仓库直接依赖或 **Docker Compose** 中引用的代表性开源项目（许可证以各项目官方为准；本仓库自有代码见根目录 [LICENSE](LICENSE)）。\n\n### 基础设施（容器镜像 / 外部服务）\n\n\n| 项目                                                                                           | 用途                                 |\n| -------------------------------------------------------------------------------------------- | ---------------------------------- |\n| [PostgreSQL](https://www.postgresql.org/) + [pgvector](https://github.com/pgvector/pgvector) | 业务数据、LangGraph checkpoint、Cube 仓库等 |\n| [Neo4j](https://neo4j.com/)                                                                  | 血缘图存储与查询                           |\n| [Apache Gravitino](https://gravitino.apache.org/)                                            | 元数据与 Trino 动态目录                    |\n| [Trino](https://trino.io/)                                                                   | 分布式 SQL 查询                         |\n| [Cube](https://cube.dev/)                                                                    | 语义层与 REST / SQL API                |\n| [Apache Airflow](https://airflow.apache.org/)                                                | 工作流调度 |\n\n\n### 前端（`package.json`）\n\n\n| 项目                                                                        | 用途                 |\n| ------------------------------------------------------------------------- | ------------------ |\n| [React](https://react.dev/) / [React Router](https://reactrouter.com/)    | UI 与路由             |\n| [Vite](https://vite.dev/) / [TypeScript](https://www.typescriptlang.org/) | 构建与类型              |\n| [Tailwind CSS](https://tailwindcss.com/)                                  | 样式                 |\n| [Recharts](https://recharts.org/)                                         | 图表                 |\n| [React Flow](https://reactflow.dev/)（`@xyflow/react`）                     | 画布与血缘图布局           |\n| [Assistant UI](https://www.assistant-ui.com/)                             | 对话界面与 LangGraph 适配 |\n| [Monaco Editor](https://microsoft.github.io/monaco-editor/)               | 代码编辑               |\n\n\n### 主后端 Node（`backend/node`）\n\n\n| 项目                                | 用途       |\n| --------------------------------- | -------- |\n| [Express](https://expressjs.com/) | HTTP API |\n\n\n### AI 后端（`backend/langgraph`，`pyproject.toml`）\n\n\n| 项目                                                                                                  | 用途               |\n| --------------------------------------------------------------------------------------------------- | ---------------- |\n| [FastAPI](https://fastapi.tiangolo.com/) / [Uvicorn](https://www.uvicorn.org/)                      | Web 服务           |\n| [LangGraph](https://langchain-ai.github.io/langgraph/) / [LangChain](https://python.langchain.com/) | Agent 编排与 LLM 调用 |\n| [Langfuse](https://langfuse.com/) / [Prometheus 客户端](https://github.com/prometheus/client_python) 等 | 可观测性（按环境启用）      |\n\n\n---\n\n## Quick start\n\n### 克隆与子模块\n\n```bash\ngit clone --recurse-submodules https://github.com/WeiWenda/effect-bi.git\ncd effect-bi\n# 若已克隆但未拉子模块：\ngit submodule update --init --recursive\n```\n\n### Docker Compose 启动（`docker-compose.stack.yaml`）\n\n```bash\ncp docker/stack/env.example docker/stack/.env\n\nbash docker/stack/trino/sync-plugin-from-dev.sh\n\ndocker compose --env-file docker/stack/.env -f docker-compose.stack.yaml build\ndocker compose --env-file docker/stack/.env -f docker-compose.stack.yaml up -d\n```\n\nCompose 在解析 YAML 里的 `${VAR:?…}` 时需要这份 env（`service.env_file` 只负责注入容器，不会自动参与变量替换）。若不想写 `--env-file`，也可把同名变量放进仓库根目录的 `.env`，或先在 shell 里 `export`。\n\n默认入口：Web **[http://localhost:3001](http://localhost:3001)**，LangGraph **8001**，Airflow **8080**，Trino **8088**；更多变量与说明见 **docker-compose.stack.yaml** 文件头注释与 **docker/stack/env.example**。\n\n停止：`docker compose --env-file docker/stack/.env -f docker-compose.stack.yaml down`。\n\n### 单独构建镜像（可选）\n\n```bash\ndocker build --build-arg NODE_IMAGE=docker.m.daocloud.io/library/node:22-bookworm-slim -t effect-bi:local .\n\ndocker build -f backend/langgraph/Dockerfile \\\n  --build-arg PYTHON_IMAGE=docker.m.daocloud.io/library/python:3.13-slim-bookworm \\\n  --build-arg APT_MIRROR_HOST=mirrors.aliyun.com \\\n  -t effect-bi-langgraph:latest backend/langgraph\n```\n\n---\n\n## Development Guide\n\n### 本地开发（需要提前按需启动gravitino、airflow、cube、neo4j、pg、trino等服务）\n\n```bash\nnpm install\nnpm run dev:all\n```\n\n\n| 命令                    | 作用                                                                                              |\n| --------------------- | ----------------------------------------------------------------------------------------------- |\n| `npm run dev:all`     | 启动 **Vite**（前端）、**Node / Express**（`backend/node`）、**LangGraph / FastAPI**（`backend/langgraph`） |\n| `npm run dev:stop`    | 停止上述三个进程                                                                                        |\n| `npm run dev:restart` | 重启上述三个进程                                                                                        |\n| `npm run dev:status`  | 查看上述进程是否在运行                                                                                     |\n| `npm run dev`         | 仅启动 **Vite**（不拉起 Node 与 LangGraph）                                                              |\n\n\n可选环境变量：`FRONTEND_PORT`（默认 5173）、`BACKEND_PORT`（默认 3001）、`LANGGRAPH_PORT`（默认 8001）；PID 与日志目录为 `.dev-pids/`。\n\nLangGraph 相关配置见 `backend/langgraph/.env.example`。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweiwenda%2Feffect-bi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweiwenda%2Feffect-bi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweiwenda%2Feffect-bi/lists"}