Skip to content
Katto-LvPublic

About

TimeStack Android productivity app

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

TimeStack Android

TimeStack 的原生 Android Compose 工程。当前版本是可构建的本地优先产品骨架,覆盖 Today、日历、收件箱、习惯、复盘、设置、任务详情和专注页。

Android application id: com.lvjun.timestack.

Stack

  • Kotlin
  • Jetpack Compose + Material 3 + Material Icons
  • Jetpack Navigation 3
  • Room over SQLite + Flow
  • WorkManager local reminders
  • Kotlinx Serialization JSON backup format with optional password encryption
  • JUnit4 local test
  • R8 minify + resource shrink for release builds

Current Scope

  • MainActivity 启用 edge-to-edge。
  • Navigation.kt 使用 Navigation 3 管理顶部目的地、编辑器、任务详情、时间记录和专注页。
  • model/TimeStackModels.kt 定义核心 UI 数据模型。
  • data/calendar/ 提供日历负载聚合:从日程、任务和习惯估时计算今日容量占用,并生成规划负载分桶。
  • data/review/ 提供每周/每月复盘摘要生成,聚合任务、习惯、专注时间分布、评分、风险和下一步重点。
  • data/local/ 提供 Room database、DAO、entities 和 schema export。
  • data/backup/ 提供可读 JSON v8 备份格式、可选密码加密导出、加密导入解密、备份预览、导入前结构校验和显式确认后的恢复服务,覆盖任务、习惯、收件箱、日程、倒数日、专注记录、复盘问题、每日复盘、本地提醒和用户偏好;恢复成功后会取消旧提醒并按导入数据重建开启状态的本地提醒。
  • data/parser/ 提供快速输入解析,把自然语言式捕获内容识别为任务、日程、习惯或倒数日,并抽取项目、时间、日期、优先级和预估时长。
  • data/focus/ 提供专注倒计时策略,包括时间格式化、剩余进度、保存时长计算和专注运行期间的本地打扰状态。
  • data/reminder/ 提供 WorkManager-backed 本地提醒调度、通知渠道和通知 Worker;每天固定时间的提醒在触发后会自动续排下一次,并用本地小时窗口限制通知投递频率,避免同一小时内连续打扰;专注运行中只允许日程提醒打断,任务、习惯、复盘和过载提醒保持静默。
  • data/DataRepository.kt 提供 Room-backed repository;Debug 首次启动会 seed 初始样例数据,Release 首次启动只写入默认偏好并保持业务数据为空,避免正式版带演示内容,也避免恢复空备份后样例数据回流。
  • theme/ 定义 TimeStack 品牌色、间距、字号和 shape token。
  • widget/ 提供 Android Home Screen 今日、习惯、专注三类小组件,读取 Room 中的当前焦点、下一个日程、任务/习惯进度和专注分钟,并点击打开 App。
  • ui/main/MainScreen.kt 提供多屏 Compose UI:Today 任务列表可新增,普通任务行可直接点击播放图标进入专注,也可通过删除图标二次确认后移除,任务详情可编辑、完成/恢复和删除,并在收件箱存在陈旧或过载内容时于首屏显示可整理提醒;日历页显示真实日负载和规划负载,并使用设置里的每日容量;习惯可新增、编辑、完成、跳过和删除;日程和倒数日可新增、编辑和删除;专注页读取默认专注时长,支持开始、暂停、继续、重置、完成后保存专注记录,并在运行中写入本地状态让非紧急提醒静默;复盘页可保存每日评分、总结、卡点和明天前三件事,显示每周/每月周期复盘摘要、最近 5 天复盘趋势、分类时间记录、最近专注历史和总计/平均/最长专注统计,可补记手动时间记录、编辑复盘答案并处理未完成任务,选择明天继续、改到指定日期、拆分进收件箱、降优先级、放回收件箱、取消或删除;全局新增面板可从任意 Tab 进入任务、日程、习惯、倒数日、时间记录、专注或快速输入;快速捕获可预览解析类型,收件箱可按解析结果整理为任务、日程、习惯或倒数日,也可删除;设置页接入效率偏好、通知权限、本地提醒开关和 Android 系统文件选择器导出/导入 JSON 备份,填写备份密码时导出 AES-GCM 加密备份并用同一密码导入,成功导出、成功导入预览或成功恢复后会清空可见密码输入,备份区实时展示当前数据摘要并通过 live region 追加操作状态;关键分区标题、FAB 和备份状态补充了可访问性语义。
  • 设置页内置 隐私与数据 卡片,向用户说明无网络权限、无账号/广告/分析/云同步、本地 Room 数据库、系统文件选择器备份、备份密码边界和卸载删除范围。
  • 设置页内置 政策与支持 in-app policy and support section,说明隐私政策范围、公开发布前真实支持邮箱或联系页面要求、无联网反馈边界、开源许可和上架核对项;verifyInAppPolicySupport 会校验这块入口,verifyThirdPartyNotices 会校验第三方声明。
  • 设置页内置 应用信息 卡片,从系统安装包读取并展示名称、版本号、包名和 Debug/Release 构建状态,便于自用发布验收和排障。
  • 主导航在手机宽度使用底部 NavigationBar,在平板/折叠屏宽度自动切换到侧边 NavigationRail。
  • MainScreenViewModel 通过 repository 执行任务新增/编辑/删除、任务完成/恢复、未完成任务改期、拆分、取消和复盘处理、习惯新增/编辑/完成/跳过/删除、日程/倒数日新增编辑删除、专注记录保存、手动时间补记、每日复盘保存、复盘答案编辑、提醒开关、用户偏好更新、收件箱分类整理、快速捕获到收件箱;通过 backup service 执行备份导出、导入预览和确认后的恢复,并让恢复后的提醒调度与导入数据保持一致。

