A React Native fitness and wellness app that integrates with Whoop and Spotify to provide personalized training guidance and music recommendations based on recovery data.
β οΈ Project Status: This project is currently on hold while I focus on other priorities. The codebase is functional but may not receive regular updates. Feel free to fork and continue development!
Languages & Frameworks:
TypeScript - Type-safe JavaScript
React Native - Cross-platform mobile development
Expo - React Native development platform
Key Libraries:
Expo Router - File-based navigation
Expo Secure Store - Encrypted storage
Expo Video - Video playback
Expo Linking - Deep links & OAuth
Integrations:
Spotify Web API - Music data and recommendations
Whoop API - Fitness and recovery metrics
OAuth 2.0 - Secure authentication
Development Tools:
Node.js - Runtime environment
Metro - JavaScript bundler
ESLint - Code linting
Prettier - Code formatting
- User Authentication: Secure login and registration system
- Whoop Integration: Real-time access to recovery metrics, HRV, strain, and sleep data
- Spotify Integration: Music recommendations based on recovery status
- AI Recovery Coach: Personalized training guidance using recovery data
- Beautiful UI: Modern design with video backgrounds and glassmorphism effects
- Cross-Platform: Built with Expo for iOS and Android compatibility
The app features a sleek, modern interface with:
- Video background login screens
- Glassmorphic cards and overlays
- Recovery-based dashboard
- Integrated music recommendations
- AI coach insights
app/
βββ (login)/ # Authentication flow
β βββ _layout.tsx # Login stack navigator
β βββ index.tsx # Welcome screen with video
β βββ form.tsx # Login/Register form
β βββ link.tsx # Account linking (Whoop/Spotify)
βββ (tabs)/ # Main app navigation
β βββ _layout.tsx # Tab navigator
β βββ index.tsx # Home/Dashboard
β βββ workout.tsx # Workout screen
β βββ music.tsx # Music screen
β βββ coach.tsx # AI Coach screen
β βββ explore.tsx # More/Settings
βββ _layout.tsx # Root layout
βββ +not-found.tsx # 404 screen
hooks/ # Custom React hooks
βββ useAppAuth.ts # Authentication logic
βββ useWhoopAuth.ts # Whoop integration
βββ useSpotifyAuth.ts # Spotify integration
βββ useColorScheme.ts # Theme management
services/ # API service layers
βββ WhoopService.ts # Whoop API integration
βββ SpotifyService.ts # Spotify API integration
types/ # TypeScript definitions
βββ app.ts # App-wide types
βββ whoop.ts # Whoop data types
βββ spotify.ts # Spotify data types
- Node.js (v18 or higher)
- Expo CLI (
npm install -g @expo/cli) - iOS Simulator (for iOS development)
- Android Studio (for Android development)
- Backend API running on
http://127.0.0.1:8000
-
Clone the repository
git clone <your-repo-url> cd fitpro-frontend
-
Install dependencies
npm install # or yarn install -
Start the development server
npx expo start
-
Run on devices
- Press
ifor iOS Simulator - Press
afor Android Emulator - Scan QR code with Expo Go app for physical devices
- Press
The app expects your backend API to be running on:
- Development:
http://127.0.0.1:8000 - Production: Update
baseURLin service files
The app connects to these backend endpoints:
Authentication
POST /app/login- User loginPOST /app/register- User registration
Whoop Integration
GET /whoop/status- Check connection statusGET /whoop/auth/login- Start OAuth flowGET /whoop/profile- User profile dataGET /whoop/recovery- Recovery metricsGET /whoop/workouts- Workout dataDELETE /whoop/disconnect- Remove connection
Spotify Integration
GET /spotify/status- Check connection statusGET /spotify/auth/login- Start OAuth flowGET /spotify/profile- User profileGET /spotify/recently-played- Recent tracksGET /spotify/currently-playing- Current trackDELETE /spotify/disconnect- Remove connection
Configure deep links in app.json:
{
"expo": {
"scheme": "fitpro",
"web": {
"bundler": "metro"
}
}
}-
Welcome Screen (
(login)/index.tsx)- Video background with call-to-action
- Routes to login form
-
Login/Register Form (
(login)/form.tsx)- Tabbed interface for login/signup
- Form validation and error handling
- Social login options (Apple/Google)
-
Account Linking (
(login)/link.tsx)- Connect Whoop and Spotify accounts
- OAuth flow handling
- Skip option for later setup
-
Dashboard (
(tabs)/index.tsx)- Recovery metrics overview
- AI coach recommendations
- Music suggestions based on recovery
- Quick action buttons
-
Navigation
- Home: Dashboard and metrics
- Workout: Training plans
- Music: Spotify integration
- Coach: AI insights
- More: Settings and additional features
- Uses
expo-secure-storefor token management - Authentication tokens stored securely
- User data encrypted at rest
- Bearer token authentication
- Automatic token refresh handling
- Secure HTTP-only communication
- Colors: Dark theme with blue accents
- Typography: System fonts with custom weights
- Effects: Glassmorphism, shadows, gradients
- Responsive: Adaptive layouts for different screen sizes
- Video backgrounds for immersive experience
- Transparent cards with backdrop blur
- Smooth animations and transitions
- Consistent spacing and typography
- Native video player integration
- Haptic feedback for interactions
- Safe area handling
- Apple-style navigation
- Material Design elements
- Hardware back button support
- Status bar customization
- Android-specific permissions
- OAuth 2.0 authentication
- Real-time recovery data
- Sleep and strain metrics
- Heart rate variability
- OAuth 2.0 authentication
- Recently played tracks
- Current playback state
- User profile information
- expo-video: Video background playback
- expo-router: File-based navigation
- expo-secure-store: Secure token storage
- expo-linking: Deep link handling
npx expo install --fix
npx expo run:ios
npx expo run:androideas build --platform all
eas submit --platform all# .env
API_BASE_URL=https://your-production-api.com
EXPO_PUBLIC_API_URL=https://your-production-api.comnpm test
# or
yarn test- Unit tests for utility functions
- Integration tests for API services
- E2E tests for critical user flows
-
Video not playing
- Check video file paths in
assets/videos/ - Ensure video formats are supported
- Check video file paths in
-
OAuth redirects failing
- Verify deep link configuration
- Check URL scheme in
app.json
-
API connection issues
- Ensure backend is running on correct port
- Check network permissions in app config
-
Secure store errors
- Clear app data and reinstall
- Check device security settings
npx expo start --dev-client- Lazy loading of components
- Image optimization with
expo-image - Efficient state management
- Minimal re-renders with proper memoization
- Performance metrics tracking
- Error boundary implementation
- Crash reporting integration
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Use TypeScript for type safety
- Follow Expo/React Native conventions
- Maintain consistent formatting
- Document complex logic
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or issues:
- Check the troubleshooting section
- Review existing GitHub issues
- Create a new issue with detailed information
Built with β€οΈ using React Native and Expo