A Progressive Web Application (PWA) that enables coxswains to monitor real-time heart rate data from all rowers in a 4+ boat during training and racing.
This repository contains the completed Phase 1, Phase 2, Phase 3, and Phase 4 implementation of Stroke Rate, which establishes the core PWA infrastructure, basic Bluetooth connectivity, multi-device support, enhanced visualization with heart rate zone analysis, and comprehensive training integration with advanced analytics. All Phase 1, Phase 2, Phase 3, and Phase 4 deliverables and success criteria have been achieved.
- PWA Setup: React 18 + TypeScript with Vite, service worker, and manifest
- Bluetooth Integration: Web Bluetooth API with custom React hooks
- SpeedCoach Conflict Detection: System to identify and manage existing SpeedCoach connections
- Streamlined Conflict Management: Simple warning message and coxswain-to-rower communication workflow
- Heart Rate Visualization: Basic real-time heart rate display with Recharts
- Core UI Components: Responsive design with vanilla CSS
- GitHub Pages Deployment: Automated deployment pipeline
- Multi-Device Support: Connect to up to 4 heart rate devices simultaneously
- Device Assignment: Intuitive device-to-seat assignment interface
- Connection Health Monitoring: Real-time connection status with automatic reconnection
- Global State Management: Unified state management for consistent device health across all screens
- Enhanced Dashboard: Multi-rower heart rate display with connection status indicators
- Robust Error Handling: Comprehensive connection management and error recovery
- Heart Rate Zone Analysis: Age-based zone calculations with Karvonen method for athletic rowers
- Enhanced Visualization: Comprehensive dashboard with performance metrics and individual rower analysis
- Historical Data Tracking: IndexedDB-based session persistence with 100MB realistic storage cap
- Session Comparison: Progress tracking with visual indicators and trend analysis
- Alert System: Battery monitoring, connection alerts, and database storage warnings
- Settings Management: Configurable notifications and data management with granular controls
- Session Persistence: Automatic session restoration and most recent session display for post-practice analysis
- Session Analytics & Reporting: Advanced analytics algorithms (TRIMP, TSS, intensity factor, normalized power)
- Recovery Metrics: Heart rate variability analysis and recovery time estimation
- Crew Analysis: Synchronization, cohesion, and individual variance tracking
- Progress Tracking Over Time: Multi-session trend analysis with linear regression and predictive analytics
- Goal Setting System: Milestone tracking and training phase management
- Data Export Functionality: CSV and JSON export with advanced filtering and external tool compatibility
- Comprehensive Reporting: Automated insights, recommendations, and performance scoring
- Frontend: React 18 + TypeScript 5.x
- Build Tool: Vite (optimized for PWA and performance)
- State Management: Zustand (lightweight, perfect for this scope)
- PWA: Workbox for service worker management
- Bluetooth: Web Bluetooth API with custom React hooks
- Styling: Vanilla CSS (lightweight, mobile-first, accessible)
- Charts: Recharts (React-native, lightweight for heart rate trends)
- Deployment: GitHub Actions for automated deployment
- Node.js 20.19+ or 22.12+
- npm or yarn
- Modern browser with Web Bluetooth API support (Chrome/Edge on Android, Safari on iOS)
# Clone the repository
git clone https://github.com/your-username/stroke-rate.git
cd stroke-rate
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview# Start development server with hot reload
npm run dev
# Type checking
npm run type-check
# Linting
npm run lint- Installable: Can be installed on mobile devices as a native app
- Offline Capable: Core functionality works without internet connection
- Responsive: Optimized for mobile devices and tablets
- Fast Loading: Optimized bundle size and caching strategies
The app uses the Web Bluetooth API to connect to heart rate monitors:
- Device Discovery: Automatically scans for nearby heart rate devices
- Multi-Device Support: Can connect to up to 4 heart rate devices simultaneously
- SpeedCoach Conflict Detection: Identifies when devices are already connected to SpeedCoach
- Connection Management: Maintains stable connections with automatic reconnection
- Real-Time Display: Shows current BPM for each rower with color-coded zones
- Heart Rate Zones: Visual indicators for recovery, aerobic, threshold, and anaerobic zones
- Historical Tracking: Displays heart rate trends during sessions
- Alert System: Notifications for heart rate anomalies (Phase 2+)
- Seat Assignment: Map each heart rate device to specific rower positions (Bow, 2-seat, 3-seat, 4-seat)
- Rower Profiles: Store rower names, target heart rate zones, and historical data
- Quick Setup: Streamlined device-to-seat assignment workflow
The app handles the critical challenge of Bluetooth connection conflicts with SpeedCoach devices:
- Conflict Detection: Automatically detects when heart rate monitors are connected to SpeedCoach
- Streamlined Workflow: Simple warning message when no devices found, coxswain communicates with rowers
- Practical Solution: Rowers disconnect from SpeedCoach, coxswain scans again and proceeds with setup
- Dashboard View: Centralized display of all rowers' heart rate data
- Individual Views: Detailed view for each rower's biometric data
- Real-Time Charts: Live heart rate trend visualization
- Zone Indicators: Color-coded heart rate zone display
The app is automatically deployed to GitHub Pages on every push to the main branch:
- GitHub Actions: Automated build and deployment pipeline
- PWA Ready: Full PWA manifest and service worker support
- CDN Optimized: Optimized for fast loading and caching
- Performance optimization and testing
- User experience improvements
- Documentation and user guide
- Beta testing with real rowing sessions
- Primary: Chrome/Edge (Android)
- Minimum: Chrome 56+, Edge 79+
- Features: Web Bluetooth API support required
This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
For support, please open an issue in the GitHub repository or contact me Edwin Escobar.
Phase 1, 2, 3 & 4 Status: โ COMPLETED - Core PWA infrastructure, Bluetooth connectivity, multi-device support, enhanced visualization, and comprehensive training integration established
- โ PWA Infrastructure: Fully functional Progressive Web App with service worker and manifest
- โ Bluetooth Integration: Web Bluetooth API implementation with device discovery and connection management
- โ SpeedCoach Conflict Detection: System to identify and handle connection conflicts with existing SpeedCoach devices
- โ Real-Time Monitoring: Live heart rate data display with clean, professional UI
- โ Rower Management: Device-to-seat assignment and rower configuration system
- โ Data Visualization: Heart rate trend charts with proper styling and responsive design
- โ Deployment Pipeline: Automated GitHub Pages deployment with GitHub Actions
- โ Multi-Device Support: Successfully connects to up to 4 heart rate devices simultaneously
- โ Global State Management: Unified state management ensuring consistent device health across all screens
- โ Connection Health Monitoring: Real-time connection status with automatic reconnection capabilities
- โ Enhanced Device Assignment: Intuitive device-to-seat assignment interface with health indicators
- โ Robust Error Handling: Comprehensive connection management and error recovery systems
- โ Consistent UI: Resolved discrepancies between Dashboard and Setup screens for device health status
- โ Heart Rate Zone Analysis: Age-based zone calculations with Karvonen method for athletic rowers (14-80+ age range)
- โ Enhanced Visualization: Comprehensive dashboard with performance metrics, individual rower analysis, and progress indicators
- โ Historical Data Tracking: IndexedDB-based session persistence with realistic 100MB storage cap (~4 months of data)
- โ Session Comparison: Progress tracking with visual indicators, trend analysis, and session selection
- โ Alert System: Battery monitoring, connection alerts, database storage warnings, and configurable notifications
- โ Settings Management: Granular data management controls, storage monitoring, and notification preferences
- โ Session Persistence: Automatic session restoration and most recent session display for post-practice analysis
- โ Session Analytics & Reporting: Advanced mathematical algorithms for TRIMP, TSS, intensity factor, and normalized power calculations
- โ Recovery Metrics: Heart rate variability analysis, recovery time estimation, and physiological stress assessment
- โ Crew Analysis: Synchronization metrics, cohesion tracking, and individual variance analysis for team performance optimization
- โ Progress Tracking Over Time: Multi-session trend analysis with linear regression, R-squared confidence scoring, and predictive analytics
- โ Goal Setting System: Comprehensive milestone tracking, training phase management (base, build, peak, recovery), and progress monitoring
- โ Data Export Functionality: CSV and JSON export capabilities with advanced filtering, date ranges, and external tool compatibility
- โ Comprehensive Reporting: Automated insights generation, performance recommendations, and detailed session scoring
- โ Advanced Visualizations: Interactive charts, progress indicators, trend analysis, and responsive design for all screen sizes
- โ App installs as PWA on mobile devices
- โ Successfully connects to multiple heart rate monitors simultaneously
- โ Maintains stable connections for 60+ minute sessions
- โ Detects SpeedCoach conflicts and provides clear user guidance
- โ Global state management ensures consistent device health display
- โ Clean, professional UI with proper chart styling and responsive design
- โ Heart rate zone calculations work accurately for athletic rowers across all age ranges
- โ Session data persists through app refreshes and provides seamless post-practice analysis
- โ Enhanced dashboard provides comprehensive performance insights and progress tracking
- โ Advanced session analytics provide detailed performance metrics and recovery insights
- โ Progress tracking system enables long-term performance monitoring and trend analysis
- โ Data export functionality works seamlessly with external tools and analysis software
- โ Comprehensive reporting system provides actionable insights for training optimization
Ready for Phase 5: Polish & Optimization and Beta Testing