{"id":42898349,"url":"https://github.com/overtrue/sparkset","last_synced_at":"2026-01-30T15:17:06.372Z","repository":{"id":330267515,"uuid":"1115077492","full_name":"overtrue/sparkset","owner":"overtrue","description":"Sparkset is an AI-powered operational assistant that helps teams interact with databases using natural language.","archived":false,"fork":false,"pushed_at":"2026-01-16T12:31:09.000Z","size":1784,"stargazers_count":30,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-16T18:22:35.412Z","etag":null,"topics":["admin-panel","ai-admin","ai-agents","ai-assistant","ai-chatbot","dashboard"],"latest_commit_sha":null,"homepage":"https://sparkset.app","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/overtrue.png","metadata":{"files":{"readme":"README.dev.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["overtrue"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2025-12-12T10:00:47.000Z","updated_at":"2026-01-16T12:31:15.000Z","dependencies_parsed_at":"2025-12-25T22:06:57.431Z","dependency_job_id":null,"html_url":"https://github.com/overtrue/sparkset","commit_stats":null,"previous_names":["overtrue/sparkset"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/overtrue/sparkset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Fsparkset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Fsparkset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Fsparkset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Fsparkset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/overtrue","download_url":"https://codeload.github.com/overtrue/sparkset/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/overtrue%2Fsparkset/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28914902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["admin-panel","ai-admin","ai-agents","ai-assistant","ai-chatbot","dashboard"],"created_at":"2026-01-30T15:17:05.724Z","updated_at":"2026-01-30T15:17:06.367Z","avatar_url":"https://github.com/overtrue.png","language":"TypeScript","funding_links":["https://github.com/sponsors/overtrue"],"categories":[],"sub_categories":[],"readme":"# Sparkset 开发手册（简版）\n\n## 快速启动\n\n1. 安装依赖：`pnpm install`\n2. 准备数据库（MySQL 或 Postgres），设置 `DATABASE_URL`，执行迁移：\n   - 运行 Lucid migrations：`cd apps/server \u0026\u0026 node ace migration:run`\n3. 启动 Server：`pnpm dev --filter @sparkset/server`\n4. 启动 Dashboard：`pnpm dev --filter @sparkset/dashboard`\n5. 使用 REST API 进行测试：`curl -X POST http://localhost:3333/query -H 'Content-Type: application/json' -d '{\"question\":\"本周订单数\",\"datasource\":1}'`\n\n## Demo Seed（本地快速体验）\n\n1. 确保本机 MySQL 运行，root/root（或改脚本密码）。\n2. 执行 `mysql -uroot -proot \u003c scripts/demo-seed.sql` 创建示例数据库、表与 datasources 记录。\n3. 设置环境变量 `DATABASE_URL=\"mysql://root:root@localhost:3306/sparkset_demo\"` 并启动 API。\n4. 使用 POST /query 发送问题，如：`curl -X POST http://localhost:3333/query -H 'Content-Type: application/json' -d '{\"question\":\"查询订单列表\",\"limit\":5,\"datasource\":1}'`。\n\n## 环境变量\n\n- `DATABASE_URL`：数据库连接串（MySQL 格式），推荐使用。\n- 若无 `DATABASE_URL`，可用 `DB_HOST/DB_PORT/DB_USER/DB_PASSWORD/DB_NAME` 走 MySQL 直连；再无则回退内存模式。\n\n## 代码结构\n\n- `packages/core`: action 执行器、query planner/executor 等核心逻辑，包含 DBClient 接口定义。\n- `apps/server`: AdonisJS Server，路由已接入数据源/动作/会话、query 规划与执行，包含 Repository 接口定义。\n- `apps/dashboard`: Next.js + Tailwind UI shell。\n\n## 开发指令\n\n- Lint: `pnpm lint`\n- Format: `pnpm format`\n- 测试: `pnpm test`\n- 类型检查: `pnpm --filter @sparkset/server typecheck`\n- 构建单包: `pnpm build --filter \u003cpkg\u003e`\n\n## 开发规范\n\n本项目使用 Git Hooks 自动验证代码质量。详细规范请查看 [AGENTS.md](./AGENTS.md) 中的 \"Development Validation \u0026 Quality Gates\" 部分。\n\n### 快速参考\n\n- **Pre-commit**：自动格式化、lint 检查、类型检查\n- **Pre-push**：完整验证（lint、类型、测试、构建）\n- **验证失败**：提交/推送会被阻止，请修复后重试\n\n## 后续待办（建议）\n\n- 将 QueryService 完全接入 AI 模型与 SQL 生成、安全 dry-run。\n- 数据库使用 AdonisJS Lucid ORM，migrations 在 `apps/server/database/migrations/`。\n- Dashboard 与 API 的真实数据联调。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovertrue%2Fsparkset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fovertrue%2Fsparkset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovertrue%2Fsparkset/lists"}