dayzero

DayZero — Private Quit-Habit Tracker

Quit drinking, smoking or vaping — and watch your life come back, one day at a time. DayZero is a 100% offline, privacy-first companion for the quit journey: no account, no ads, no cloud, no analytics.

Features

Business model

Free download + Premium subscription (weekly/monthly/yearly) + Lifetime unlock. Free tier: 2 habits with core stats, no ads, forever.

Tech

Flutter single codebase (iOS + Web demo). Local SQLite storage, StoreKit 2 via in_app_purchase, audioplayers, fl_chart, flutter_local_notifications. All audio is synthesized programmatically (tools/gen_dayzero_sounds.js); the icon is procedurally rendered (tools/gen_dayzero_icon.js).

Development

VS Code: double-click DayZero.code-workspace at the repo root to open the project (recommended extensions: Dart & Flutter). Debug configs for Edge / Chrome / web-server live in .vscode/launch.json (F5).

# First time (China mirrors):
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

flutter pub get
flutter test test/progress_logic_test.dart test/widget_test.dart   # functional tests (CI-safe)

# Web demo (Edge):
flutter build web --release --dart-define=FLUTTER_WEB_CANVASKIT_URL=/canvaskit/
node tools/serve.js          # serves build/web at http://localhost:8090
node tools/launch_edge.js    # opens Edge on the demo

# Store screenshots (local only, golden output is platform-sensitive):
GEN_SCREENSHOTS=1 node tools/fj.js test --update-goldens test/screenshots_test.dart

# Icon:
node tools/gen_dayzero_icon.js && dart run flutter_launcher_icons

Windows note: flutter analyze (LSP) crashes on paths with non-ASCII characters. Run node tools/mk_link.js once to create the ASCII junction C:\dev\dayzero_link, then use node tools/fj.js analyze instead.

Store assets

CI

Codemagic (codemagic.yaml) — manual signing recipe verified across two previous projects. Variable group: dayzero-app (ASC issuer/key/api + reused certificate private key).