{"id":35355426,"url":"https://github.com/rainoffallingstar/pomodoroflow-rs","last_synced_at":"2026-03-08T06:07:21.045Z","repository":{"id":330234650,"uuid":"1121805871","full_name":"rainoffallingstar/pomodoroflow-rs","owner":"rainoffallingstar","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-24T02:52:16.000Z","size":355,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-25T16:08:30.593Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rainoffallingstar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-12-23T15:29:25.000Z","updated_at":"2025-12-24T02:52:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rainoffallingstar/pomodoroflow-rs","commit_stats":null,"previous_names":["rainoffallingstar/pomodoroflow-rs"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rainoffallingstar/pomodoroflow-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainoffallingstar%2Fpomodoroflow-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainoffallingstar%2Fpomodoroflow-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainoffallingstar%2Fpomodoroflow-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainoffallingstar%2Fpomodoroflow-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rainoffallingstar","download_url":"https://codeload.github.com/rainoffallingstar/pomodoroflow-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rainoffallingstar%2Fpomodoroflow-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30246890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T05:41:50.788Z","status":"ssl_error","status_checked_at":"2026-03-08T05:41:39.075Z","response_time":56,"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":[],"created_at":"2026-01-01T22:58:48.787Z","updated_at":"2026-03-08T06:07:21.036Z","avatar_url":"https://github.com/rainoffallingstar.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PomodoroFlow-Rs\n\n\u003cdiv align=\"center\"\u003e\n\n一个现代化的番茄钟 + 待办事项桌面应用\n\n基于 **Tauri + React + Rust** 开发\n\n[![Tauri](https://img.shields.io/badge/Tauri-1.0+-blue)](https://tauri.app/)\n[![React](https://img.shields.io/badge/React-18+-blue)](https://reactjs.org/)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue)](https://www.typescriptlang.org/)\n[![Rust](https://img.shields.io/badge/Rust-1.70+-orange)](https://www.rust-lang.org/)\n[![License](https://img.shields.io/badge/License-MIT-green)](LICENSE)\n\n\u003c/div\u003e\n\n## ✨ 功能特性\n\n### 🍅 番茄钟功能\n- ⏱️ 精确的倒计时器（MM:SS 格式）\n- 🔄 工作/短休息/长休息三种周期自动切换\n- ⚙️ 可配置的时长（默认 25/5/15 分钟）\n- ▶️ 开始/暂停/重置/跳过控制\n- 🔔 系统通知和声音提醒\n- 📊 实时进度显示\n- ⌨️ 快捷键支持（`Ctrl+Space` 启动/暂停）\n\n### ✅ 待办事项管理\n- ➕ 创建、编辑、删除任务\n- 🔄 任务状态切换（待办/进行中/已完成）\n- 💾 本地 SQLite 数据库存储\n- 🔍 搜索和筛选功能\n- 📋 三标签页视图（待办/进行中/已完成）\n- 🎯 在当前标签页创建任务会自动设置对应状态\n- ✨ iOS 18 分组列表（Inset Grouped）风格\n- 📜 列表内容在卡片内滚动，头部固定\n\n### 🎨 界面设计\n- 🎨 iOS 18 质感的现代化界面设计\n- 🌞 浅色/深色/系统主题\n- 💻 响应式设计，桌面和移动端自适应\n- ✨ 流畅的动画效果和过渡\n- 🎯 直观的用户交互\n- 📱 移动端友好\n- 🧊 毛玻璃卡片效果\n- ⭕ 圆环进度条动画\n\n### ⌨️ 快捷键支持\n- `Ctrl/Cmd + Space` - 启动/暂停番茄钟\n- `Ctrl/Cmd + N` - 新建任务\n- `Ctrl/Cmd + R` - 重置番茄钟\n- `Ctrl/Cmd + ,` - 打开设置\n\n### ⚙️ 配置管理\n- 🎚️ 自定义番茄钟时长\n- 🔔 通知设置\n- 🎨 主题偏好\n- 💾 配置持久化\n\n## 🏗️ 技术栈\n\n### 前端\n- **框架**: React 18 + TypeScript\n- **构建工具**: Vite\n- **状态管理**: Zustand\n- **样式**: iOS 18 Design System，自定义 CSS（亮色/暗色主题）\n- **设计**: 毛玻璃效果、圆环进度条、分段列表\n\n### 后端\n- **框架**: Tauri 1.0+\n- **语言**: Rust (2021 Edition)\n- **数据库**: SQLite (rusqlite)\n- **异步**: Tokio\n\n## 📦 项目结构\n\n```\npomoflow-rs/\n├── src/                         # React 前端\n│   ├── components/              # UI 组件\n│   │   ├── PomodoroTimer.tsx   # 番茄钟计时器\n│   │   ├── TodoList.tsx        # 待办列表\n│   │   ├── SettingsPanel.tsx   # 设置面板\n│   │   └── ...\n│   ├── stores/                 # Zustand 状态管理\n│   │   └── appStore.ts\n│   ├── hooks/                  # 自定义钩子\n│   ├── styles/                 # CSS 样式\n│   └── App.tsx                 # 主应用组件\n│\n├── src-tauri/                  # Tauri 后端\n│   ├── src/\n│   │   ├── main.rs             # 应用入口\n│   │   └── commands/           # Tauri 命令\n│   │       ├── todo_commands.rs\n│   │       ├── pomodoro_commands.rs\n│   │       └── config_commands.rs\n│   └── Cargo.toml\n│\n├── src/                        # Rust 核心库\n│   ├── core/                   # 核心业务逻辑\n│   │   ├── pomodoro.rs        # 番茄钟逻辑\n│   │   ├── todo.rs            # 待办事项模型\n│   │   └── state/             # 状态管理\n│   ├── storage/                # 数据存储\n│   │   └── database.rs        # SQLite 操作\n│   └── async_utils/            # 异步工具\n│\n├── docs/                       # 文档\n│   ├── architecture.md         # 架构设计\n│   ├── requirements.md         # 需求文档\n│   └── active_context.md       # 项目状态\n│\n├── package.json                # 前端依赖\n├── Cargo.toml                  # Rust 依赖\n├── vite.config.ts             # Vite 配置\n└── README.md                   # 本文件\n```\n\n## 🚀 快速开始\n\n### 前置要求\n- Node.js 18+\n- Rust 1.70+\n- npm 或 yarn\n\n### 安装依赖\n```bash\n# 安装前端依赖\nnpm install\n\n# 或使用 yarn\nyarn install\n```\n\n### 开发模式\n```bash\n# 启动开发服务器（热重载）\nnpm run tauri:dev\n\n# 或使用\nnpm run dev\n```\n\n### 生产构建\n```bash\n# 构建应用\nnpm run tauri build\n\n# 构建输出位置\n# Windows: src-tauri/target/release/bundle/\n# macOS:   src-tauri/target/release/bundle/\n# Linux:   src-tauri/target/release/bundle/\n```\n\n### 运行测试\n```bash\n# 运行前端测试\nnpm test\n\n# 运行测试并生成覆盖率\nnpm run test:coverage\n```\n\n## 📊 数据库设计\n\n### 核心表\n\n**todos** - 待办事项\n```sql\nCREATE TABLE todos (\n    id TEXT PRIMARY KEY,\n    title TEXT NOT NULL,\n    description TEXT,\n    status TEXT NOT NULL,  -- todo/in_progress/done\n    created_at TIMESTAMP NOT NULL,\n    updated_at TIMESTAMP NOT NULL\n);\n```\n\n**user_config** - 用户配置\n```sql\nCREATE TABLE user_config (\n    id INTEGER PRIMARY KEY CHECK (id = 1),\n    pomodoro_work_duration INTEGER DEFAULT 1500,\n    pomodoro_short_break_duration INTEGER DEFAULT 300,\n    pomodoro_long_break_duration INTEGER DEFAULT 900,\n    pomodoro_cycles_until_long_break INTEGER DEFAULT 4,\n    notifications_enabled BOOLEAN DEFAULT 1,\n    sound_enabled BOOLEAN DEFAULT 1,\n    theme TEXT DEFAULT 'light'\n);\n```\n\n**pomodoro_sessions** - 番茄钟会话记录\n```sql\nCREATE TABLE pomodoro_sessions (\n    id INTEGER PRIMARY KEY,\n    phase TEXT NOT NULL,\n    duration_seconds INTEGER NOT NULL,\n    completed_at TIMESTAMP NOT NULL,\n    cycle_count INTEGER NOT NULL\n);\n```\n\n## 🎯 使用说明\n\n### 1. 启动应用\n首次运行会自动创建本地数据库并加载默认配置。\n\n### 2. 使用番茄钟\n- 点击 **Start** 按钮启动工作计时\n- 计时结束会收到系统通知\n- 可随时点击 **Pause** 暂停或 **Reset** 重置\n- 使用 **Skip** 跳过当前阶段\n\n### 3. 管理待办事项\n- 在输入框中输入任务名称，按 **Enter** 添加\n- 点击任务前的复选框切换完成状态\n- 点击 **Delete** 删除任务\n\n### 4. 切换主题\n- 点击右上角的主题切换按钮\n- 支持浅色、深色、系统主题\n- 主题选择会自动保存\n\n### 5. 使用快捷键\n- `Ctrl/Cmd + Space`: 启动/暂停番茄钟\n- `Ctrl/Cmd + N`: 聚焦到新建任务输入框\n- `Ctrl/Cmd + R`: 重置番茄钟\n- `Ctrl/Cmd + ,`: 打开设置面板\n\n## 🏗️ 架构设计\n\n### 分层架构\n```\n┌─────────────────────┐\n│  React 前端层        │  ← UI 组件、状态管理\n├─────────────────────┤\n│  Tauri API 层       │  ← Rust 命令接口\n├─────────────────────┤\n│  核心业务逻辑层      │  ← 番茄钟、待办逻辑\n├─────────────────────┤\n│  数据持久化层        │  ← SQLite 存储\n└─────────────────────┘\n```\n\n### 状态管理\n- **Zustand**: 前端轻量级状态管理\n- **事件驱动**: 实时同步后端状态\n- **持久化**: 自动保存用户配置\n\n### 数据流\n```\n用户操作 → React 组件 → Zustand Store → Tauri API → Rust 命令 → 业务逻辑 → 数据库\n```\n\n详细架构文档请查看 [docs/architecture.md](docs/architecture.md)\n\n## 🧪 测试\n\n### 测试框架\n- **前端**: Vitest + React Testing Library\n- **组件测试**: 测试 React 组件渲染和交互\n- **状态测试**: 测试 Zustand store 操作\n\n### 测试覆盖\n- 组件渲染测试\n- 用户交互测试\n- 状态管理测试\n- 集成测试\n\n## 📈 性能指标\n\n- **启动时间**: \u003c 5 秒\n- **内存占用**: \u003c 150 MB\n- **UI 响应**: \u003c 100ms\n- **数据库操作**: \u003c 10ms\n\n## 🔧 开发指南\n\n### 代码规范\n- **TypeScript**: 严格模式，100% 类型覆盖\n- **Rust**: `cargo clippy` 检查\n- **提交规范**: 使用清晰的提交消息\n\n### 开发流程\n1. 创建功能分支\n2. 编写代码和测试\n3. 运行测试确保通过\n4. 提交 Pull Request\n\n## 📋 未来计划\n\n### v0.2.0\n- [ ] 番茄钟统计页面\n- [ ] 任务优先级和标签\n- [ ] 数据导入/导出\n- [ ] 自定义声音提醒\n\n### v0.3.0\n- [ ] 任务截止日期\n- [ ] 任务提醒\n- [ ] 更多主题选项\n- [ ] 多语言支持\n\n### v1.0.0\n- [ ] 跨平台打包发布\n- [ ] 自动更新\n- [ ] 插件系统\n\n## 🤝 贡献\n\n欢迎贡献代码！请遵循以下步骤：\n\n1. Fork 本仓库\n2. 创建你的功能分支 (`git checkout -b feature/AmazingFeature`)\n3. 提交你的修改 (`git commit -m 'Add some AmazingFeature'`)\n4. 推送到分支 (`git push origin feature/AmazingFeature`)\n5. 开启一个 Pull Request\n\n## 📝 许可证\n\n本项目采用 MIT 许可证 - 查看 [LICENSE](LICENSE) 文件了解详情\n\n## 🙏 致谢\n\n- [Tauri](https://tauri.app/) - 构建更小、更快、更安全的桌面应用\n- [React](https://reactjs.org/) - 用户界面库\n- [Vite](https://vitejs.dev/) - 下一代前端构建工具\n- [Zustand](https://github.com/pmndrs/zustand) - 简洁的状态管理\n- [Vitest](https://vitest.dev/) - 快速单元测试框架\n- [Rust](https://www.rust-lang.org/) - 系统编程语言\n\n## 📞 联系方式\n\n如有问题或建议，请通过以下方式联系：\n\n- 提交 [Issue](https://github.com/yourusername/pomoflow-rs/issues)\n- 发起 [Discussion](https://github.com/yourusername/pomoflow-rs/discussions)\n\n---\n\n**PomodoroFlow-Rs** - 专注工作，高效生活！ 🍅✨\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainoffallingstar%2Fpomodoroflow-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frainoffallingstar%2Fpomodoroflow-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainoffallingstar%2Fpomodoroflow-rs/lists"}