From 15252dfd887cfbd3c809b6f956834d9ef84e6079 Mon Sep 17 00:00:00 2001 From: ytc1012 <18001193130@163.com> Date: Thu, 27 Nov 2025 14:00:13 +0800 Subject: [PATCH] update md --- README.md | 362 ++++++++++--------------------- app-store-metadata.md | 2 +- privacy-policy.md | 14 +- product-design.md | 485 ++++++++++++++++++++++-------------------- ui-design-spec.md | 472 ++++++++++++++++++++-------------------- 5 files changed, 612 insertions(+), 723 deletions(-) diff --git a/README.md b/README.md index 95599f6..4cc0466 100644 --- a/README.md +++ b/README.md @@ -1,174 +1,131 @@ -# FocusBuddy 产品优化总结 +# FocusBuddy 产品实现总结 -**优化日期**: 2025年11月22日 -**目标**: 打造一个 4 周内可上线的 MVP 版本 -**策略**: 删繁就简,聚焦核心价值 +**实现日期**: 2025年11月27日 +**状态**: 已完成 MVP 版本开发 +**核心价值**: 无惩罚专注,温柔回归 --- -## 📂 新增文档清单 - -已为你创建以下完整的产品文档: +## 📂 文档清单 | 文档 | 路径 | 用途 | |------|------|------| -| ✅ 产品设计 | [product-design.md](product-design.md) | 原始完整方案 | -| ✅ UI 设计规范 | [ui-design-spec.md](ui-design-spec.md) | 完整的 UI/UX 细节(已补全) | -| ✅ 隐私政策 | [privacy-policy.md](privacy-policy.md) | 需填写开发者信息 | -| ✅ **MVP 上线清单** | [mvp-launch-checklist.md](mvp-launch-checklist.md) | **核心文档!必读** | -| ✅ **应用商店文案** | [app-store-metadata.md](app-store-metadata.md) | 上架时直接复制使用 | +| ✅ 产品设计 | [product-design.md](product-design.md) | 产品理念和市场定位 | +| ✅ UI 设计规范 | [ui-design-spec.md](ui-design-spec.md) | UI/UX 设计细节 | +| ✅ 隐私政策 | [privacy-policy.md](privacy-policy.md) | 隐私保护声明 | +| ✅ 应用商店文案 | [app-store-metadata.md](app-store-metadata.md) | 上架时直接复制使用 | | ✅ 服务条款 | [terms-of-service.md](terms-of-service.md) | 上架必须项 | --- -## 🎯 核心优化建议汇总 +## 🎯 已实现核心功能 -### 1. 功能精简(最重要) +### 1. 页面功能 -#### 从原方案删除/延后的功能: +| 页面 | 功能 | 说明 | +|------|------|------| +| **Home** | 一键开始专注 | 显示积分卡片、应用标题、时长选择、开始专注按钮和底部导航 | +| **Focus** | 专注计时 | 显示计时器、分心按钮和暂停按钮 | +| **Complete** | 专注完成 | 显示专注结果、鼓励文案和"Start Another"按钮 | +| **History** | 历史记录 | 显示当天记录列表,支持查看详情 | +| **Settings** | 设置选项 | 包含默认时长选项、语言选择和隐私政策链接 | +| **Profile** | 个人资料 | 显示积分、等级和连续签到记录 | +| **Onboarding** | 引导页 | 解释"无惩罚"理念,降低用户困惑 | -| 原功能 | 决策 | 原因 | -|--------|------|------| -| ⏸️ 时长滑动条(5-60分钟) | **延后到 V1.1** | 固定 25 分钟降低复杂度 | -| ⏸️ 白噪音播放 | **延后到 V1.1** | 需要音频资源 + 测试成本高 | -| ⏸️ PDF 报告导出 | **延后到 V1.2** | 用户需求未验证,开发成本高 | -| ⏸️ Lottie 动画 | **简化为静态** | 节省 3 天开发时间 | -| ⏸️ 主题皮肤系统 | **改用文字徽章** | 设计成本太高 | -| ⏸️ 每周趋势图表 | **仅显示今日** | 图表库集成复杂 | -| ❌ TopOn 广告聚合 | **删除** | AdMob 已足够,过度优化 | -| ❌ Body Doubling Lite | **删除** | 概念模糊,非核心价值 | +### 2. 核心功能 -#### MVP 保留的核心功能(3 个页面): - -✅ **Home** - 一键开始专注(25 分钟固定) -✅ **Focus** - "I got distracted" 按钮 + 4 种分心分类 -✅ **Complete** - 今日统计 + 鼓励文案 + "Start Another" - -**附加简化页面:** -- History(仅显示当天记录列表) -- Settings(默认时长 3 选项 + 隐私政策链接) +| 功能 | 说明 | +|------|------| +| **无惩罚机制** | 分心不中断计时,不断连成就,不重置进度 | +| **分心记录** | "I got distracted"按钮 + 4种分心分类(社交媒体、被打断、感到压力、走神) | +| **温柔鼓励** | 随机显示15条鼓励文案,如"Showing up is half the battle" | +| **本地存储** | 使用Hive进行数据存储,所有数据仅存于设备 | +| **多语言支持** | 支持14种语言(英语、中文、日语、韩语、西班牙语、德语、法语、葡萄牙语、俄语、印地语、印度尼西亚语、意大利语、阿拉伯语) | +| **通知功能** | 后台计时通知,提醒用户正在计时中 | +| **积分系统** | 完成专注获得积分,提升等级 | +| **提前停止确认** | 点击Stop时友好提示,防止误操作 | +| **空状态提示** | History页无数据时引导用户 | --- -### 2. 新增必要功能 +### 3. 技术栈实现 -#### 原方案缺失的功能: - -| 新增功能 | 优先级 | 开发时间 | 用途 | -|---------|--------|---------|------| -| **Onboarding 引导页** | P0 | 1 天 | 解释"无惩罚"理念,降低用户困惑 | -| **空状态提示** | P0 | 0.5 天 | History 页无数据时引导用户 | -| **后台计时通知** | P1 | 0.5 天 | 切到后台时提醒"正在计时中" | -| **提前停止确认** | P1 | 0.5 天 | 点击 Stop 时友好提示 | - ---- - -### 3. 技术栈优化 - -#### 依赖包精简(减少 4 个依赖): - -**MVP 必须集成:** +**已集成依赖包:** ```yaml dependencies: + flutter: ^3.10.0-290.4.beta + flutter_localizations: ^0.1.0 + cupertino_icons: ^1.0.8 hive: ^2.2.3 # 本地存储 hive_flutter: ^1.1.0 flutter_local_notifications: ^17.0.0 # 通知 - path_provider: ^2.1.0 + permission_handler: ^11.0.0 # 权限管理 + path_provider: ^2.1.0 # 文件路径 + shared_preferences: ^2.2.0 # 简单键值存储 + intl: ^0.20.2 # 日期格式化和国际化 + google_fonts: ^6.1.0 # Google Fonts (Nunito) + get_it: ^7.7.0 # 依赖注入框架 ``` -**延后集成:** +**开发工具:** ```yaml -# workmanager: ^0.5.2 # 后台任务(MVP 不需要) -# lottie: ^3.0.0 # 动画(用静态替代) -# just_audio: ^0.9.36 # 音频(延后) -# pdf: ^3.10.0 # PDF导出(延后) -# google_mobile_ads: ^4.0.0 # 广告(V1.0.1 再加) +dev_dependencies: + flutter_test: ^0.0.0 + flutter_lints: ^6.0.0 + hive_generator: ^2.0.0 # Hive代码生成 + build_runner: ^2.4.0 # 构建工具 ``` -**节省开发时间**: 约 2-3 天 +--- + +## 📱 应用特点 + +### 1. 无惩罚机制 +- 分心不中断计时 +- 不断连成就 +- 不重置进度 +- 温柔鼓励文案 + +### 2. 本地优先 +- 所有数据仅存于设备 +- 不联网、不上传 +- 保护用户隐私 + +### 3. 情绪友好 +- 柔和的颜色搭配 +- 清晰的字体设计 +- 简单的交互流程 +- 温暖的鼓励文案 + +### 4. 多语言支持 +- 支持14种语言 +- 本地化资源完整 +- 支持动态切换语言 --- -### 4. 开发路线图调整 +## 🚀 上线准备 -#### 原方案(4 周,过于激进): +### 1. 应用商店准备 -| 周数 | 原计划 | 风险 | -|-----|--------|------| -| 第1周 | UI + 基础计时器 | ⚠️ 偏紧 | -| 第2周 | 分心记录 + Hive | ✅ 可行 | -| 第3周 | 报告 + 成就 | ⚠️ 功能太多 | -| 第4周 | 广告 + 测试 | ❌ 过于乐观 | - -#### 优化后路线图(4 周,更现实): - -| 周数 | 目标 | 产出 | -|-----|------|------| -| **Week 1** | 核心框架 + 基础 UI | 能跑通 Home → Focus → Complete 流程 | -| **Week 2** | 数据存储 + 分心记录 | 能保存数据,能看到历史 | -| **Week 3** | 设置页 + 通知 + 真机测试 | 功能完整,可交给朋友测试 | -| **Week 4** | 上架准备 + 提交审核 | 提交 App Store & Play Store | - -**详细每日任务**: 见 [mvp-launch-checklist.md](mvp-launch-checklist.md:275-347) - ---- - -### 5. 上线前必备清单 - -#### 应用商店准备(⚠️ 提前做): - -**iOS App Store ($99/年):** -- [ ] 注册 Apple Developer 账号(需 1-2 天审核) +**iOS App Store:** +- [ ] 注册 Apple Developer 账号($99,需 1-2 天审核) - [ ] 准备 App 图标 1024×1024 - [ ] 准备 6.5" iPhone 截图(至少 3 张) - [ ] 托管隐私政策(GitHub Pages 免费) -- [ ] 填写应用描述(见 [app-store-metadata.md](app-store-metadata.md:7-106)) +- [ ] 填写应用描述(见 [app-store-metadata.md](app-store-metadata.md)) -**Google Play Store ($25 一次性):** -- [ ] 注册 Google Play Console 账号 +**Google Play Store:** +- [ ] 注册 Google Play Console 账号($25,立即生效) - [ ] 准备 App 图标 512×512 - [ ] 准备截图(至少 2 张) -- [ ] 填写应用描述(见 [app-store-metadata.md](app-store-metadata.md:110-191)) +- [ ] 填写应用描述(见 [app-store-metadata.md](app-store-metadata.md)) -**合规文档(⚠️ 必须):** -- [ ] 填写 [privacy-policy.md](privacy-policy.md:4) 开发者信息 +### 2. 合规文档 + +- [ ] 托管 [privacy-policy.md](privacy-policy.md) 到可访问的 URL - [ ] 托管 [terms-of-service.md](terms-of-service.md) 到可访问的 URL -- [ ] 创建支持邮箱: focusbuddy.support@gmail.com - ---- - -### 6. 商业化策略优化 - -#### 原方案问题: -- ❌ 首版就加广告 → 审核通过率低 + 用户体验差 -- ❌ 主题皮肤变现 → 开发成本高,收益不确定 - -#### 优化后策略: - -| 版本 | 变现方式 | 说明 | -|------|---------|------| -| **V1.0 (MVP)** | 完全免费,无广告 | 快速获取用户,验证产品价值 | -| **V1.1** | 激励视频广告 | 等下载量 > 1000 再加 | -| **V1.2** | IAP 去广告 $1.99 | 比原方案 $2.99 便宜,提高转化 | -| **V2.0** | Pro 订阅 $0.99/月 | 含白噪音 + PDF 报告等高级功能 | - -**首月目标(V1.0):** -- 下载量 > 500 -- Day7 留存率 > 20% -- 如果达不到 → 说明产品体验有问题,需迭代核心功能 - ---- - -## ⚠️ 最大风险预警 - -### 可能导致项目失败的风险: - -| 风险 | 概率 | 缓解措施 | -|------|------|---------| -| **iOS 审核被拒** | 60% | 不使用"ADHD 治疗"等医疗词汇,强调"productivity tool" | -| **真机测试发现严重 Bug** | 50% | 第 2 周即开始真机测试,不要等到最后 | -| **开发周期延误** | 40% | 严格遵守功能精简,抵制"再加一个小功能"的诱惑 | -| **产品留存率过低** | 30% | 如果 Day7 < 20%,说明核心价值不成立,需要重新思考 | +- [ ] 创建支持邮箱: focusbuddy.app@outlook.com --- @@ -179,131 +136,34 @@ dependencies: | **下载量** | > 500 | App Store Connect / Play Console | | **Day1 留存** | > 40% | 手动记录(对比首日下载 vs 次日活跃) | | **Day7 留存** | > 20% | 同上 | -| **人均完成专注数** | > 3 次/周 | 后端分析(如果加了 Firebase) | +| **人均完成专注数** | > 3 次/周 | 本地数据统计 | | **Crash 率** | < 2% | Firebase Crashlytics(免费版) | | **评分** | > 4.0 | App Store / Play Store | -**如果指标不达标** → 说明产品体验有问题,需要: -1. 收集用户反馈(邮件 + Reddit 评论) -2. 分析流失环节(哪一步用户离开了?) -3. 快速迭代核心功能 +--- + +## 💡 产品亮点 + +### 1. 无惩罚专注 +- 传统番茄钟工具强调"完成",失败即惩罚 +- FocusBuddy 允许分心,鼓励温柔回归 +- 降低用户焦虑,提高持续使用意愿 + +### 2. 本地优先 +- 所有数据仅存于设备,保护用户隐私 +- 无需账号,无需联网,随时可用 +- 适合注重隐私的用户 + +### 3. 情绪友好 +- 柔和的颜色搭配,减少视觉刺激 +- 温暖的鼓励文案,增强用户信心 +- 简单的交互流程,降低使用门槛 + +### 4. 多语言支持 +- 支持14种语言,覆盖全球主要市场 +- 本地化资源完整,提供良好的用户体验 --- -## 🚀 接下来的行动步骤 - -### 立即执行(今天): - -1. **阅读核心文档** - - [ ] 完整阅读 [mvp-launch-checklist.md](mvp-launch-checklist.md) - - [ ] 确认是否接受功能精简建议 - - [ ] 理解 4 周开发路线图 - -2. **填写必要信息** - - [ ] 填写 [privacy-policy.md](privacy-policy.md:4) 中的开发者信息 - - [ ] 修改 [terms-of-service.md](terms-of-service.md:96) 中的管辖地 - - [ ] 决定是否需要创建网站托管文档 - -3. **账号准备** - - [ ] 注册 Apple Developer 账号($99,需 1-2 天审核) - - [ ] 注册 Google Play Console 账号($25,立即生效) - - [ ] 创建支持邮箱: focusbuddy.support@gmail.com - -### 第 1 周准备(开发前): - -4. **开发环境** - - [ ] 安装 Flutter SDK(稳定版 3.16+) - - [ ] 配置 iOS / Android 开发环境 - - [ ] 跑通 Hello World 项目 - -5. **设计资源** - - [ ] 设计 App 图标(或使用 Figma/Canva 模板) - - [ ] 如果不擅长设计,考虑花 $20-50 找 Fiverr 设计师 - -6. **最终确认** - - [ ] 确认产品名称(FocusBuddy 还是备选?) - - [ ] 检查名称在 App Store / Play Store 是否可用 - - [ ] 准备好 15 条鼓励文案(见 [ui-design-spec.md](ui-design-spec.md:710-726)) - ---- - -## 📚 文档使用指南 - -### 各文档用途: - -| 阶段 | 使用文档 | 目的 | -|------|---------|------| -| **产品规划** | [product-design.md](product-design.md) | 理解产品理念和市场定位 | -| **开发阶段** | [ui-design-spec.md](ui-design-spec.md) | 参考所有 UI 组件、颜色、字体规范 | -| **开发阶段** | [mvp-launch-checklist.md](mvp-launch-checklist.md) | 每日对照开发任务,避免功能蔓延 | -| **上架准备** | [app-store-metadata.md](app-store-metadata.md) | 直接复制应用描述、关键词等 | -| **上架准备** | [privacy-policy.md](privacy-policy.md) + [terms-of-service.md](terms-of-service.md) | 托管到 GitHub Pages,填写 URL | -| **推广阶段** | [app-store-metadata.md](app-store-metadata.md:195-251) | 使用 Reddit/TikTok 文案模板 | - ---- - -## 💡 最后的建议 - -### 1. 抵制功能蔓延 -**最大的风险是:边做边想"再加个小功能"** - -坚持原则: -- ✅ 如果不影响核心价值("无惩罚专注"),就延后 -- ❌ 不要因为"很简单"就加 → 累积起来会拖垮进度 - -### 2. 快速上线 > 完美产品 -**4 周内必须提交审核** - -记住: -- V1.0 不需要完美,只需要能用 -- 真实用户反馈比你脑补重要 100 倍 -- 上线后可以快速迭代 - -### 3. 保持核心差异化 -**唯一不能妥协的:** "I got distracted" 按钮的体验 - -确保: -- 点击后真的不中断计时 -- 鼓励文案真的让人感到温暖 -- 没有任何"惩罚"的视觉暗示(红色、失败音效等) - -### 4. 记录开发日志 -建议每天记录: -- 今天完成了什么 -- 遇到了什么困难 -- 是否按计划推进 - -**好处:** -- 上线后可以写"How I Built This"推广文章 -- 如果延期,能清楚知道时间花在哪了 - ---- - -## 🎯 最核心的一句话 - -> **"先做一个可上线的版本" = 只做让用户愿意回来的功能** - -对 FocusBuddy 来说,这个功能就是: -**"I got distracted" 按钮 + 温柔的鼓励文案** - -其他一切都是锦上添花。 - ---- - -**祝你开发顺利!** 🚀 - -有任何问题,随时继续问我。接下来你可以: -1. 开始注册开发者账号 -2. 搭建 Flutter 环境 -3. 按照 Week 1 的任务开始写代码 - -或者如果还有疑问,我可以帮你: -- 细化某一周的开发任务 -- 写示例代码(如计时器逻辑、Hive 数据结构) -- 优化应用商店描述文案 -- 解答任何技术或产品问题 - ---- - -**文档状态:** ✅ 已完成所有优化建议 -**最后更新:** 2025年11月22日 +**文档状态:** ✅ 已完成 MVP 版本开发 +**最后更新:** 2025年11月27日 diff --git a/app-store-metadata.md b/app-store-metadata.md index 87702a9..35ecc45 100644 --- a/app-store-metadata.md +++ b/app-store-metadata.md @@ -2,7 +2,7 @@ **Product:** FocusBuddy **Version:** 1.0 (MVP) -**Last Updated:** November 22, 2025 +**Last Updated:** 2025年11月27日 --- diff --git a/privacy-policy.md b/privacy-policy.md index 8502d98..3494aaa 100644 --- a/privacy-policy.md +++ b/privacy-policy.md @@ -1,6 +1,6 @@ # Privacy Policy for FocusBuddy -**Last Updated**: November 22, 2025 +**Last Updated**: 2025年11月27日 **Developer**: FocusBuddy Team **Contact**: focusbuddy.app@outlook.com @@ -13,15 +13,11 @@ This Privacy Policy describes how **FocusBuddy** (the “App”) handles your in - There is **no cloud sync**, no account system, and no analytics tracking. - The App works completely offline — even without an internet connection. -## 2. Third-Party Advertising +## 2. No Third-Party Advertising -- We use **Google AdMob** to display optional ads, such as: - - Rewarded videos (e.g., “Watch ad to unlock a new theme”) - - Occasional interstitial ads (shown after every few sessions, skippable) -- AdMob may collect limited non-personal information (like device model, OS version, or approximate IP address) to serve relevant ads, in accordance with [Google’s Privacy Policy](https://policies.google.com/privacy). -- You can opt out of personalized advertising: - - **On Android**: Settings → Google → Ads → “Opt out of Ads Personalization” - - **On iOS**: Settings → Privacy & Security → Apple Advertising → Toggle off “Personalized Ads” +- The current version of FocusBuddy does not contain any advertising. +- We do not use any ad networks or display any ads within the app. +- No ad-related data is collected or processed. ## 3. No Analytics or Tracking SDKs diff --git a/product-design.md b/product-design.md index 129f454..0bbfa77 100644 --- a/product-design.md +++ b/product-design.md @@ -1,230 +1,255 @@ -# ADHD 专注伴侣产品方案(个人开发者版) - -> **产品名称**:FocusBuddy(暂定,备选:GentleFlow,MindAnchor,ComeBack Timer,SoftFocus) -> **定位**:一款为神经多样性人群设计的、无惩罚、情感支持型专注工具 -> **目标**:帮助用户温柔地回到当下,而非追求“高效” -> **适用平台**:iOS + Android(Flutter 跨平台) -> **开发周期**:4–6 周 MVP -> **作者**:个人开发者 -> **最后更新**:2025年11月22日 - ---- - -## 一、产品背景与市场机会 - -### 1.1 用户痛点 -- ADHD 及注意力困难人群常因“无法专注”产生自我批评; -- 现有番茄钟工具强调“完成”,失败即惩罚(如 Forest 树枯死),加剧焦虑; -- 用户需要的是“允许分心 + 温柔回归”的支持机制,而非效率压榨。 - -### 1.2 市场验证 -- 全球约 **4–5% 成年人**存在 ADHD 特征(CHADD 数据); -- Reddit r/ADHD 拥有 **超 200 万订阅者**,TikTok #ADHDTips 话题播放量超 **10 亿**; -- 竞品如 Tiimo(估值 $1 亿)、Focus Keeper(长期付费榜前列)证明付费意愿强; -- **空白点**:缺乏轻量、离线、情绪友好的垂直工具。 - -### 1.3 为什么适合个人开发者? -- 功能聚焦,无需后端; -- 开发成本低(纯本地逻辑); -- 广告变现路径清晰; -- 社区自传播潜力大。 - ---- - -## 二、产品定位与原则 - -### 2.1 核心理念 -> “专注不是坚持不走神,而是每次走神后,都愿意轻轻回来。” - -### 2.2 三大设计原则 -| 原则 | 说明 | -|------|------| -| **无惩罚机制** | 分心不中断计时,不断连成就,不重置进度 | -| **本地优先** | 所有数据仅存于设备,不联网、不上传 | -| **情绪友好** | 用鼓励文案、柔和动效、低刺激视觉降低焦虑 | - -### 2.3 避免踩坑 -- ❌ 不使用 “ADHD”、“治疗”、“诊断” 等医疗词汇; -- ✅ 定位为 “focus support tool for neurodivergent minds”; -- ✅ 强调 “gentle”, “kind”, “no guilt”。 - ---- - -## 三、核心功能(MVP) - -### 3.1 功能列表 - -| 模块 | 功能 | 说明 | -|------|------|------| -| **启动页** | 一键开始专注 | 默认 25 分钟,可滑动调整(5–60 分钟) | -| **专注中** | “I got distracted” 按钮 | 点击记录分心类型,不中断计时 | -| **分心分类** | 4 种常见场景 | • Scrolling social media
• Got interrupted
• Felt overwhelmed
• Just zoned out | -| **温柔回归** | 鼓励反馈 | 显示文案:“It happens. Let’s gently come back.” + 轻柔音效 | -| **专注报告** | 每日总结卡片 | 含总时长、分心趋势、随机鼓励语 | -| **成就系统** | 连续完成奖励 | 解锁主题皮肤(如 “Calm Cloud”) | -| **广告激励** | 可选看广告 | 解锁新主题或恢复断连(非强制) | - -### 3.2 差异化亮点 -- **Body Doubling Lite**:未来可扩展静默陪伴视频(当前 MVP 暂不实现); -- **ASMR 音效**:集成免费 CC 协议白噪音(雨声、键盘声); -- **Export Report**:生成 PDF 周报(用户主动触发,用于与治疗师分享)。 - ---- - -## 四、UI/UX 设计 - -### 4.1 视觉风格 -- **色彩**:莫兰迪色系(主色 `#A7C4BC`,背景 `#F8F6F2`) -- **字体**:Nunito(圆润、易读) -- **图标**:手绘感、轻微不规则 -- **动效**:缓慢粒子飘动、按钮呼吸动画 - -### 4.2 核心页面(Figma 原型) - -#### 页面 1:启动页(Home) -``` -[居中大按钮] Start Focusing (25 min) -[小字提示] Tap 'I got distracted' anytime — no guilt. -``` - -#### 页面 2:专注中(During Focus) -``` -24:37 -[按钮] I got distracted Pause -(点击后弹出分心类型选项) -``` - -#### 页面 3:专注报告(Summary) -``` -✅ You focused for 24 minutes today. -📊 Distractions: 2 times -🌱 Achievement unlocked: "Calm Cloud" -[按钮] Watch ad to unlock next theme -``` - -### 4.3 鼓励文案库(随机展示) -- “Showing up is half the battle.” -- “Every minute counts.” -- “You’re learning, not failing.” -- “Gentleness is strength.” - ---- - -## 五、技术实现 - -### 5.1 技术栈 -| 组件 | 方案 | -|------|------| -| 跨平台框架 | Flutter | -| 本地存储 | Hive(加密支持) | -| 定时与通知 | flutter_local_notifications + workmanager | -| 动画 | Lottie / Rive | -| 音频 | just_audio | -| 广告 | Google AdMob + TopOn 聚合(可选) | - -### 5.2 数据结构(Hive) -```dart -class FocusSession { - DateTime startTime; - int durationMinutes; - List distractions; -} - -class Distraction { - String type; // e.g., "social", "interrupted" - DateTime time; -} -``` - -### 5.3 开发里程碑 -| 周数 | 目标 | -|------|------| -| 第1周 | UI + 基础计时器 | -| 第2周 | 分心记录 + Hive 存储 | -| 第3周 | 报告生成 + 成就系统 | -| 第4周 | 广告接入 + 测试发布 | - -### 5.4 多语言支持 -#### 高优先级 -日语 (Japanese) 🇯🇵 -原因: 日本对生产力工具和专注应用有极高需求 -特点: ADHD 和神经多样性支持在日本很受关注 -市场: 日本的 App Store 付费意愿很高 -韩语 (Korean) 🇰🇷 -原因: 韩国学生和上班族对学习/工作效率工具需求很大 -特点: "番茄工作法"和专注应用在韩国非常流行 -市场: K-pop 文化影响,年轻用户群体活跃 -西班牙语 (Spanish) 🇪🇸 🇲🇽 -原因: 全球第二大母语人口(4.5亿+) -覆盖: 西班牙、墨西哥、阿根廷、哥伦比亚等20+国家 -市场: 拉丁美洲移动应用市场快速增长 -#### 中等优先级 -德语 (German) 🇩🇪 -德国、奥地利、瑞士 -注重隐私和离线功能(你的卖点!) -付费意愿高 -法语 (French) 🇫🇷 -法国、加拿大(魁北克)、比利时、瑞士 -约3亿使用者 -葡萄牙语 (Portuguese) 🇧🇷 -巴西(2.2亿人口) -快速增长的移动市场 -俄语 (Russian) 🇷🇺 -俄罗斯、独联体国家 -约2.6亿使用者 -#### 长期考虑 -意大利语 (Italian) 🇮🇹 -荷兰语 (Dutch) 🇳🇱 -土耳其语 (Turkish) 🇹🇷 - ---- - -## 六、合规与隐私 - -### 6.1 隐私政策要点 -- **无数据收集**:所有数据仅存于设备; -- **无分析 SDK**:不使用 Firebase、GA 等; -- **广告透明**:说明 AdMob 使用,提供个性化广告关闭指引; -- **非医疗工具**:明确声明不用于诊断或治疗。 - -### 6.2 隐私政策模板(摘要) -> “FocusBuddy is 100% offline. We do not collect your name, email, location, or usage data. All sessions stay on your device. We use Google AdMob for optional ads, which you can disable via device settings.” - -(完整模板见附件) - ---- - -## 七、变现模型 - -| 收入来源 | 实现方式 | 预期占比 | -|--------|--------|--------| -| 激励视频广告 | 完成专注后解锁主题 | 70% | -| 插屏广告 | 每3次专注展示1次(可跳过) | 20% | -| 去广告内购 | $2.99 一次性购买 | 10% | -| 主题包(未来) | $0.99 解锁新皮肤 | 增量 | - -### 收益预估(1万下载,10% DAU = 1000人): -- 日收入 ≈ $3–5 -- 月收入 ≈ $90–150(初期),随留存提升可翻倍 - ---- - -## 八、推广策略(零预算冷启动) - -1. **Reddit 渗透** - - 发帖 r/ADHD:“Made a focus app that doesn’t shame you—feedback welcome!” -2. **TikTok 短视频** - - 内容:“How I stopped hating myself for losing focus” -3. **Product Hunt 首发** - - 标题:“A focus timer for people who hate focus timers” -4. **ADHD 博主合作** - - 免费提供 Pro 版,换取真实测评 - ---- - -> **愿景**: -> 让每一个“不同大脑”的人,都能在专注的路上,被温柔以待。 - ---- - -> ✨ **备注**:本方案专为个人开发者设计,强调最小可行、快速验证、情感价值优先。 \ No newline at end of file +# FocusBuddy 产品设计文档 + +> **产品名称**:FocusBuddy +> **定位**:一款为神经多样性人群设计的、无惩罚、情感支持型专注工具 +> **目标**:帮助用户温柔地回到当下,而非追求“高效” +> **适用平台**:iOS + Android(Flutter 跨平台) +> **开发状态**:已完成 MVP 版本 +> **最后更新**:2025年11月27日 + +--- + +## 一、产品背景与市场机会 + +### 1.1 用户痛点 +- ADHD 及注意力困难人群常因“无法专注”产生自我批评; +- 现有番茄钟工具强调“完成”,失败即惩罚(如 Forest 树枯死),加剧焦虑; +- 用户需要的是“允许分心 + 温柔回归”的支持机制,而非效率压榨。 + +### 1.2 市场验证 +- 全球约 **4–5% 成年人**存在 ADHD 特征(CHADD 数据); +- Reddit r/ADHD 拥有 **超 200 万订阅者**,TikTok #ADHDTips 话题播放量超 **10 亿**; +- 竞品如 Tiimo(估值 $1 亿)、Focus Keeper(长期付费榜前列)证明付费意愿强; +- **空白点**:缺乏轻量、离线、情绪友好的垂直工具。 + +### 1.3 产品优势 +- 功能聚焦,无需后端; +- 开发成本低(纯本地逻辑); +- 无广告干扰,用户体验良好; +- 社区自传播潜力大。 + +--- + +## 二、产品定位与原则 + +### 2.1 核心理念 +> “专注不是坚持不走神,而是每次走神后,都愿意轻轻回来。” + +### 2.2 三大设计原则 +| 原则 | 说明 | +|------|------| +| **无惩罚机制** | 分心不中断计时,不断连成就,不重置进度 | +| **本地优先** | 所有数据仅存于设备,不联网、不上传 | +| **情绪友好** | 用鼓励文案、柔和动效、低刺激视觉降低焦虑 | + +### 2.3 避免踩坑 +- ❌ 不使用 “ADHD”、“治疗”、“诊断” 等医疗词汇; +- ✅ 定位为 “focus support tool for neurodivergent minds”; +- ✅ 强调 “gentle”, “kind”, “no guilt”。 + +--- + +## 三、已实现核心功能 + +### 3.1 页面功能 + +| 页面 | 功能 | 说明 | +|------|------|------| +| **Home** | 一键开始专注 | 显示积分卡片、应用标题、时长选择、开始专注按钮和底部导航 | +| **Focus** | 专注计时 | 显示计时器、分心按钮和暂停按钮 | +| **Complete** | 专注完成 | 显示专注结果、鼓励文案和"Start Another"按钮 | +| **History** | 历史记录 | 显示当天记录列表,支持查看详情 | +| **Settings** | 设置选项 | 包含默认时长选项、语言选择和隐私政策链接 | +| **Profile** | 个人资料 | 显示积分、等级和连续签到记录 | +| **Onboarding** | 引导页 | 解释"无惩罚"理念,降低用户困惑 | +| **Session Detail** | 会话详情 | 显示单个专注会话的详细信息 | + +### 3.2 核心功能 + +| 功能 | 说明 | +|------|------| +| **无惩罚机制** | 分心不中断计时,不断连成就,不重置进度 | +| **分心记录** | "I got distracted"按钮 + 4种分心分类(社交媒体、被打断、感到压力、走神) | +| **温柔鼓励** | 随机显示15条鼓励文案,如"Showing up is half the battle" | +| **本地存储** | 使用Hive进行数据存储,所有数据仅存于设备 | +| **多语言支持** | 支持14种语言(英语、中文、日语、韩语、西班牙语、德语、法语、葡萄牙语、俄语、印地语、印度尼西亚语、意大利语、阿拉伯语) | +| **通知功能** | 后台计时通知,提醒用户正在计时中 | +| **积分系统** | 完成专注获得积分,提升等级 | +| **提前停止确认** | 点击Stop时友好提示,防止误操作 | +| **空状态提示** | History页无数据时引导用户 | + +--- + +## 四、UI/UX 设计 + +### 4.1 视觉风格 +- **色彩**:莫兰迪色系(主色 `#A7C4BC`,背景 `#F8F6F2`) +- **字体**:Nunito(圆润、易读) +- **图标**:简洁、清晰的 Material Design 图标 +- **动效**:柔和的过渡动画,避免快速、刺激的动效 + +### 4.2 核心页面设计 + +#### 页面 1:Home Screen +- 顶部显示积分卡片,包含积分、等级和连续签到记录 +- 中间显示应用标题和时长选择 +- 底部显示开始专注按钮和导航栏(历史、设置) + +#### 页面 2:Focus Screen +- 中央显示大字体计时器 +- 下方显示"I got distracted"按钮和暂停按钮 +- 支持后台计时和通知 + +#### 页面 3:Complete Screen +- 显示专注结果(时长、分心次数) +- 随机显示鼓励文案 +- 提供"Start Another"按钮 + +### 4.3 鼓励文案库 +存储在 `assets/encouragements.json` 中,包含15条鼓励文案: +```json +[ + "Showing up is half the battle.", + "Every minute counts.", + "You're learning, not failing.", + "Gentleness is strength.", + "Progress over perfection.", + "Your effort matters.", + "Small steps, big journey.", + "Be kind to your brain.", + "You're doing your best.", + "One moment at a time.", + "Focus is a practice, not a trait.", + "It's okay to take breaks.", + "You came back — that's what matters.", + "Celebrate trying, not just succeeding.", + "Your attention is valid." +] +``` + +--- + +## 五、技术实现 + +### 5.1 技术栈 +| 组件 | 方案 | +|------|------| +| 跨平台框架 | Flutter | +| 本地存储 | Hive(加密支持) | +| 定时与通知 | flutter_local_notifications | +| 权限管理 | permission_handler | +| 依赖注入 | get_it | +| 国际化 | flutter_localizations + intl | +| 字体 | Google Fonts (Nunito) | + +### 5.2 数据结构 + +**FocusSession 模型:** +```dart +class FocusSession { + DateTime startTime; + DateTime? endTime; + int durationMinutes; + List distractions; + bool isCompleted; +} +``` + +**Distraction 模型:** +```dart +class Distraction { + String type; // e.g., "social", "interrupted", "overwhelmed", "zoned_out" + DateTime time; +} +``` + +**UserProgress 模型:** +```dart +class UserProgress { + int totalPoints; + int level; + int consecutiveCheckIns; + bool hasCheckedInToday; + List achievements; +} +``` + +### 5.3 依赖包 + +**核心依赖:** +```yaml +dependencies: + flutter: ^3.10.0-290.4.beta + flutter_localizations: ^0.1.0 + cupertino_icons: ^1.0.8 + hive: ^2.2.3 # 本地存储 + hive_flutter: ^1.1.0 + flutter_local_notifications: ^17.0.0 # 通知 + permission_handler: ^11.0.0 # 权限管理 + path_provider: ^2.1.0 # 文件路径 + shared_preferences: ^2.2.0 # 简单键值存储 + intl: ^0.20.2 # 日期格式化和国际化 + google_fonts: ^6.1.0 # Google Fonts (Nunito) + get_it: ^7.7.0 # 依赖注入框架 +``` + +**开发工具:** +```yaml +dev_dependencies: + flutter_test: ^0.0.0 + flutter_lints: ^6.0.0 + hive_generator: ^2.0.0 # Hive代码生成 + build_runner: ^2.4.0 # 构建工具 +``` + +### 5.4 多语言支持 + +已实现14种语言支持: +- 英语 (English) 🇬🇧 +- 中文 (Chinese) 🇨🇳 +- 日语 (Japanese) 🇯🇵 +- 韩语 (Korean) 🇰🇷 +- 西班牙语 (Spanish) 🇪🇸 +- 德语 (German) 🇩🇪 +- 法语 (French) 🇫🇷 +- 葡萄牙语 (Portuguese) 🇧🇷 +- 俄语 (Russian) 🇷🇺 +- 印地语 (Hindi) 🇮🇳 +- 印度尼西亚语 (Indonesian) 🇮🇩 +- 意大利语 (Italian) 🇮🇹 +- 阿拉伯语 (Arabic) 🇸🇦 + +--- + +## 六、合规与隐私 + +### 6.1 隐私政策要点 +- **无数据收集**:所有数据仅存于设备; +- **无分析 SDK**:不使用 Firebase、GA 等; +- **无广告**:当前版本不包含任何广告; +- **非医疗工具**:明确声明不用于诊断或治疗。 + +### 6.2 隐私政策摘要 +> “FocusBuddy is 100% offline. We do not collect your name, email, location, or usage data. All sessions stay on your device. No account required. No tracking or analytics.” + +--- + +## 七、推广策略(零预算冷启动) + +1. **Reddit 渗透** + - 发帖 r/ADHD:“Made a focus app that doesn’t shame you—feedback welcome!” +2. **TikTok 短视频** + - 内容:“How I stopped hating myself for losing focus” +3. **Product Hunt 首发** + - 标题:“A focus timer for people who hate focus timers” +4. **ADHD 博主合作** + - 免费提供 Pro 版,换取真实测评 + +--- + +> **愿景**: +> 让每一个“不同大脑”的人,都能在专注的路上,被温柔以待。 + +--- + +> ✨ **备注**:本产品已完成 MVP 版本开发,可直接上架应用商店。 \ No newline at end of file diff --git a/ui-design-spec.md b/ui-design-spec.md index 1119fc6..6d54189 100644 --- a/ui-design-spec.md +++ b/ui-design-spec.md @@ -2,8 +2,9 @@ **Version**: 1.0 **Target Platforms**: iOS & Android (responsive) -**Framework**: Flutter-friendly +**Framework**: Flutter **Design Philosophy**: Calm • Gentle • Accessible • Neurodivergent-Friendly +**Implementation Status**: MVP 已完成 --- @@ -47,40 +48,40 @@ ## 4. Core Screens -### 4.1 Home Screen (Start Focus) +### 4.1 Home Screen **Layout:** ``` ┌─────────────────────────────────┐ +│ ┌───────────────────────────┐ │ +│ │ Points Card │ │ +│ │ ┌──────┬──────┬────────┐ │ │ +│ │ │⚡ 120│🎖️ Lv2│📅 Check │ │ │ +│ │ └──────┴──────┴────────┘ │ │ +│ └───────────────────────────┘ │ │ │ │ FocusBuddy │ ← App title (24px, centered) │ │ │ │ -│ [ 25 minutes ] │ ← Duration selector (slider below) -│ ◀─────────▶ │ ← Slider: 5min - 60min (step: 5) +│ [ 25 minutes ] │ ← Duration display (28px) │ │ │ │ │ ┌───────────────────────┐ │ -│ │ Start Focusing │ │ ← Primary button (#A7C4BC) -│ │ ▶ │ │ ← 56px height, rounded 16px +│ │ Start Focusing ▶ │ │ ← Primary button (#A7C4BC) │ └───────────────────────┘ │ │ │ │ "Tap 'I got distracted' │ ← Helper text (#8A9B9B) │ anytime — no guilt." │ ← 14px, centered │ │ │ │ -│ 📊 History ⚙️ Settings │ ← Bottom navigation (icons only) +│ 📊 History ⚙️ Settings │ ← Bottom navigation (text + icons) └─────────────────────────────────┘ ``` **Interactions:** -- Slider adjusts duration in real-time (haptic feedback on iOS) - "Start Focusing" button: Scale animation (0.95 → 1.0) on press - Transitions to "During Focus" screen with fade-in (300ms) - -**Animation:** -- Subtle particle floating in background (Lottie: `calm-particles.json`) -- Particles: 5-8 dots, opacity 0.1-0.3, slow drift upward +- Points card is tappable, navigates to Profile screen --- @@ -91,21 +92,16 @@ ┌─────────────────────────────────┐ │ │ │ 24:37 │ ← Timer (64px, #5B6D6D) -│ │ ← Breathing animation (scale 1.0-1.02) │ │ │ │ │ ┌───────────────────────┐ │ │ │ I got distracted │ │ ← Secondary button (#E0E0E0) -│ │ 🤚 │ │ ← 48px height, rounded 12px │ └───────────────────────┘ │ │ │ │ ┌───────────────────────┐ │ │ │ ⏸ Pause │ │ ← Tertiary button (outlined) │ └───────────────────────┘ │ ← Border: 1px #A7C4BC │ │ -│ │ -│ 🎵 White Noise: Rain ▼ │ ← Dropdown (bottom sheet) -│ │ └─────────────────────────────────┘ ``` @@ -113,7 +109,6 @@ - **Timer**: Count-down display, updates every second - **"I got distracted"** → Opens bottom sheet with 4 options - **Pause** → Shows "Resume" button + elapsed time badge -- **White Noise** → Bottom sheet: Off / Rain / Keyboard / Forest **Bottom Sheet: Distraction Types** ``` @@ -125,13 +120,11 @@ │ 😰 Felt overwhelmed │ ← Option 3 │ 💭 Just zoned out │ ← Option 4 │ │ -│ [Skip this time] │ ← Text button (optional) └─────────────────────────────────┘ ``` **Feedback after selection:** - Toast message: "It happens. Let's gently come back." (3s) -- Soft haptic pulse - Auto-dismiss bottom sheet - Timer continues running @@ -143,7 +136,7 @@ ``` ┌─────────────────────────────────┐ │ │ -│ ✨ │ ← Success icon (animated) +│ ✨ │ ← Success icon │ │ │ You focused for │ ← Headline (20px, #5B6D6D) │ 24 minutes │ ← Large number (32px, bold) @@ -156,75 +149,51 @@ │ │ the battle." │ │ ← Italic, #8A9B9B │ └─────────────────────────┘ │ │ │ -│ 🎁 Achievement Unlocked! │ ← Conditional (if milestone hit) -│ "Calm Cloud" theme │ ← Badge animation -│ │ │ ┌───────────────────────┐ │ │ │ Start Another │ │ ← Primary button │ └───────────────────────┘ │ │ │ -│ [View Full Report] │ ← Text link └─────────────────────────────────┘ ``` **Interactions:** -- Success icon: Lottie animation (plays once, 2s) -- "Start Another" → Resets to Home screen -- "View Full Report" → Navigates to History tab - -**Achievement Badge:** -- Slides up from bottom with bounce effect -- Shimmer animation (gradient sweep) -- If ad required: Shows "Watch ad to unlock" button +- "Start Another" → Navigates to Home screen +- Shows random encouragement message from `assets/encouragements.json` --- -### 4.4 History/Report Screen +### 4.4 History Screen **Layout:** ``` ┌─────────────────────────────────┐ │ 📊 Your Focus Journey │ ← Header (24px) │ │ -│ ┌─ Today ──────────────────┐ │ -│ │ │ │ -│ │ Total: 47 mins │ │ ← Daily summary card -│ │ Sessions: 2 │ │ -│ │ Distractions: 3 │ │ -│ │ │ │ -│ │ ▓▓▓▓▓░░░░░ 60% │ │ ← Progress bar -│ │ (Goal: 75 mins/day) │ │ -│ └──────────────────────────┘ │ +│ ┌──────────────────────────┐ │ +│ │ Today's Summary │ │ +│ │ Total: 47 mins │ │ +│ │ Sessions: 2 │ │ +│ │ Distractions: 3 │ │ +│ └──────────────────────────┘ │ │ │ -│ ┌─ This Week ─────────────┐ │ -│ │ Mon ■■■ 24 mins │ │ ← Bar chart (simplified) -│ │ Tue ■■■■ 32 mins │ │ -│ │ Wed ■■ 15 mins │ │ -│ │ Thu ■■■■■ 47 mins ← │ │ ← Today highlighted -│ └──────────────────────────┘ │ +│ ┌──────────────────────────┐ │ +│ │ Session 1: 25 mins │ │ +│ │ • 2 distractions │ │ +│ │ • 10:00 AM - 10:25 AM │ │ +│ └──────────────────────────┘ │ │ │ -│ 📈 Top Distraction: │ -│ 📱 Social media (60%) │ ← Insight card -│ │ -│ [Export PDF Report] │ ← Secondary button (outlined) +│ ┌──────────────────────────┐ │ +│ │ Session 2: 22 mins │ │ +│ │ • 1 distraction │ │ +│ │ • 11:00 AM - 11:22 AM │ │ +│ └──────────────────────────┘ │ │ │ └─────────────────────────────────┘ ``` **Interactions:** -- Pull-to-refresh: Animates header particles -- Bar chart: Tap day → Shows session details -- Export PDF: Generates report with past 7 days data - - Requires storage permission (Android) - - iOS: Share sheet - -**PDF Report Content:** -- Logo + Date range -- Total focus time -- Session breakdown by day -- Distraction type distribution (pie chart) -- Encouragement message -- Footer: "Generated by FocusBuddy" +- Tap session card → Navigates to Session Detail screen +- Empty state: Shows message "No sessions yet. Start your first focus session!" --- @@ -235,37 +204,99 @@ ┌─────────────────────────────────┐ │ ⚙️ Settings │ │ │ -│ ┌─ Appearance ──────────────┐ │ -│ │ Theme: Calm Cloud ▼ │ │ ← Dropdown -│ │ [Preview] │ │ -│ │ │ │ -│ │ 🔓 Unlock More Themes │ │ ← Ad button -│ └───────────────────────────┘ │ -│ │ │ ┌─ Focus Settings ──────────┐ │ -│ │ Default Duration: 25 min │ │ -│ │ White Noise: Rain │ │ -│ │ Daily Goal: 75 mins │ │ +│ │ Default Duration: │ │ +│ │ • 25 minutes (selected) │ │ +│ │ • 15 minutes │ │ +│ │ • 5 minutes │ │ │ └───────────────────────────┘ │ │ │ -│ ┌─ Notifications ───────────┐ │ -│ │ Focus Reminders [ON] │ │ ← Toggle -│ │ Encourage Messages [ON] │ │ +│ ┌─ Language ────────────────┐ │ +│ │ English (selected) │ │ +│ │ 中文 │ │ +│ │ 日本語 │ │ +│ │ 한국어 │ │ +│ │ Español │ │ +│ │ Deutsch │ │ +│ │ Français │ │ +│ │ Português │ │ +│ │ Русский │ │ +│ │ हिन्दी │ │ +│ │ Bahasa Indonesia │ │ +│ │ Italiano │ │ +│ │ العربية │ │ │ └───────────────────────────┘ │ │ │ -│ 💎 Remove Ads ($2.99) │ ← IAP button (highlighted) -│ │ -│ Privacy Policy │ ← Links (text buttons) -│ About FocusBuddy │ +│ ┌─ About ───────────────────┐ │ +│ │ Privacy Policy │ │ +│ │ Terms of Service │ │ +│ │ Version 1.0.0 │ │ +│ └───────────────────────────┘ │ │ │ └─────────────────────────────────┘ ``` **Interactions:** -- Theme preview: Shows timer screen with selected theme -- "Unlock Themes": Shows rewarded ad → Unlocks next theme -- IAP button: Opens native purchase dialog -- Toggles: Animated switch with haptic feedback +- Tap duration option → Updates default duration +- Tap language option → Updates app language +- Tap links → Opens respective pages + +### 4.6 Profile Screen + +**Layout:** +``` +┌─────────────────────────────────┐ +│ 🧑 Profile │ +│ │ +│ ┌───────────────────────────┐ │ +│ │ Points: 120 │ │ +│ │ Level: 2 │ │ +│ │ Consecutive Check-ins: 5 │ │ +│ └───────────────────────────┘ │ +│ │ +│ ┌───────────────────────────┐ │ +│ │ Achievements │ │ +│ │ • First Focus Session │ │ +│ │ • 5 Sessions Completed │ │ +│ │ • 100 Points Earned │ │ +│ └───────────────────────────┘ │ +│ │ +└─────────────────────────────────┘ +``` + +**Interactions:** +- Shows user's points, level, and achievements +- Shows consecutive check-in streak + +### 4.7 Onboarding Screen + +**Layout:** +``` +┌─────────────────────────────────┐ +│ │ +│ FocusBuddy │ ← App title +│ │ +│ ┌───────────────────────────┐ │ +│ │ │ │ +│ │ No guilt. │ │ +│ │ No shame. │ │ +│ │ Just gentle focus. │ │ +│ │ │ │ +│ └───────────────────────────┘ │ +│ │ +│ Learn to focus without the │ +│ pressure of perfection. │ +│ │ +│ ┌───────────────────────┐ │ +│ │ Get Started │ │ ← Primary button +│ └───────────────────────┘ │ +│ │ +└─────────────────────────────────┘ +``` + +**Interactions:** +- "Get Started" → Navigates to Home screen +- Only shown once (first launch) --- @@ -287,18 +318,19 @@ Pressed: opacity 0.9, scale 0.95 (150ms ease-out) Disabled: opacity 0.5, grayscale 100% ``` -**Flutter Example:** +**Flutter Implementation:** ```dart ElevatedButton( style: ElevatedButton.styleFrom( - backgroundColor: Color(0xFFA7C4BC), + backgroundColor: AppColors.primary, minimumSize: Size(double.infinity, 56), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(16), ), elevation: 4, ), - child: Text('Start Focusing'), + child: Text('Start Focusing', style: AppTextStyles.buttonText), + onPressed: () {}, ) ``` @@ -329,25 +361,12 @@ Pressed: background #D5D5D5 - Color: `#5B6D6D` - Letter spacing: 2px (monospace feel) -**Animation:** -- Breathing effect: Scale 1.0 → 1.02 → 1.0 (4s loop, ease-in-out) -- On last 10 seconds: Pulse glow (0.3 opacity) around text - -**Flutter Example:** +**Flutter Implementation:** ```dart -AnimatedScale( - scale: _breathingAnimation.value, - duration: Duration(seconds: 4), - curve: Curves.easeInOut, - child: Text( - '24:37', - style: TextStyle( - fontSize: 64, - fontWeight: FontWeight.w800, - letterSpacing: 2, - ), - ), -) +Text( + '24:37', + style: AppTextStyles.timerDisplay, +), ``` --- @@ -370,74 +389,59 @@ AnimatedScale( - Slide up: 300ms ease-out - Backdrop: Fade to 0.5 opacity black ---- - -### 5.5 Achievement Badge +### 5.5 Points Card **Visual:** -``` -┌─────────────────┐ -│ 🎁 Unlocked! │ ← Emoji + text (14px) -│ │ -│ Calm Cloud │ ← Theme name (18px Bold) -│ ▓▓▓▓▓▓▓▓▓▓ │ ← Preview gradient bar -└─────────────────┘ -``` +- Background: Gradient from `#A7C4BC1A` to `#A7C4BC0D` +- Border: 1px solid `#A7C4BC33` +- Border radius: 16px +- Padding: 16px +- Contains points, level, and check-in status -**Animation:** -- Slide up from bottom: 400ms spring -- Shimmer sweep: 2s loop (gradient -100% → +100% X) -- Auto-dismiss after 5s (slide down) - -**Colors:** -- Background: `#FFFFFF` -- Border: 2px `#88C9A1` (success color) -- Shadow: 0px 8px 24px rgba(136, 201, 161, 0.4) +**Flutter Implementation:** +```dart +Container( + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + gradient: LinearGradient( + colors: [ + AppColors.primary.withOpacity(0.1), + AppColors.primary.withOpacity(0.05), + ], + begin: Alignment.topLeft, + end: Alignment.bottomRight, + ), + borderRadius: BorderRadius.circular(16), + border: Border.all( + color: AppColors.primary.withOpacity(0.2), + width: 1, + ), + ), + child: Row( + // Points, level, check-in status + ), +) +``` --- ## 6. Animations & Micro-interactions -### 6.1 Loading States +### 6.1 Screen Transitions -**When app launches:** -- Logo fade-in: 500ms -- Particles appear one by one (staggered 100ms) -- Total: 1s to interactive +- **Cross-fade**: 300ms ease-in-out for all screen transitions +- **No slide transitions** to avoid motion sickness -**When switching screens:** -- Cross-fade: 300ms ease-in-out -- No slide transitions (avoid motion sickness) +### 6.2 Button Interactions ---- +- **Primary Button**: Scale animation (0.95 → 1.0) on press +- **Secondary Button**: Background color change on press +- **Text Button**: Underline appears on hover -### 6.2 Haptic Feedback +### 6.3 Loading States -**iOS UIFeedbackGenerator:** -- Slider adjustment: `.selection` -- Button press: `.light` -- Timer complete: `.success` -- Distraction logged: `.soft` (custom if available) - -**Android:** -- Use `HapticFeedback.lightImpact()` -- Intensity: 30% (gentle) - ---- - -### 6.3 Sound Effects - -**Audio Files (CC Licensed):** -- `button_tap.mp3`: Soft click (50ms) -- `distraction_logged.mp3`: Gentle chime (200ms) -- `focus_complete.mp3`: Warm bell (1s) -- `white_noise_rain.mp3`: 10min loop -- `white_noise_keyboard.mp3`: 10min loop - -**Volume:** -- Default: 60% -- User adjustable in settings -- Respect system silent mode +- **App Launch**: Simple circular progress indicator +- **Data Loading**: Skeleton screens for list items --- @@ -565,65 +569,73 @@ AnimatedScale( --- -## 11. Implementation Notes +## 11. Implementation Details ### 11.1 Flutter Packages +**Core Dependencies:** ```yaml dependencies: - flutter: - sdk: flutter - hive: ^2.2.3 # Local storage + flutter: ^3.10.0-290.4.beta + flutter_localizations: ^0.1.0 + cupertino_icons: ^1.0.8 + hive: ^2.2.3 # 本地存储 hive_flutter: ^1.1.0 - flutter_local_notifications: ^17.0.0 - workmanager: ^0.5.2 # Background tasks - lottie: ^3.0.0 # Animations - just_audio: ^0.9.36 # White noise - google_mobile_ads: ^4.0.0 # AdMob - path_provider: ^2.1.0 - pdf: ^3.10.0 # Report export + flutter_local_notifications: ^17.0.0 # 通知 + permission_handler: ^11.0.0 # 权限管理 + path_provider: ^2.1.0 # 文件路径 + shared_preferences: ^2.2.0 # 简单键值存储 + intl: ^0.20.2 # 日期格式化和国际化 + google_fonts: ^6.1.0 # Google Fonts (Nunito) + get_it: ^7.7.0 # 依赖注入框架 ``` ---- - ### 11.2 Folder Structure ``` lib/ ├── main.dart -├── screens/ -│ ├── home_screen.dart -│ ├── focus_screen.dart -│ ├── complete_screen.dart -│ ├── history_screen.dart -│ └── settings_screen.dart -├── widgets/ -│ ├── primary_button.dart -│ ├── timer_display.dart -│ ├── distraction_sheet.dart -│ └── achievement_badge.dart +├── components/ +│ ├── control_buttons.dart +│ ├── distraction_button.dart +│ └── timer_display.dart +├── l10n/ +│ ├── app_en.arb +│ ├── app_zh.arb +│ └── ... (12 more languages) ├── models/ +│ ├── achievement_config.dart +│ ├── distraction_type.dart │ ├── focus_session.dart -│ └── distraction.dart +│ ├── user_progress.dart +│ └── *.g.dart (generated files) +├── screens/ +│ ├── complete_screen.dart +│ ├── focus_screen.dart +│ ├── history_screen.dart +│ ├── home_screen.dart +│ ├── onboarding_screen.dart +│ ├── profile_screen.dart +│ ├── session_detail_screen.dart +│ └── settings_screen.dart ├── services/ -│ ├── storage_service.dart +│ ├── achievement_service.dart +│ ├── di.dart +│ ├── encouragement_service.dart │ ├── notification_service.dart -│ └── audio_service.dart -├── theme/ -│ ├── app_colors.dart -│ └── app_text_styles.dart -└── assets/ - ├── animations/ - ├── sounds/ - └── fonts/ +│ ├── points_service.dart +│ ├── service_locator.dart +│ └── storage_service.dart +└── theme/ + ├── app_colors.dart + ├── app_text_styles.dart + └── app_theme.dart ``` ---- - ### 11.3 Theme Definition +**AppColors Class:** ```dart -// lib/theme/app_colors.dart class AppColors { static const primary = Color(0xFFA7C4BC); static const background = Color(0xFFF8F6F2); @@ -631,9 +643,17 @@ class AppColors { static const textSecondary = Color(0xFF8A9B9B); static const distractionButton = Color(0xFFE0E0E0); static const success = Color(0xFF88C9A1); + static const white = Color(0xFFFFFFFF); + + // Method to create color with custom alpha + static Color withValues({required double alpha}) { + return Color.fromRGBO(255, 255, 255, alpha); + } } +``` -// lib/theme/app_text_styles.dart +**AppTextStyles Class:** +```dart class AppTextStyles { static const appTitle = TextStyle( fontFamily: 'Nunito', @@ -654,24 +674,13 @@ class AppTextStyles { fontFamily: 'Nunito', fontSize: 18, fontWeight: FontWeight.w600, - color: Colors.white, + color: AppColors.white, ); - static const bodyText = TextStyle( - fontFamily: 'Nunito', - fontSize: 16, - fontWeight: FontWeight.normal, - color: AppColors.textPrimary, - ); - - static const helperText = TextStyle( - fontFamily: 'Nunito', - fontSize: 14, - fontWeight: FontWeight.w300, - color: AppColors.textSecondary, - ); + // Additional text styles... } ``` +``` --- @@ -679,26 +688,25 @@ class AppTextStyles { ### 12.1 Visual QA -- [ ] All colors match design system -- [ ] Fonts render correctly on iOS/Android -- [ ] Animations run at 60fps -- [ ] No pixel shifts when rotating -- [ ] Safe areas respected on all devices +- [x] All colors match design system +- [x] Fonts render correctly on iOS/Android +- [x] Animations run smoothly +- [x] No pixel shifts when rotating +- [x] Safe areas respected on all devices ### 12.2 Interaction QA -- [ ] Buttons have press states -- [ ] Haptics fire at correct moments -- [ ] Sound effects play (and respect mute) -- [ ] Timer counts down accurately -- [ ] Bottom sheet dismisses on backdrop tap +- [x] Buttons have press states +- [x] Timer counts down accurately +- [x] Bottom sheet dismisses on backdrop tap +- [x] Settings persist after app restart +- [x] Language changes apply immediately ### 12.3 Accessibility QA -- [ ] Screen reader announces all elements -- [ ] High contrast mode works -- [ ] Font scaling doesn't break layout -- [ ] Minimum touch target: 44×44 (iOS) / 48×48 (Android) +- [x] Screen reader announces all elements +- [x] Font scaling doesn't break layout +- [x] Minimum touch target: 44×44 (iOS) / 48×48 (Android) --- @@ -730,6 +738,6 @@ Store in `assets/encouragements.json`: --- -**Document Status:** ✅ Complete -**Last Updated:** November 22, 2025 -**Next Steps:** Create Figma prototype → Share with ADHD community for feedback \ No newline at end of file +**Document Status:** ✅ MVP 已实现 +**Last Updated:** 2025年11月27日 +**Next Steps:** 上架应用商店 \ No newline at end of file