Skip to content

redhawk5200/strideiq_mobile_app-main

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

StrideIQ Mobile App πŸƒβ€β™‚οΈ

StrideIQ - Intelligent Fitness Tracking Banner

A comprehensive React Native + Expo mobile application for intelligent fitness tracking, AI-powered coaching, and Apple Watch integration.

Version React Native Expo TypeScript iOS

πŸ“± App Screenshot

Screenshots will be added here showing the main dashboard, onboarding flow, and health data visualization.

✨ Key Features

πŸ₯ Advanced Health Integration

  • Apple HealthKit Integration - Real-time health data from Apple Watch & iPhone
  • Heart Rate Monitoring - Continuous heart rate tracking and analytics
  • VOβ‚‚ Max Analysis - Cardio fitness assessments and trends
  • Workout Tracking - Comprehensive exercise logging and history
  • Step Counter - Daily activity and movement tracking

πŸ€– AI-Powered Coaching

  • Personalized Recommendations - AI-generated training suggestions
  • Daily Check-ins - Smart health assessments with real-time insights
  • Performance Analytics - Data-driven coaching recommendations
  • Goal Optimization - Intelligent race time and fitness goal adjustments

πŸŽ₯ AI Coach Interface Demo

AI Coach Interface Demo

Interactive AI Coach providing personalized training recommendations and real-time health insights

Note: If the GIF doesn't load, you can view the full video demo at ./assets/images/coach.mp4

πŸ‘€ Smart Onboarding

  • Progressive User Setup - 11-step guided onboarding process
  • Health Metrics Collection - Comprehensive fitness and medical history
  • Goal Setting - Personalized training objectives
  • Device Integration - Seamless Apple Watch pairing

πŸ“Š Real-time Dashboard

  • Health Metrics Overview - Live data from connected devices
  • Activity Visualization - Charts and graphs for progress tracking
  • Sync Management - Real-time backend synchronization
  • Notification Center - Smart alerts and reminders

πŸ—οΈ Architecture

Tech Stack

  • Framework: React Native 0.81.4 + Expo SDK 54
  • Language: TypeScript 5.0+
  • Navigation: Expo Router v6 (file-based routing)
  • State Management: Redux Toolkit with Redux Persist
  • UI Components: Custom design system with Expo Vector Icons
  • Backend Integration: RESTful API with typed client
  • Health Integration: react-native-health for HealthKit
  • Watch Connectivity: react-native-watch-connectivity

Project Structure

