features/statistics
Summaries and calculations over local entries.
All math derives from local entries, never presentation state: scheduled check-in consistency through the current day, average weekly consistency for the month, totals, streaks, and the best weekday over the trailing thirty days.
What it owns
- Statistics screen composition
- Consistency, streak, and weekday calculations
- Per-habit and overall summaries
Files
File list and purposes from the folder README.
| File | Purpose |
|---|---|
src/features/statistics/StatisticsUI.tsx | Statistics screen composition. |
src/features/statistics/calculations.ts | Weekly consistency and best weekday. |
src/features/statistics/analytics.ts | Per-habit and overall summaries. |
Dependencies
| Library | Version range | Why it is used here |
|---|---|---|
| Expo UIDeclared but not used in source | ~57.0.22 | Declared but never referenced in any scanned source or config. |
| Expo vector icons | ^15.1.1 | Material community icons in the tab layout. |
| expo-glass-effectDeclared but not used in source | ~57.0.4 | Glass material views; declared but not imported in scanned sources. |
| expo-imageDeclared but not used in source | ~57.0.5 | Image component; declared but not imported in scanned sources. |
| expo-symbolsDeclared but not used in source | ~57.0.3 | Apple SF Symbols; declared but not imported, and iOS is not configured. |
| Expo Metro runtimeDeclared but not used in source | ~57.0.16 | Web runtime support; declared but not imported in scanned sources. |
| Expo | ~57.0.27 | Metro config plus the managed runtime underneath every screen. |
| expo-constantsDeclared but not used in source | ~57.0.21 | App metadata access; declared but not imported in scanned sources. |
| expo-dev-clientDeclared but not used in source | ~57.0.19 | Development build client; native-side, never imported in app sources. |
| expo-fontDeclared but not used in source | ~57.0.4 | Custom font loading; declared but not imported in scanned sources. |
| expo-splash-screenDeclared but not used in source | ~57.0.9 | Launch splash configured in app.json; never imported in app sources. |
| expo-status-bar | ~57.0.1 | StatusBar in the root layout. |
| expo-system-uiDeclared but not used in source | ~57.0.4 | System UI appearance control; declared but not imported in scanned sources. |
| React | 19.2.3 | All screens, providers, and components under src/. |
| React Native | 0.86.3 | Primitives in every screen plus AppState in cloud sync. |
| Expo Router | ~57.0.25 | Route table under src/app with typed route helpers. |
| react-native-gesture-handler | ~2.32.0 | Root view in the app layout plus the swipeable tabs. |
| react-native-safe-area-context | ~5.7.0 | Safe-area providers, hooks, and initial metrics in layouts. |
| react-native-screensDeclared but not used in source | ~4.26.0 | Native screen containers behind the router; never imported in app sources. |
| Async Storage | 2.2.0 | React Native auth persistence in the Firebase setup. |
| expo-sqlite | ~57.0.4 | Versioned schema, migrations, triggers, and per-account files. |
| expo-clipboard | ~57.0.2 | Copy action in settings, loaded on demand. |
| expo-deviceDeclared but not used in source | ~57.0.2 | Device info helpers; declared but not imported in scanned sources. |
| expo-file-system | ~57.0.7 | JSON and CSV export files in settings, loaded on demand. |
| expo-haptics | ~57.0.3 | Haptic cues in interactive components. |
| expo-linkingDeclared but not used in source | ~57.0.12 | Deep link handling; declared but not imported in scanned sources. |
| expo-notifications | ~57.0.22 | Scheduling, permission, and cancellation behind dynamic imports. |
| expo-sharing | ~57.0.22 | Share action in settings, loaded on demand. |
| expo-web-browserDeclared but not used in source | ~57.0.3 | In-app browser sessions; declared but not imported in scanned sources. |
| NativeWind | 5.0.0-rc.0 | Metro preset plus utility classes across screens. |
| react-native-cssDeclared but not used in source | 3.1.0-rc.0 | CSS support layer for NativeWind; declared but not directly imported in scanned sources. |
| Reanimated | 4.5.1 | Animated pager, indicator, and screen transitions. |
| react-native-workletsDeclared but not used in source | 0.10.1 | Worklet runtime behind Reanimated; declared but not directly imported in scanned sources. |
| NetInfo | 12.0.1 | Online detection in cloud sync and account bootstrap. |
| Google Sign-In | ^16.1.5 | Sign-in, reauthentication, and sign-out behind dynamic imports. |
| Firebase | ^12.19.0 | Auth, Firestore reads/writes/listeners, and deletion calls. |
| React DOMDeclared but not used in source | 19.2.3 | Web rendering companion; declared but not imported in scanned sources. |
| react-native-webDeclared but not used in source | ~0.21.0 | Web target support; declared but not imported in scanned sources. |
Development and tooling (10)
| Library | Version range | Why it is used here |
|---|---|---|
| @types/node | ^26.6.4 | Type declarations for Node.js built-ins. |
| @types/react | ~19.2.2 | Type declarations for React. |
| TypeScript | ~6.0.3 | Type checking for the whole codebase. |
| tsx | ^4.23.15 | Runs the node:test suites without a separate build step. |
| ESLint | ^9.39.5 | Lint script and flat config in eslint.config.js. |
| eslint-config-expo | ~57.0.2 | Base rules in eslint.config.js. |
| Tailwind PostCSS plugin | 4.1.12 | Plugin entry in postcss.config.mjs. |
| lightningcss | 1.30.1 | CSS transformer behind the Tailwind toolchain; declared but not directly imported in scanned sources. |
| PostCSS | 8.5.28 | Stylesheet pipeline runner; declared but not directly imported in scanned sources. |
| Tailwind CSS | 4.1.12 | Theme, preflight, and utilities imports in global.css. |
Dependencies as of commit 99a2c3d.
Laying out Statistics feature…
ScreensFeaturesLocal dataDeviceCloudon-device datacloud sync
Talks to
Sources: src/features/statistics/StatisticsUI.tsx, src/features/statistics/calculations.ts, src/features/statistics/analytics.ts (documented at commit 99a2c3d)