learn

features/habits

Habit UI, types, and pure domain logic.

Four habit types — check-off, quantity, duration, counter — share one row and one form. Completion math is pure and tested: streaks span non-scheduled days and reset on a missed scheduled day, and repeat taps toggle a single entry per local calendar date.

What it owns

  • Habit rows, forms, and the celebration modal
  • Habit and entry shapes in four types
  • Streaks, schedules, and completion math

Files

File list and purposes from the folder README.

FilePurpose
src/features/habits/HabitRow.tsxList row with check-off interaction.
src/features/habits/HabitForm.tsxCreate and edit form with schedules.
src/features/habits/CelebrationModal.tsxCompletion celebration overlay.
src/features/habits/domain.tsStreaks, schedules, and completion rules.
src/features/habits/types.tsHabit and entry shapes.

Dependencies

LibraryVersion rangeWhy it is used here
Expo UIDeclared but not used in source~57.0.22Declared but never referenced in any scanned source or config.
Expo vector icons^15.1.1Material community icons in the tab layout.
expo-glass-effectDeclared but not used in source~57.0.4Glass material views; declared but not imported in scanned sources.
expo-imageDeclared but not used in source~57.0.5Image component; declared but not imported in scanned sources.
expo-symbolsDeclared but not used in source~57.0.3Apple SF Symbols; declared but not imported, and iOS is not configured.
Expo Metro runtimeDeclared but not used in source~57.0.16Web runtime support; declared but not imported in scanned sources.
Expo~57.0.27Metro config plus the managed runtime underneath every screen.
expo-constantsDeclared but not used in source~57.0.21App metadata access; declared but not imported in scanned sources.
expo-dev-clientDeclared but not used in source~57.0.19Development build client; native-side, never imported in app sources.
expo-fontDeclared but not used in source~57.0.4Custom font loading; declared but not imported in scanned sources.
expo-splash-screenDeclared but not used in source~57.0.9Launch splash configured in app.json; never imported in app sources.
expo-status-bar~57.0.1StatusBar in the root layout.
expo-system-uiDeclared but not used in source~57.0.4System UI appearance control; declared but not imported in scanned sources.
React19.2.3All screens, providers, and components under src/.
React Native0.86.3Primitives in every screen plus AppState in cloud sync.
Expo Router~57.0.25Route table under src/app with typed route helpers.
react-native-gesture-handler~2.32.0Root view in the app layout plus the swipeable tabs.
react-native-safe-area-context~5.7.0Safe-area providers, hooks, and initial metrics in layouts.
react-native-screensDeclared but not used in source~4.26.0Native screen containers behind the router; never imported in app sources.
Async Storage2.2.0React Native auth persistence in the Firebase setup.
expo-sqlite~57.0.4Versioned schema, migrations, triggers, and per-account files.
expo-clipboard~57.0.2Copy action in settings, loaded on demand.
expo-deviceDeclared but not used in source~57.0.2Device info helpers; declared but not imported in scanned sources.
expo-file-system~57.0.7JSON and CSV export files in settings, loaded on demand.
expo-haptics~57.0.3Haptic cues in interactive components.
expo-linkingDeclared but not used in source~57.0.12Deep link handling; declared but not imported in scanned sources.
expo-notifications~57.0.22Scheduling, permission, and cancellation behind dynamic imports.
expo-sharing~57.0.22Share action in settings, loaded on demand.
expo-web-browserDeclared but not used in source~57.0.3In-app browser sessions; declared but not imported in scanned sources.
NativeWind5.0.0-rc.0Metro preset plus utility classes across screens.
react-native-cssDeclared but not used in source3.1.0-rc.0CSS support layer for NativeWind; declared but not directly imported in scanned sources.
Reanimated4.5.1Animated pager, indicator, and screen transitions.
react-native-workletsDeclared but not used in source0.10.1Worklet runtime behind Reanimated; declared but not directly imported in scanned sources.
NetInfo12.0.1Online detection in cloud sync and account bootstrap.
Google Sign-In^16.1.5Sign-in, reauthentication, and sign-out behind dynamic imports.
Firebase^12.19.0Auth, Firestore reads/writes/listeners, and deletion calls.
React DOMDeclared but not used in source19.2.3Web rendering companion; declared but not imported in scanned sources.
react-native-webDeclared but not used in source~0.21.0Web target support; declared but not imported in scanned sources.
Development and tooling (10)
LibraryVersion rangeWhy it is used here
@types/node^26.6.4Type declarations for Node.js built-ins.
@types/react~19.2.2Type declarations for React.
TypeScript~6.0.3Type checking for the whole codebase.
tsx^4.23.15Runs the node:test suites without a separate build step.
ESLint^9.39.5Lint script and flat config in eslint.config.js.
eslint-config-expo~57.0.2Base rules in eslint.config.js.
Tailwind PostCSS plugin4.1.12Plugin entry in postcss.config.mjs.
lightningcss1.30.1CSS transformer behind the Tailwind toolchain; declared but not directly imported in scanned sources.
PostCSS8.5.28Stylesheet pipeline runner; declared but not directly imported in scanned sources.
Tailwind CSS4.1.12Theme, preflight, and utilities imports in global.css.

Dependencies as of commit 99a2c3d.

Habits feature
ScreensFeaturesLocal dataDeviceCloudon-device datacloud sync

Talks to

Sources: src/features/habits/HabitRow.tsx, src/features/habits/HabitForm.tsx, src/features/habits/domain.ts, src/features/habits/types.ts (documented at commit 99a2c3d)

On this page