strideiq_mobile_app/
β”œβ”€β”€ πŸ“± app/                          # Expo Router file-based routing
β”‚   β”œβ”€β”€ (onboarding)/               # Onboarding flow (11 screens)
β”‚   β”‚   β”œβ”€β”€ _layout.tsx            # Onboarding layout wrapper
β”‚   β”‚   β”œβ”€β”€ index.tsx              # Welcome screen
β”‚   β”‚   β”œβ”€β”€ name-screen.tsx        # Name collection
β”‚   β”‚   β”œβ”€β”€ gender-screen.tsx      # Gender selection
β”‚   β”‚   β”œβ”€β”€ birthday-screen.tsx    # Age verification
β”‚   β”‚   β”œβ”€β”€ weight-screen.tsx      # Weight & body metrics
β”‚   β”‚   β”œβ”€β”€ height-screen.tsx      # Height measurement
β”‚   β”‚   β”œβ”€β”€ goals-screen.tsx       # Fitness goals
β”‚   β”‚   β”œβ”€β”€ fitness-screen.tsx     # Current fitness level
β”‚   β”‚   β”œβ”€β”€ medical-screen.tsx     # Medical conditions
β”‚   β”‚   β”œβ”€β”€ moods-screen.tsx       # Mood tracking setup
β”‚   β”‚   └── final-onboarding.tsx   # Completion
β”‚   β”œβ”€β”€ (tabs)/                    # Main app navigation
β”‚   β”‚   β”œβ”€β”€ _layout.tsx            # Tab bar configuration
β”‚   β”‚   β”œβ”€β”€ index.tsx              # Dashboard (home)
β”‚   β”‚   β”œβ”€β”€ activity.tsx           # Health data & analytics
β”‚   β”‚   β”œβ”€β”€ metrics.tsx            # Performance metrics
β”‚   β”‚   β”œβ”€β”€ add.tsx                # Manual data entry
β”‚   β”‚   └── settings.tsx           # User preferences
β”‚   β”œβ”€β”€ dashboard/                 # Dashboard sub-screens
β”‚   └── settings/                  # Settings sub-screens
β”œβ”€β”€ 🧩 src/                         # Source code organization
β”‚   β”œβ”€β”€ components/                # Shared React components
β”‚   β”‚   β”œβ”€β”€ DailyCheckInModal.tsx  # AI check-in interface
β”‚   β”‚   β”œβ”€β”€ HealthKitDataDisplay.tsx # Real-time health data
β”‚   β”‚   └── ClerkApiSync.tsx       # Authentication sync
β”‚   β”œβ”€β”€ features/                  # Feature-based modules
β”‚   β”‚   β”œβ”€β”€ health/               # HealthKit integration
β”‚   β”‚   β”‚   └── healthKit.ts      # Apple Health API wrapper
β”‚   β”‚   └── watch/                # Apple Watch connectivity
β”‚   β”‚       └── ExampleWatchUsage.tsx
β”‚   β”œβ”€β”€ hooks/                    # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ useOnboarding.ts      # Onboarding state management
β”‚   β”‚   β”œβ”€β”€ useCoachingRecommendations.ts # AI coaching
β”‚   β”‚   └── useWarmUpBrowser.ts   # OAuth browser warming
β”‚   β”œβ”€β”€ lib/                      # Shared utilities
β”‚   β”‚   β”œβ”€β”€ api.ts               # API client & configuration
β”‚   β”‚   β”œβ”€β”€ apiClient.ts         # Typed HTTP client
β”‚   β”‚   β”œβ”€β”€ healthSync.ts        # Health data synchronization
β”‚   β”‚   β”œβ”€β”€ onboardingProgress.ts # Progress persistence
β”‚   β”‚   β”œβ”€β”€ theme.ts             # Design system tokens
β”‚   β”‚   └── WatchConnectivity.ts  # Watch communication
β”‚   β”œβ”€β”€ store/                    # Redux state management
β”‚   β”‚   β”œβ”€β”€ index.ts             # Store configuration
β”‚   β”‚   β”œβ”€β”€ selectors/           # Redux selectors
β”‚   β”‚   β”œβ”€β”€ slices/              # Feature slices
β”‚   β”‚   β”‚   β”œβ”€β”€ authSlice.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ profileSlice.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ deviceSlice.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ onboardingSlice.ts
β”‚   β”‚   β”‚   └── recommendationsSlice.ts
β”‚   β”‚   └── thunks/              # Async actions
β”‚   β”œβ”€β”€ types/                    # TypeScript definitions
β”‚   β”œβ”€β”€ ui/                       # Reusable UI primitives
β”‚   β”‚   β”œβ”€β”€ Button.tsx           # Button component system
β”‚   β”‚   β”œβ”€β”€ Text.tsx             # Typography system
β”‚   β”‚   β”œβ”€β”€ modal.tsx            # Modal primitives
β”‚   β”‚   └── top-stepbar.tsx      # Progress indicators
β”‚   └── utils/                    # Utility functions
β”œβ”€β”€ 🎨 assets/                     # Static assets
β”‚   β”œβ”€β”€ images/                   # App icons & splash screens
β”‚   β”œβ”€β”€ dashboard/                # Dashboard-specific assets
β”‚   β”œβ”€β”€ onboarding/              # Onboarding visuals
β”‚   β”œβ”€β”€ genders/                 # Gender selection icons
β”‚   β”œβ”€β”€ moods/                   # Mood tracking icons
β”‚   β”œβ”€β”€ devices/                 # Device connection assets
β”‚   └── socials/                 # Social login assets
β”œβ”€β”€ πŸ”§ plugins/                    # Expo config plugins
β”‚   └── withHealthKit.js         # HealthKit capability plugin
└── πŸ“„ Documentation
    β”œβ”€β”€ HEALTHKIT_SETUP.md       # HealthKit integration guide
    β”œβ”€β”€ HEALTHKIT_INTEGRATION.md # Comprehensive health docs
    └── HEALTHKIT_SETUP_STEPS.md # Step-by-step setup

State Management Architecture