Build

$env:JAVA_HOME = "C:\Program Files\Android\Android Studio\jbr"
$env:ANDROID_HOME = "$env:LOCALAPPDATA\Android\Sdk"
$env:ANDROID_SDK_ROOT = "$env:LOCALAPPDATA\Android\Sdk"
$env:PATH = "$env:JAVA_HOME\bin;$env:USERPROFILE\AppData\AndroidCLI;$env:ANDROID_HOME\platform-tools;$env:PATH"
.\gradlew.bat assembleDebug --no-daemon --console=plain

APK output:

app/build/outputs/apk/debug/app-debug.apk

Release APK build:

.\gradlew.bat assembleRelease --no-daemon --no-configuration-cache --console=plain

Release app bundle build:

.\gradlew.bat bundleRelease --no-daemon --no-configuration-cache --console=plain

Local store-candidate gate without signing secrets or a connected device:

.\gradlew.bat verifyStoreCandidate --no-daemon --no-configuration-cache --console=plain

The local store-candidate gate includes listing PNG asset checks, listing copy length/risk checks, privacy/Data Safety disclosure checks, public privacy-policy draft checks, privacy-policy hosting checks, in-app policy/support checks, third-party notices checks, Play Console app-content readiness checks, Play submission runbook checks, Play release-notes/version checks, release signing runbook checks, device smoke checklist checks, distribution readiness matrix checks, unit tests, Android test APK compilation, permission allowlist checks, and release APK/AAB builds. Upload-ready builds still require signing credentials and verifySignedStoreCandidate.

Release output:

app/build/outputs/apk/release/app-release-unsigned.apk
app/build/outputs/bundle/release/app-release.aab

Release APK/AAB builds run R8 minification, resource shrinking, merged-manifest permission allowlist checks and local-first privacy disclosure checks. The app disables Android system auto-backup to keep the product local-first; use Settings -> 本地备份 for explicit JSON export/import, with optional password-encrypted export for sensitive personal data.

For an upload-ready build, review docs/distribution-readiness.md, run verifyDistributionReadiness, follow docs/privacy-policy-hosting.md, run verifyPrivacyPolicyHosting, follow docs/play-submission-runbook.md, run verifyPlaySubmissionRunbook, follow docs/signing-runbook.md, run verifySigningRunbook, configure keystore.properties or TIMESTACK_RELEASE_*, then run verifySignedStoreCandidate and verify the produced release APK/AAB are signed. Before distributing outside this machine, follow docs/device-smoke-checklist.md and run verifyDeviceSmokeChecklist.

Local Unit Test

See docs/product-design.md for the product design spec, docs/testing.md for the full testing strategy, docs/release.md for the release checklist, docs/distribution-readiness.md for the release decision matrix, docs/privacy-policy-hosting.md for public privacy-policy hosting, docs/third-party-notices.md for third-party notices, docs/play-submission-runbook.md for Play Console submission execution, docs/signing-runbook.md for release signing, docs/device-smoke-checklist.md for physical-device and OEM smoke testing, docs/backup-format.md for backup compatibility notes, docs/privacy.md for privacy copy, docs/public-privacy-policy.md for the hostable privacy-policy draft, docs/store-listing.md for store-listing notes, docs/play-console-readiness.md for Play Console app-content preparation and docs/release-notes.md for Play release notes.

The project path contains Chinese characters. assembleDebug works from this directory after android.overridePathCheck=true, but Gradle's local test worker can fail to load test classes from the non-ASCII path on Windows. Run local tests through a temporary ASCII drive alias:

subst T: "C:\Users\lvjun\Documents\打卡APP设计\timestack-android"
T:\gradlew.bat -p T:\ testDebugUnitTest --no-daemon --no-configuration-cache --console=plain
subst T: /D

Avoid alternating between T:\ and the original Chinese path for incremental builds in the same Gradle cache. If you switch paths, run .\gradlew.bat clean once before the next build.

Next Native Milestones

  • Add pixel-perfect PNG golden screenshot comparisons if the project later needs pixel-stable UI review in CI; the current device suite already includes lightweight sampled visual signatures on the API 36 reference AVD.

About

TimeStack Android productivity app

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages