{"id":46714176,"url":"https://github.com/dddcp/db-designer","last_synced_at":"2026-04-09T04:06:03.897Z","repository":{"id":342004794,"uuid":"1076575928","full_name":"dddcp/db-designer","owner":"dddcp","description":"AI赋能数据库模型设计，特点：轻量、跨平台，可与数据库同步对比","archived":false,"fork":false,"pushed_at":"2026-04-08T08:17:07.000Z","size":4064,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-08T10:20:32.494Z","etag":null,"topics":["ai-design-tool","database-design","database-management","db","pdm"],"latest_commit_sha":null,"homepage":"","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/dddcp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-10-15T04:02:10.000Z","updated_at":"2026-04-08T08:17:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dddcp/db-designer","commit_stats":null,"previous_names":["dddcp/db-designer"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/dddcp/db-designer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dddcp%2Fdb-designer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dddcp%2Fdb-designer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dddcp%2Fdb-designer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dddcp%2Fdb-designer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dddcp","download_url":"https://codeload.github.com/dddcp/db-designer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dddcp%2Fdb-designer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31584848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"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":["ai-design-tool","database-design","database-management","db","pdm"],"created_at":"2026-03-09T10:05:35.230Z","updated_at":"2026-04-09T04:06:03.892Z","avatar_url":"https://github.com/dddcp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# DB Designer\n\n**AI 驱动的数据库模型设计工具**\n\n自然语言建表 / AI 索引优化 / AI 表结构重构 / 多数据库适配 / 版本管理 / 结构同步\n\n[![Release](https://img.shields.io/github/v/release/dddcp/db-designer?style=flat-square)](https://github.com/dddcp/db-designer/releases)\n[![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](https://github.com/dddcp/db-designer?tab=MIT-1-ov-file#readme)\n[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey?style=flat-square)](https://github.com/dddcp/db-designer/releases)\n\n\u003c/div\u003e\n\n---\n\n## AI 能力\n\nDB Designer 深度集成 AI 大模型，覆盖数据库设计的核心环节：\n\n| 能力 | 说明 |\n|------|------|\n| **自然语言建表** | 用一句话描述业务需求，AI 自动生成完整的表结构、字段、类型与约束 |\n| **项目上下文感知** | AI 设计新表时自动注入已有表结构、索引、元数据，理解业务全貌后再设计，确保命名风格一致、关联关系合理 |\n| **AI 表结构重构** | 选中任意表，用自然语言描述修改意图，AI 生成调整后的完整结构 |\n| **AI 索引推荐** | 提供慢查询 SQL 或业务特征（数据量、读写比、性能痛点），AI 分析后推荐最优索引方案，支持一键创建 |\n\n\u003e 兼容所有 OpenAI API 格式的模型服务（OpenAI / DeepSeek / 通义千问 / 本地 Ollama 等），在设置页面配置即可。\n\n## 功能特性\n\n| 功能 | 说明 |\n|------|------|\n| 表结构设计 | 可视化设计表、列、索引，支持拖拽排序 |\n| 元数据管理 | 为表配置元数据，支持 Excel 导入与 INSERT 语句导出 |\n| 版本管理 | 对项目结构打快照，支持版本间差异对比和 SQL 导出 |\n| 数据库比对 | 连接远程 MySQL / PostgreSQL，对比本地设计与线上结构差异 |\n| 数据库同步 | 对比线上，生成增量脚本；一键同步线上到模型库 |\n| SQL 导出 | 一键导出完整 SQL（表结构 + 索引 + 元数据），支持 MySQL / PostgreSQL |\n| Git 数据同步 | 通过 Git 管理设计数据 |\n| 本地存储 | 基于 SQLite 本地存储，无需联网、无需服务端 |\n\n## 截图预览\n\n### AI 设计表结构\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./doc/images/setting_ai.png\" width=\"80%\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./doc/images/ai_design.png\" width=\"80%\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./doc/images/ai_index_design.png\" width=\"80%\" /\u003e\n\u003c/p\u003e\n\n### SQL 导出\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./doc/images/export_sql.png\" width=\"80%\" /\u003e\n\u003c/p\u003e\n\n### 数据库对比与同步\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./doc/images/sync_db.png\" width=\"80%\" /\u003e\n\u003c/p\u003e\n\n## 安装\n\n前往 [Releases](https://github.com/dddcp/db-designer/releases) 下载对应平台安装包：\n\n| 平台 | 格式 |\n|------|------|\n| Windows | `.msi` / `.exe` |\n| macOS | `.dmg` |\n| Linux | `.deb` / `.AppImage` |\n\n## 本地开发\n\n### 前置要求\n\n- [Node.js](https://nodejs.org/) \u003e= 18\n- [Rust](https://www.rust-lang.org/tools/install) \u003e= 1.70\n- [Yarn](https://yarnpkg.com/)\n\n### 启动开发环境\n\n```bash\n# 安装前端依赖\nyarn install\n\n# 启动开发模式\nyarn tauri dev\n```\n\n### 构建生产包\n\n```bash\nyarn tauri build\n```\n\n## 技术栈\n\n| 层 | 技术 |\n|----|------|\n| 框架 | [Tauri 2](https://tauri.app/) |\n| 前端 | React 18 + TypeScript + Ant Design 5 |\n| 后端 | Rust + SQLite (rusqlite) |\n| 数据库连接 | mysql / postgres crate |\n| 构建工具 | Vite |\n\n## 更新日志\n\n查看 [CHANGELOG.md](./CHANGELOG.md)。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdddcp%2Fdb-designer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdddcp%2Fdb-designer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdddcp%2Fdb-designer/lists"}