A state-of-the-art Flutter health platform with real-time biomechanics, Groq AI sports science insights, executive clinical PDF export, and direct WhatsApp sharing.
- Independent Hardware Pedometer Integration: Native step tracking that runs directly on the device's pedometer chip. Tracks steps continuously while the phone is locked and asleep with almost zero battery drain.
- Offline High-Water Mark Logic: Accurately catches step deltas when the app is resumed, perfectly merging offline background steps into the SQLite database.
- Zero-Flicker Background Sync: Architecture designed to completely wait for offline data and Health Connect data to merge silently in the background before rendering a seamless UI update.
-
Dynamic Cadence & Pace Math: Real-time walking speed calculated from physical stride length and cadence (
$\text{Distance} / \text{Duration}$ ). - ACSM MET Caloric Formula: Accurate metabolic equivalent calculations tailored to user weight, speed, and height.
- Multi-Timeframe Visualizations: Apple Health-style interactive bar charts and range charts for Day, Week, Month, and Year with scrubbing tooltips.
- Powered by
llama-3.3-70b-versatilewith ultra-low latency. - Context-Aware: Evaluates exact real-time vitals, step goals, and user biometrics.
- Dynamic User Sync: Instantly personalizes advice to user profile changes and goal adjustments.
- Smart Offline Fallback: Local heuristic insights when offline or rate-limited.
- Apple Health aesthetic with vector hourly bar charts and vitals summary cards.
- Comprehensive 24-hour chronological timeline table for medical and personal reviews.
- Formatted with patient biometrics, generation timestamp, and medical disclaimer.
- Native Android Contact Picker: Import phone contacts with full pre-save name and number editing.
- Up to 3 Recipients: Categorized by relationship (
Doctor,Family,Trainer,Other). - Direct WhatsApp Attachment: Generates the PDF and loads it into WhatsApp with a pre-filled, formatted clinical summary caption ready to send.
- Multi-Account Partitioning: Switch between Google accounts with fully isolated local database records.
- Firestore Cloud Sync: Automatic real-time backup and restore of daily records across devices.
- Customizable Goals: Interactive steppers for Steps, Active Energy, and Exercise Minutes.
lib/
├── core/
│ ├── routing/ # GoRouter configuration & route guards
│ ├── services/ # SensorMathEngine biomechanics calculations
│ ├── theme/ # Apple Health glassmorphic design system
│ └── widgets/ # TactilePressable, StaggerEntrance, FlAppleRangeChart
├── data/
│ ├── local/ # HealthDatabase with per-user partitioning
│ └── repositories/ # LiveHealthRepository with sensor stream
├── domain/
│ └── models/ # HealthMetric, MetricDataPoint, TimeRange
├── features/
│ ├── ai_insights/ # GroqInsightService, InsightCacheManager, ChatNotifier
│ ├── browse/ # Categorized metrics directory
│ ├── onboarding/ # Streamlined Google Auth & Sensor Permissions (No Health Connect gate)
│ ├── profile/ # UserProfile, GoalsEditor, EditProfileSheet, AuthRepository
│ ├── sharing/ # HealthPdfReportService, AddContactSheet, ContactCard
│ ├── shell/ # AppShell & FrostedNavBar
│ └── summary/ # Bento grid dashboard & Activity Rings
└── main.dart # App entrypoint & Riverpod ProviderScope
- Flutter SDK (3.24.0 or newer)
- Android Studio / VS Code with Flutter extension
- Physical Android device with Step Counter sensor (recommended) or Emulator
git clone https://github.com/shakeelscribes/Stride.git
cd StrideCreate a .env file in the root directory:
GROQ_API_KEY=your_groq_api_key_hereAdd your Firebase configuration:
- Place your
google-services.jsoninandroid/app/. - Generate
lib/firebase_options.dartusing the FlutterFire CLI:flutterfire configure
flutter pub get
flutter run --dart-define-from-file=.envRun the complete test suite:
flutter testRun static analysis:
flutter analyzeflutter build apk --release --dart-define-from-file=.envflutter build appbundle --release --dart-define-from-file=.envThis project is licensed under the MIT License - see the LICENSE file for details.
