Skip to content

About

A simple macOS Pomodoro app created by the BMad Method workflow

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

FocusTimerBmad 项目概览

版本: 1.0.0 状态: 开发中 最后更新: 2026-03-08


项目简介

FocusTimerBmad 是一款专为程序员设计的 macOS 原生应用,通过与系统专注模式深度集成实现专注时段的自动化管理。

核心价值

"开启番茄钟 = 进入专注状态"的一键体验,消除手动切换负担,让程序员真正专注于核心工作而不被消息干扰。

目标用户

  • 主要用户: 需要深度专注的程序员,特别是需要在深度编程和频繁沟通之间平衡的中型互联网公司开发者
  • 次要用户: 设计师、产品经理、内容创作者等需要深度专注但不是程序员的专业人士

核心功能

MVP 功能清单

功能 描述 优先级
番茄钟计时 固定时长(25分钟)和弹性时长(15-60分钟可调) P0
一键启动 菜单栏图标和全局快捷键启动 P0
专注模式集成 自动切换 macOS 专注模式 P0
状态同步 番茄钟状态与专注模式状态保持一致 P0
音效提醒 番茄钟结束时的声音提醒 P1
本地数据存储 用户设置和历史记录本地存储 P1

技术栈

开发语言

  • Swift 5.x - 主要开发语言
  • AppleScript - 系统自动化辅助

框架

框架 用途 版本要求
SwiftUI 用户界面 macOS 10.15+
AppKit 菜单栏特定功能 macOS 原生
Foundation 基础框架 -
Combine 响应式编程 macOS 10.15+
UserNotifications 通知管理 macOS 10.14+

系统要求

  • 最低版本: macOS 12.0 (Monterey)
  • 推荐版本: macOS 13.0 (Ventura) 及以上
  • 架构: Intel x86_64 / Apple Silicon (arm64)

项目结构

FocusTimerBmad/
├── FocusTimerBmad/                 # 主应用代码
│   ├── App/
│   │   ├── FocusTimerBmadApp.swift      # 应用入口
│   │   └── AppDelegate.swift            # 应用代理
│   ├── Core/
│   │   ├── PomodoroEngine/              # 番茄钟引擎
│   │   │   ├── PomodoroEngine.swift
│   │   │   ├── PomodoroSession.swift
│   │   │   └── TimerManager.swift
│   │   ├── FocusMode/                   # 专注模式控制
│   │   │   ├── FocusModeController.swift        # 抽象接口
│   │   │   ├── FocusModeManager.swift           # 管理器
│   │   │   ├── PrivateAPIFocusController.swift  # 私有API实现
│   │   │   └── SemiAutoFocusController.swift    # 半自动实现
│   │   └── Data/                        # 数据管理
│   │       ├── DataStore.swift
│   │       ├── UserDefaults+Extensions.swift
│   │       └── HistoryManager.swift
│   ├── UI/
│   │   ├── MenuBar/
│   │   │   ├── MenuBarView.swift
│   │   │   ├── MenuBarController.swift
│   │   │   └── ProgressIcon.swift
│   │   ├── Settings/
│   │   │   ├── SettingsView.swift
│   │   │   └── SettingsViewModel.swift
│   │   └── Components/
│   │       └── SessionHistoryView.swift
│   ├── Utilities/
│   │   ├── SoundManager.swift
│   │   ├── HotKeyManager.swift
│   │   └── NotificationManager.swift
│   └── Resources/
│       ├── Assets.xcassets
│       └── Sounds/
├── FocusTimerBmadTests/             # 单元测试
├── FocusTimerBmadUITests/           # UI 测试
├── docs/                            # 项目文档
│   ├── README.md                    # 本文件
│   ├── ARCHITECTURE.md              # 技术架构文档
│   ├── IMPLEMENTATION.md            # 实现指南
│   ├── API.md                       # API 文档
│   └── PRIVACY.md                   # 隐私和合规说明
└── _bmad-output/                    # BMAD 工作流输出

开发指南

环境要求

  • Xcode: 14.0 或更高版本
  • macOS SDK: 12.0 或更高版本
  • Swift: 5.7 或更高版本

快速开始

# 克隆项目
git clone https://github.com/yourusername/FocusTimerBmad.git
cd FocusTimerBmad

# 在 Xcode 中打开
open FocusTimerBmad.xcodeproj

# 构建并运行
# ⌘ + R

开发工作流

  1. 创建功能分支: git checkout -b feature/your-feature
  2. 开发功能: 按照实现指南进行开发
  3. 编写测试: 为新功能添加单元测试
  4. 提交代码: git commit -m "feat: add your feature"
  5. 创建 Pull Request: 进行代码审查

发布策略

当前阶段

  • 阶段: MVP 开发
  • 目标: 验证核心功能可行性
  • 发布方式: 内部测试 / 小范围分发

未来计划

  • Phase 1: MVP 内测
  • Phase 2: 功能增强和数据统计
  • Phase 3: 公开发布(GitHub Releases)
  • Phase 4: 考虑 App Store 发布(仅半自动版本)

限制和注意事项

技术限制

  • 私有 API 使用: 当前使用私有 API 实现专注模式控制,无法通过 App Store 审核
  • 系统依赖: 依赖 macOS 系统功能,可能随系统更新而需要适配
  • 兼容性: 仅支持 macOS 12.0 及以上版本

使用限制

  • 个人使用: 建议仅用于个人使用,不公开发布到 App Store
  • 风险告知: 用户需了解私有 API 的使用风险
  • 版本适配: 系统更新后可能需要等待应用更新

许可证

版权所有 © 2026 Polym

本项目仅供个人学习和研究使用。


联系方式


更新日志

v1.0.0 (2026-03-08)

  • 初始版本
  • 实现基础番茄钟功能
  • 实现专注模式集成(私有 API + 半自动回退)
  • 实现菜单栏界面

About

A simple macOS Pomodoro app created by the BMad Method workflow

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages