reset

Reset

Small actions. Big change. Reset is an offline-first habit-building app for people who want to rebuild or improve themselves through simple daily actions — 100 push-ups, 10,000 steps, one chapter, making the bed. Encouraging, personal, and never guilt-tripping.

Built with Flutter for Android and iOS.

Features

Everything works fully offline. No account, no backend, no analytics.

Architecture

Feature-first layout with a shared core:

lib/
  main.dart              # bootstrap: prefs preload, notification init
  app/                   # root widget + app-wide providers (DB, repos, ...)
  core/
    constants/           # centralized strings, icon registry
    database/            # Drift schema (habits, entries, reset plans)
    notifications/       # NotificationService (+ no-op fallback)
    routing/             # GoRouter config, bottom-nav shell
    steps/               # StepSource abstraction (manual / future health)
    theme/               # color, spacing, radius tokens; Material 3 themes
    utilities/           # date keys, streak calculator
    widgets/             # progress ring, empty/error/loading states, dialogs
  features/
    onboarding/          # multi-step flow + starter habit templates
    habits/              # domain models, repositories (abstract + Drift), form
    today/               # Today screen, habit cards, derived providers
    reset/               # preset plans, plan stats, plan screens
    progress/            # weekly stats, per-habit statistics
    profile/             # preferences, export, demo data, about

Key decisions:

Streak rules (documented behavior)

Main packages

Package Purpose
flutter_riverpod state management
go_router navigation
drift + drift_flutter local SQLite persistence
fl_chart weekly bar chart
flutter_local_notifications + timezone + flutter_timezone local reminders
intl date formatting
shared_preferences user preferences
uuid stable ids

Setup

flutter pub get

# Regenerate Drift database code after changing lib/core/database/:
dart run build_runner build --delete-conflicting-outputs

# Run on a connected device / emulator:
flutter run

# Release builds (crash reporting activates only when the DSN is passed):
flutter build appbundle --release --dart-define=SENTRY_DSN=$SENTRY_DSN
# iOS releases are built by Codemagic (codemagic.yaml), which injects the
# DSN from its "sentry" environment group automatically.

Tests, formatting, analysis

dart format .
flutter analyze
flutter test

Tests cover streak calculation, schedule logic, completion/progress rules, reset-plan day math, Drift repository operations (in-memory database), and the main Today-screen completion flow (widget test).

Notifications

Current limitations

Future: HealthKit / Health Connect

Step tracking is isolated behind the StepSource interface (lib/core/steps/step_source.dart). The shipped implementation is ManualStepSource; HealthStepSource is a clearly-labeled placeholder that reports itself unavailable. The integration plan:

  1. Add the health package (wraps HealthKit on iOS and Health Connect on Android).
  2. Implement HealthStepSource.stepsForDate with read-only step queries.
  3. Request health permissions only when the user opts into automatic steps.
  4. Merge strategy: automatic readings pre-fill the day’s steps entry; manual edits always win. No health data is ever fabricated.