6 Commits

Author SHA1 Message Date
wonder 00c1839635 feat: migrate database from SQLite to MySQL with .env configuration
- Replace go-sqlite3 with go-sql-driver/mysql (pure Go, no CGO needed)
- Add joho/godotenv for .env file loading
- Rewrite database/db.go with MySQL-compatible DDL (BIGINT AUTO_INCREMENT, InnoDB, utf8mb4)
- Convert all SQLite-specific SQL: INSERT OR IGNORE → INSERT IGNORE,
  INSERT OR REPLACE → INSERT ... ON DUPLICATE KEY UPDATE,
  datetime('now') → NOW(), date arithmetic → DATE_SUB()
- Add MySQL config fields to config.go (host/port/user/password/database)
- Add .env.example with connection parameter template
- Update Dockerfile: remove CGO/gcc/musl dependency, smaller build
- Update docker-compose.yml: add MySQL service container with healthcheck
- Update CLAUDE.md documentation
2026-06-20 22:40:46 +08:00
wonder 6c60b767df refactor: replace chromedp with browser native print for PDF export
Remove chromedp dependency, use window.print() instead. Docker image no longer needs Chromium (~200MB smaller).

- Delete services/pdf.go and templates/reports/review.html

- Remove PDF API route POST /api/repos/:id/review/pdf

- Add @media print CSS to review page

- Remove chromium from Dockerfile
2026-06-20 22:26:46 +08:00
wonder 87bb23e19e docs: 删除 PLAN.md,更新 CLAUDE.md 中的引用
PLAN.md 的内容已被 CLAUDE.md、README.md 和代码覆盖:
- API 路由、功能描述、Docker 配置 → README.md
- 架构、关键模式、目录结构 → CLAUDE.md
- SQL Schema、LLM Prompts、SSE 格式 → 代码本身

更新 CLAUDE.md Development Notes,将 PLAN.md 引用改为指向实际代码文件。
2026-06-20 17:34:57 +08:00
wonder 7ac3a3726b feat: Phase 3 — 前端交互功能完成 2026-06-18 23:37:19 +08:00
wonder 46f1bbf0f1 docs: 完善 CLAUDE.md,添加项目架构和开发指引 2026-06-18 22:31:58 +08:00
wonder bad08a1be2 docs: 完整项目规划
- 技术架构:Go + Gin + SQLite + HTMX + D3.js + Tailwind CSS
- 核心功能:PR 描述生成、AI 代码审查、Git Graph 可视化
- Diff 查看器:diff2html Split 视图、文件树侧边栏、语法高亮、行内 AI 建议
- 审查编辑:三级备注(整体/文件/建议)、PDF 导出(chromedp)
- LLM 集成:OpenAI 兼容 API、SSE 流式输出、Top-N 可配置
- 部署方案:Docker + docker-compose
2026-06-18 22:29:40 +08:00