diff --git a/README.md b/README.md index 42ac2f4c..65ba3e34 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,16 @@ GoNavi is designed for developers and DBAs who need a unified desktop experience | Category | Data Source | Driver Mode | Typical Capabilities | |---|---|---|---| | Relational | MySQL | Built-in | Schema browsing, SQL query, data editing, export/backup | +| Domestic DB | GoldenDB | Built-in | MySQL-compatible query workflow and distributed transaction scenarios | | Relational | PostgreSQL | Built-in | Schema browsing, SQL query, data editing, object management | | Relational | Oracle | Built-in | Query execution, object browsing, data editing | | Cache | Redis | Built-in | Key browsing, command execution, encoding/view switch | +| Vector Database | Chroma | Built-in | Collection browsing, vector retrieval, metadata filtering | +| Vector Database | Qdrant | Built-in | Collection browsing, vector search, payload filtering | +| Message Queue | RocketMQ | Built-in | Topic browsing, consumer-group inspection, message-oriented workflow | +| Message Queue | MQTT | Built-in | Broker and topic-filter workflow with QoS-aware connection settings | +| Message Queue | Kafka | Built-in | Topic browsing, broker metadata, consumer-group workflow | +| Message Queue | RabbitMQ | Built-in | Queue/exchange browsing, virtual host inspection, management API workflow | | Relational | MariaDB | Optional driver agent | Querying, object management, data editing | | Relational | Doris | Optional driver agent | Querying, object browsing, SQL execution | | Columnar Analytics | StarRocks | Optional driver agent | Querying, object browsing, SQL execution | @@ -44,12 +51,17 @@ GoNavi is designed for developers and DBAs who need a unified desktop experience | Relational | SQL Server | Optional driver agent | Schema browsing, SQL query, object management | | File-based | SQLite | Optional driver agent | Local DB browsing, editing, export | | File-based | DuckDB | Optional driver agent | Large-table query, pagination, file-DB workflow | +| Domestic DB | OceanBase | Optional driver agent | MySQL / Oracle tenant access, object browsing, query workflow | | Domestic DB | Dameng | Optional driver agent | Querying, object browsing, data editing | | Domestic DB | Kingbase | Optional driver agent | Querying, object browsing, data editing | | Domestic DB | HighGo | Optional driver agent | Querying, object browsing, data editing | | Domestic DB | Vastbase | Optional driver agent | Querying, object browsing, data editing | +| Domestic DB | OpenGauss | Optional driver agent | PostgreSQL-like schema browsing, SQL query, object management | +| Domestic DB | GaussDB | Optional driver agent | PostgreSQL-like schema browsing, SQL query, object management | +| Multi-model | InterSystems IRIS | Optional driver agent | Namespace browsing, SQL query, object management | | Document | MongoDB | Optional driver agent | Document query, collection browsing, connection management | | Time-series | TDengine | Optional driver agent | Time-series schema browsing and querying | +| Time-series | Apache IoTDB | Optional driver agent | Storage group / device / timeseries browsing and querying | | Columnar Analytics | ClickHouse | Optional driver agent | Analytical query, object browsing, SQL execution | | Federated Query | Trino | Optional driver agent | Cross-source SQL via multiple catalogs, `catalog.schema` browsing, SQL execution | | Search | Elasticsearch | Optional driver agent | Index browsing, mapping inspection, JSON DSL / query_string search | @@ -75,6 +87,9 @@ GoNavi is designed for developers and DBAs who need a unified desktop experience - **Multi-provider Support**: OpenAI, Google Gemini, Anthropic Claude, and custom API support. - **Context-Aware Chat**: Attach table schemas to the AI context for accurate SQL generation and assistance. - **Slash Commands**: Quick commands for generating SQL, explaining queries, optimizing performance, and reviewing schema designs. +- **Built-in MCP Workflow**: Manage MCP servers in AI Settings, install GoNavi MCP to Claude Code / Codex, or expose Streamable HTTP for remote Agents. +- **Remote-Agent Boundary**: Keep saved connections and database passwords on the host running GoNavi while cloud Agents consume schema tools over MCP. +- **Safety Guardrails**: Remote `schema-only` mode omits `execute_sql`; when SQL execution is enabled, non-read-only statements still require explicit `allowMutating=true`. ### Performance - **Smooth interaction under load**: optimized table interaction (including column resize workflow on large datasets). @@ -169,6 +184,82 @@ wails build -clean Artifacts are generated in `build/bin`. +### Docker / Podman (MCP Server Only) + +The desktop GUI is not packaged as a container service. Current container support targets `gonavi-mcp-server` only. + +### Browser Access Mode (Experimental) + +The main GoNavi application now also exposes a `web-server` mode that reuses the same Go backend and React frontend for browser access: + +```powershell +go build . +.\GoNavi-Wails.exe web-server --addr 127.0.0.1:34116 +``` + +The first browser visit is redirected to `/setup` to create the web admin password. Google Authenticator is optional but supported out of the box, together with `web_auth.json`, session cookies, recovery codes, and login rate limiting. + +Current scope already includes: + +- Browser-side Wails bridge (`window.go.*` / `window.runtime.*` -> HTTP / SSE) +- First-run setup page, login page, and logout endpoint +- Session idle timeout / absolute timeout / remember-login window +- Google Authenticator TOTP plus recovery codes + +Still in progress: + +- Browser upload/download workbenches for external SQL and connection-package flows +- More web capability gating for desktop-only features +- Reverse-proxy / HTTPS / zero-trust deployment guidance + +```bash +cp docker.mcp-server.env.example docker.mcp-server.env +docker compose --env-file docker.mcp-server.env -f docker-compose.mcp-server.yml up -d +``` + +Mount the GoNavi active data root into the container. The mounted directory should contain `connections.json`, `daily_secrets.json`, and optional `drivers/` assets when optional driver agents are required. + +The default Compose file pulls the published GHCR image. For local source builds, add the override file: + +```bash +docker compose --env-file docker.mcp-server.env \ + -f docker-compose.mcp-server.yml \ + -f docker-compose.mcp-server.local.yml \ + up -d --build +``` + +For Podman, use the same published OCI image with `podman run`, or the native Quadlet example under [deploy/podman/gonavi-mcp-server](deploy/podman/gonavi-mcp-server). That path is intended for Linux servers / NAS hosts where rootless systemd services are preferred. + +Deployment matrix: + +- Docker Desktop / Linux server / NAS: `docker-compose.mcp-server.yml` +- Podman / Quadlet: [deploy/podman/gonavi-mcp-server](deploy/podman/gonavi-mcp-server) +- Kubernetes: [deploy/k8s/gonavi-mcp-server](deploy/k8s/gonavi-mcp-server) (`kustomization.yaml` + overlays) +- Helm chart: [deploy/helm/gonavi-mcp-server](deploy/helm/gonavi-mcp-server) +- Build-only Linux environment: `Dockerfile.build-env` + +See [cmd/gonavi-mcp-server/README.md](cmd/gonavi-mcp-server/README.md) for deployment details and security boundaries. + +### Docker / Podman (Build Environment Only) + +If you only need a reproducible Linux build environment for Wails, use `Dockerfile.build-env`: + +```bash +docker build -f Dockerfile.build-env -t gonavi-build-env:local . +docker run --rm -it -v "$PWD:/workspace" -w /workspace gonavi-build-env:local bash +``` + +The same Dockerfile also works with Podman, for example `podman build -f Dockerfile.build-env -t localhost/gonavi-build-env:local .` and `podman run --rm -it -v "$PWD:/workspace" -w /workspace localhost/gonavi-build-env:local bash`. + +The default image installs the WebKitGTK 4.0 build toolchain for broader Linux/NAS compatibility. The image bases are multi-arch, so `amd64` and `arm64` follow the target container platform. + +Published images are pushed to GHCR: + +- `ghcr.io/syngnat/gonavi-mcp-server:latest` +- `ghcr.io/syngnat/gonavi-build-env:latest` + +This image is for building Linux artifacts only. It does not turn the Wails desktop GUI into a browser-accessible web application. + ### Cross-Platform Release (GitHub Actions) The repository includes a release workflow. diff --git a/README.zh-CN.md b/README.zh-CN.md index b6981c6b..2e9dbdcd 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -33,9 +33,16 @@ GoNavi 面向开发者与 DBA,核心目标是让数据库操作在桌面端做 | 类别 | 数据源 | 驱动模式 | 典型能力 | |---|---|---|---| | 关系型 | MySQL | 内置 | 库表浏览、SQL 查询、数据编辑、导出/备份 | +| 国产数据库 | GoldenDB | 内置 | MySQL 兼容查询工作流、分布式事务场景 | | 关系型 | PostgreSQL | 内置 | 库表浏览、SQL 查询、数据编辑、对象管理 | | 关系型 | Oracle | 内置 | 连接查询、对象浏览、数据编辑 | | 缓存 | Redis | 内置 | Key 浏览、命令执行、编码/视图切换 | +| 向量数据库 | Chroma | 内置 | Collection 浏览、向量检索、元数据过滤 | +| 向量数据库 | Qdrant | 内置 | Collection 浏览、向量搜索、Payload 过滤 | +| 消息队列 | RocketMQ | 内置 | Topic 浏览、消费组检查、消息型工作流 | +| 消息队列 | MQTT | 内置 | Broker / Topic Filter 工作流与 QoS 连接配置 | +| 消息队列 | Kafka | 内置 | Topic 浏览、Broker 元数据、消费组工作流 | +| 消息队列 | RabbitMQ | 内置 | Queue / Exchange 浏览、Virtual Host 检查、Management API 工作流 | | 关系型 | MariaDB | 可选驱动代理 | 连接查询、对象管理、数据编辑 | | 关系型 | Doris | 可选驱动代理 | 连接查询、对象浏览、SQL 执行 | | 列式分析 | StarRocks | 可选驱动代理 | 连接查询、对象浏览、SQL 执行 | @@ -43,12 +50,17 @@ GoNavi 面向开发者与 DBA,核心目标是让数据库操作在桌面端做 | 关系型 | SQL Server | 可选驱动代理 | 库表浏览、SQL 查询、对象管理 | | 文件型 | SQLite | 可选驱动代理 | 本地文件库浏览、编辑、导出 | | 文件型 | DuckDB | 可选驱动代理 | 大表查询、分页浏览、文件库管理 | +| 国产数据库 | OceanBase | 可选驱动代理 | MySQL / Oracle 租户接入、对象浏览、查询工作流 | | 国产数据库 | Dameng | 可选驱动代理 | 连接查询、对象浏览、数据编辑 | | 国产数据库 | Kingbase | 可选驱动代理 | 连接查询、对象浏览、数据编辑 | | 国产数据库 | HighGo | 可选驱动代理 | 连接查询、对象浏览、数据编辑 | | 国产数据库 | Vastbase | 可选驱动代理 | 连接查询、对象浏览、数据编辑 | +| 国产数据库 | OpenGauss | 可选驱动代理 | 类 PostgreSQL 的库表浏览、SQL 查询、对象管理 | +| 国产数据库 | GaussDB | 可选驱动代理 | 类 PostgreSQL 的库表浏览、SQL 查询、对象管理 | +| 多模型数据库 | InterSystems IRIS | 可选驱动代理 | Namespace 浏览、SQL 查询、对象管理 | | 文档型 | MongoDB | 可选驱动代理 | 文档查询、集合浏览、连接管理 | | 时序 | TDengine | 可选驱动代理 | 时序库表浏览、查询分析 | +| 时序 | Apache IoTDB | 可选驱动代理 | Storage Group / Device / Timeseries 浏览与查询 | | 列式分析 | ClickHouse | 可选驱动代理 | 分析查询、对象浏览、SQL 执行 | | 联邦查询 | Trino | 可选驱动代理 | 跨多数据源联邦 SQL、`catalog.schema` 浏览、SQL 执行 | | 搜索 | Elasticsearch | 可选驱动代理 | 索引浏览、Mapping 检查、JSON DSL / query_string 查询 | @@ -74,6 +86,9 @@ GoNavi 面向开发者与 DBA,核心目标是让数据库操作在桌面端做 - **多模型服务商支持**:内置跨平台接入 OpenAI, Google Gemini, Anthropic Claude,同时支持任意自定义兼容 OpenAI 格式的 API。 - **关联表结构上下文**:原生支持将当前数据库表结构直接提取作为上下文发送给 AI,让 SQL 生成、分析变得更精准。 - **快捷指令**:内置多种快捷对话指(如一键生成 SQL、解释执行逻辑、分析性能优化、表字段代码评审等)。 +- **内置 MCP 工作流**:可在 AI 设置里管理 MCP 服务,一键安装 GoNavi MCP 到 Claude Code / Codex,或开启 Streamable HTTP 供远端 Agent 使用。 +- **远端 Agent 边界清晰**:数据库连接与密码继续保留在运行 GoNavi 的主机上,云端 Agent 通过 MCP 读取结构与上下文。 +- **安全控制可追溯**:远端 `schema-only` 模式默认不暴露 `execute_sql`;如开启 SQL 执行,非只读语句仍需显式传入 `allowMutating=true`。 ### 性能与交互 - 大数据场景下保持流畅交互(含 DataGrid 列宽拖拽、批量编辑流程优化)。 @@ -163,6 +178,82 @@ wails build -clean 构建产物位于 `build/bin`。 +### Docker / Podman(仅 MCP Server) + +当前容器化支持仅覆盖 `gonavi-mcp-server`,不包含桌面 GUI 主界面。 + +### 浏览器访问版(实验中) + +仓库主程序现在额外提供了一个 `web-server` 运行模式,用同一套 Go 后端 + React 前端提供浏览器访问入口: + +```powershell +go build . +.\GoNavi-Wails.exe web-server --addr 127.0.0.1:34116 +``` + +首次访问会进入 `/setup` 完成 Web 管理员密码初始化;可选启用 Google Authenticator,服务端会落地 `web_auth.json`、Session Cookie、恢复码与登录失败限流。 + +当前阶段已具备: + +- 浏览器端 Wails bridge(`window.go.*` / `window.runtime.*` -> HTTP / SSE) +- 首次初始化页、登录页、登出接口 +- Session 空闲超时 / 绝对超时 / 记住登录时长 +- Google Authenticator TOTP 与恢复码 + +当前仍在继续收口: + +- 外部 SQL / 连接包导入导出等文件型能力的浏览器上传下载工作台 +- 更多桌面专属能力的 Web 门禁与替代交互 +- 反向代理 / HTTPS / 零信任部署说明 + +```bash +cp docker.mcp-server.env.example docker.mcp-server.env +docker compose --env-file docker.mcp-server.env -f docker-compose.mcp-server.yml up -d +``` + +请把 GoNavi 的活动数据目录挂载进容器。该目录内至少应包含 `connections.json`、`daily_secrets.json`,如需可选驱动代理还应包含 `drivers/`。 + +默认 Compose 会直接拉取 GHCR 预构建镜像。如果你要用当前仓库源码本地构建,再叠加一个 override: + +```bash +docker compose --env-file docker.mcp-server.env \ + -f docker-compose.mcp-server.yml \ + -f docker-compose.mcp-server.local.yml \ + up -d --build +``` + +如果你使用 Podman,可直接复用同一套 OCI 镜像,走 `podman run` 或 Quadlet。仓库内已经提供 [deploy/podman/gonavi-mcp-server](deploy/podman/gonavi-mcp-server) 作为 Podman 原生部署入口,适合 Linux 服务器 / NAS 的 rootless systemd 常驻服务。 + +部署矩阵: + +- Docker Desktop / Linux 服务器 / NAS:`docker-compose.mcp-server.yml` +- Podman / Quadlet:[deploy/podman/gonavi-mcp-server](deploy/podman/gonavi-mcp-server) +- Kubernetes:[deploy/k8s/gonavi-mcp-server](deploy/k8s/gonavi-mcp-server)(`kustomization.yaml` + overlays) +- Helm Chart:[deploy/helm/gonavi-mcp-server](deploy/helm/gonavi-mcp-server) +- 仅构建环境:`Dockerfile.build-env` + +完整部署方式与安全边界见 [cmd/gonavi-mcp-server/README.md](cmd/gonavi-mcp-server/README.md)。 + +### Docker / Podman(仅构建环境) + +如果只是想要一套稳定的 Linux 构建环境来编译 Wails,可直接使用 `Dockerfile.build-env`: + +```bash +docker build -f Dockerfile.build-env -t gonavi-build-env:local . +docker run --rm -it -v "$PWD:/workspace" -w /workspace gonavi-build-env:local bash +``` + +同一个 Dockerfile 也可以直接给 Podman 使用,例如 `podman build -f Dockerfile.build-env -t localhost/gonavi-build-env:local .`,然后执行 `podman run --rm -it -v "$PWD:/workspace" -w /workspace localhost/gonavi-build-env:local bash`。 + +这个镜像默认安装 WebKitGTK 4.0 构建依赖,兼容面更适合常见 Linux / NAS 场景。镜像底座本身支持多架构,`amd64` / `arm64` 会跟随容器平台。 + +仓库会把预构建镜像推送到 GHCR: + +- `ghcr.io/syngnat/gonavi-mcp-server:latest` +- `ghcr.io/syngnat/gonavi-build-env:latest` + +这个镜像只负责构建 Linux 产物,不会把 Wails 桌面 GUI 变成可浏览器访问的 Web 服务。 + ### 跨平台发布(GitHub Actions) 仓库内置发布流水线,推送 `v*` Tag 可自动构建并发布 Release。