// Redux Store Structure
{
  auth: {
    user: User | null;
    isAuthenticated: boolean;
    isLoading: boolean;
  };
  profile: {
    data: ProfileData;
    hasCompletedProfile: boolean;
    isLoading: boolean;
  };
  onboarding: {
    currentStep: number;
    formData: OnboardingData;
    savedSteps: number[];
    pendingSync: boolean;
  };
  device: {
    connectedDevices: Device[];
    selectedDeviceId: string;
  };
  recommendations: {
    data: Recommendation[];
    isLoading: boolean;
    lastUpdated: string;
  };
}

API Architecture

// API Client Structure
class ApiClient {
  baseURL: string;
  headers: Record<string, string>;
  
  async get<T>(endpoint: string): Promise<ApiResponse<T>>;
  async post<T>(endpoint: string, data: any): Promise<ApiResponse<T>>;
  async put<T>(endpoint: string, data: any): Promise<ApiResponse<T>>;
  async delete<T>(endpoint: string): Promise<ApiResponse<T>>;
}

// Health Data Sync Flow
Apple Watch β†’ iPhone Health β†’ HealthKit β†’ React Native β†’ Backend API

πŸš€ Getting Started

Prerequisites

  • Node.js 18.0+
  • npm or yarn
  • iOS Development Environment (macOS + Xcode for iOS builds)
  • Expo CLI (npm install -g @expo/cli)
  • Physical iOS Device (HealthKit requires real device, not simulator)

Installation

  1. Clone the repository
git clone https://github.com/redhawk5200/strideiq_mobile_app-main.git
cd strideiq_mobile_app-main
  1. Install dependencies
npm install
  1. Install iOS dependencies
cd ios && pod install && cd ..
  1. Start development server
npx expo start
  1. Run on device (iOS only for HealthKit)
# For iOS physical device (required for HealthKit)
npx expo run:ios --device

# For iOS simulator (limited functionality)
npx expo run:ios

# For Android (no HealthKit support)
npx expo run:android

Environment Setup

Create .env file in root directory:

# API Configuration
API_BASE_URL=https://stride-api.edgefirm.io
API_VERSION=v1

# Clerk Authentication (Optional)
EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_key_here

# Development
NODE_ENV=development

πŸ“± Core Features

1. Health Data Integration

Apple HealthKit Integration

import { healthKitManager } from './src/features/health/healthKit';

// Initialize HealthKit
const success = await healthKitManager.initialize();

// Get real-time health data
const heartRate = await healthKitManager.getLatestHeartRate();
const steps = await healthKitManager.getDailySteps();
const vo2Max = await healthKitManager.getLatestVO2Max();
const workouts = await healthKitManager.getWorkouts(startDate);

Supported Health Metrics:

  • ❀️ Heart Rate (resting, active, recovery)
  • 🫁 VOβ‚‚ Max (cardio fitness)
  • 🚢 Daily Steps & Distance
  • πŸ‹οΈ Workout Sessions
  • ⚑ Heart Rate Variability (HRV)
  • πŸ”₯ Active Energy Burned

2. AI-Powered Daily Check-ins

// Daily Check-in Modal with AI Recommendations
<DailyCheckInModal 
  visible={showCheckIn}
  onClose={() => setShowCheckIn(false)}
/>

AI Features:

  • Real-time health data analysis
  • Personalized training recommendations
  • Recovery and rest day suggestions
  • Goal progression tracking
  • Performance optimization tips

3. Comprehensive Onboarding

11-Step Progressive Setup:

  1. Welcome & Setup Profile - Initial app introduction
  2. Name Collection - Personal identification
  3. Gender Selection - Physiological considerations
  4. Birthday Entry - Age-based recommendations
  5. Weight Tracking - Body composition baseline
  6. Height Measurement - BMI and health calculations
  7. Goals Setting - Fitness objectives and targets
  8. Fitness Assessment - Current activity level
  9. Medical History - Health conditions and limitations
  10. Mood Tracking - Mental health integration
  11. Training Preferences - Workout style and schedule

4. Apple Watch Connectivity

import WatchConnectivity from './src/lib/WatchConnectivity';

// Start workout on Apple Watch
WatchConnectivity.startWorkout('running', 1800); // 30 minutes

// Listen for real-time heart rate updates
WatchConnectivity.onHeartRateUpdate((data) => {
  console.log(`Heart Rate: ${data.heartRate} BPM`);
});

// Sync user settings to watch
WatchConnectivity.syncUserSettings({
  targetHeartRate: 150,
  workoutGoals: { dailySteps: 10000 }
});

πŸ”— API Integration

Backend Endpoints

// Health Data Sync
POST /api/v1/health/heart-rate/batch
POST /api/v1/health/steps/batch  
POST /api/v1/health/vo2-max/batch
POST /api/v1/health/workouts/batch

// AI Recommendations
GET  /api/v1/recommendations/generate
GET  /api/v1/recommendations/quick-actions
POST /api/v1/recommendations/feedback

// User Management
GET  /api/v1/user/profile
PUT  /api/v1/user/profile
GET  /api/v1/user/onboarding-progress
PUT  /api/v1/user/onboarding-progress

// Analytics
GET  /api/v1/analytics/dashboard
GET  /api/v1/analytics/trends

Data Models

interface HealthMetrics {
  heartRate: number | null;
  vo2Max: number | null;
  dailySteps: number;
  activeCalories: number;
  workoutsThisWeek: number;
  lastSync: string;
}

interface AIRecommendation {
  title: string;
  description: string;
  category: 'vo2' | 'race' | 'training' | 'recovery';
  priority: 'high' | 'medium' | 'low';
  actionItems?: string[];
}

interface OnboardingProgress {
  currentStep: number;
  completedSteps: number[];
  formData: OnboardingData;
  isCompleted: boolean;
}

πŸ₯ HealthKit Setup

Quick Start

  1. Physical iOS device required (HealthKit doesn't work in simulator)
  2. Enable HealthKit capability in Xcode
  3. Grant health permissions in iOS Settings
  4. Pair Apple Watch for optimal data

Detailed Setup

See HEALTHKIT_SETUP.md for comprehensive setup instructions.

Key Files:

  • src/features/health/healthKit.ts - Main HealthKit wrapper
  • src/lib/healthSync.ts - Backend synchronization
  • plugins/withHealthKit.js - Expo config plugin

πŸ§ͺ Testing

Running Tests

# Unit tests
npm test

# iOS simulator testing
npm run ios

# Android emulator testing  
npm run android

# Web testing (limited functionality)
npm run web

Test Coverage

  • βœ… Component unit tests
  • βœ… Redux store testing
  • βœ… API client testing
  • βœ… HealthKit mock testing
  • ⏳ E2E testing (planned)

πŸš€ Deployment

EAS Build Configuration

// eas.json
{
  "build": {
    "development": {
      "ios": {
        "resourceClass": "m-medium",
        "bundleIdentifier": "com.redhawk5200.strideiq.dev"
      }
    },
    "production": {
      "ios": {
        "resourceClass": "m-medium", 
        "bundleIdentifier": "com.redhawk5200.strideiq"
      }
    }
  }
}

Build Commands

# Development build
eas build --platform ios --profile development

# Production build  
eas build --platform ios --profile production

# Submit to App Store
eas submit --platform ios

πŸ“– Documentation

Health Integration Guides

Development Guidelines

🀝 Contributing

Development Workflow

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Follow coding standards in copilot-instructions.md
  4. Test on physical iOS device for HealthKit features
  5. Submit pull request

Code Style

  • TypeScript strict mode enabled
  • ESLint + Prettier for code formatting
  • Component-driven architecture with reusable UI primitives
  • Feature-based organization in src/features/

πŸ“Š Performance

Optimization Features

  • βœ… Redux Toolkit for efficient state management
  • βœ… React Native Reanimated for smooth animations
  • βœ… Expo Router for performant navigation
  • βœ… Async data loading with proper loading states
  • βœ… Background sync for health data
  • βœ… Optimistic updates for better UX

Health Data Sync Performance

  • Batch uploads for efficient API usage
  • Incremental sync to avoid duplicate data
  • Background processing for seamless UX
  • Retry mechanisms for network reliability

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™‹β€β™‚οΈ Support

Getting Help

  • GitHub Issues - Bug reports and feature requests
  • Documentation - Comprehensive guides in /docs folder
  • HealthKit Issues - Check HEALTHKIT_SETUP.md first

Contact


Built with ❀️ using React Native, Expo, and Apple HealthKit

πŸƒβ€β™‚οΈ StrideIQ - Intelligent Fitness Tracking πŸƒβ€β™€οΈ

About

A comprehensive React Native + Expo mobile application for intelligent fitness tracking, AI-powered coaching, and Apple Watch integration.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages