Skip to content

KKingZero/RepX

Repository files navigation

RepX - Flutter Fitness Tracking App

RepX is a comprehensive fitness tracking application built with Flutter that helps users log workouts, track progress, and get AI-generated workout recommendations.

Features

🏠 Home Screen

  • Welcome dashboard with user stats
  • Total workouts, reps, and weight lifted tracking
  • Suggested workout recommendations
  • Recent workout history
  • Clean, modern Material Design 3 UI

πŸ“· Scanner Screen

  • AI-powered exercise recognition (mock implementation)
  • Image capture from camera or gallery
  • Real-time exercise identification
  • Form analysis and feedback
  • Tips for better recognition accuracy

πŸ’ͺ Workout Screen

  • Manual Entry Tab: Log exercises with sets, reps, and weights
  • AI Generated Tab: Personalized workouts based on fitness quiz
  • Quick workout templates (Push Day, Pull Day, Leg Day)
  • Workout history with repeat/delete options
  • Comprehensive exercise management

πŸ† Leaderboard Screen

  • User rankings by total reps completed
  • Current user position highlighting
  • Mock user data for demonstration
  • Medal system for top performers
  • Competitive fitness tracking

βš™οΈ Settings Screen

  • Dark mode toggle
  • Notification preferences
  • Workout units (metric/imperial)
  • Default rest time configuration
  • Fitness quiz management
  • Auto-save options

Technical Architecture

State Management

  • Provider: Clean, scalable state management
  • AppProvider: Centralized app state with reactive updates
  • Offline-first architecture with Hive persistence

Data Storage

  • Hive: Local NoSQL database for offline functionality
  • Type-safe data models with generated adapters
  • Automatic data persistence and retrieval
  • Mock data initialization for demonstration

Models

// Core workout data structure
Workout {
  String id
  String name
  List<Exercise> exercises
  DateTime createdAt
  int totalReps
  double totalWeight
}

// User profile and leaderboard data
User {
  String id, name, email
  int totalReps, totalWorkouts
  double totalWeight
  DateTime joinDate
  String fitnessLevel
  List<String> goals
}

// App configuration and preferences
UserSettings {
  bool darkModeEnabled, notificationsEnabled
  String units
  int defaultRestTime
  bool autoSaveWorkouts, quizCompleted
}

Project Structure

lib/
β”œβ”€β”€ main.dart                 # App entry point with Hive initialization
β”œβ”€β”€ models/                   # Data models and Hive adapters
β”‚   β”œβ”€β”€ workout.dart         # Workout, Exercise, ExerciseSet models
β”‚   β”œβ”€β”€ workout.g.dart       # Generated Hive adapters
β”‚   β”œβ”€β”€ user.dart            # User and UserSettings models
β”‚   └── user.g.dart          # Generated Hive adapters
β”œβ”€β”€ providers/               # State management
β”‚   └── app_provider.dart    # Main application provider
β”œβ”€β”€ screens/                 # Main app screens
β”‚   β”œβ”€β”€ main_screen.dart     # Bottom navigation container
β”‚   β”œβ”€β”€ home_screen.dart     # Dashboard and stats
β”‚   β”œβ”€β”€ scanner_screen.dart  # Exercise recognition
β”‚   β”œβ”€β”€ workout_screen.dart  # Manual and AI workout tabs
β”‚   β”œβ”€β”€ leaderboard_screen.dart # User rankings
β”‚   └── settings_screen.dart # App configuration
└── widgets/                 # Reusable components
    β”œβ”€β”€ workout_form.dart    # Exercise logging form
    └── quiz_dialog.dart     # Fitness assessment quiz

Dependencies

  • flutter: Framework
  • provider: State management
  • hive/hive_flutter: Local database
  • image_picker: Camera/gallery access
  • intl: Date formatting

Key Features Implementation

Offline-First Design

  • All data stored locally with Hive
  • No internet connection required
  • Automatic data persistence
  • Mock API responses for demonstration

AI Workout Generation

  • Fitness quiz for user assessment
  • Personalized exercise recommendations
  • Difficulty adjustment based on fitness level
  • Equipment-based workout customization

Exercise Recognition

  • Mock AI implementation for image processing
  • Simulated exercise identification
  • Form feedback and improvement tips
  • Camera and gallery integration

Progress Tracking

  • Comprehensive workout statistics
  • Historical data visualization
  • Personal records tracking
  • Competitive leaderboard system

Getting Started

  1. Prerequisites: Flutter SDK installed
  2. Install dependencies: flutter pub get
  3. Generate Hive adapters: flutter packages pub run build_runner build
  4. Run the app: flutter run

Mock Data

The app includes mock users and sample data for demonstration:

  • 5 sample users with workout statistics
  • Default user profile with customizable settings
  • Pre-configured workout templates
  • Sample exercise database

UI/UX Design

  • Material Design 3 components
  • Responsive layout for various screen sizes
  • Dark mode support
  • Consistent color scheme and typography
  • Intuitive navigation with bottom tabs
  • Card-based information presentation

πŸ” API Key Configuration

Everyone is an Admin! RepX is 100% free and open source. Add your own AI API keys to enable real AI features:

Supported AI Providers

  • OpenAI (GPT): Get your API key from platform.openai.com
  • Google Gemini: Get your API key from makersuite.google.com
  • Local Models: Coming soon (TensorFlow Lite)
  • Mock AI: Works offline without any API key (default)

How to Configure

  1. Open Settings β†’ AI Configuration
  2. Toggle "Use Real AI"
  3. Select your AI Provider
  4. Enter your API Key
  5. Start using real AI features!

Your API key is stored securely on your device and never shared.

πŸ“¦ Export/Import

Export Options

  • JSON Format: Complete backup with all workout data
  • CSV Format: For analysis in spreadsheets

Import Workouts

  • Import from JSON backup files
  • Merge or replace existing data
  • Compatible across devices

πŸš€ Getting Started

For Users

  1. Download

    • Get from F-Droid (coming soon)
    • Build from source (see below)
  2. First Launch

    • Grant camera/storage permissions (optional)
    • Take the fitness quiz for personalized workouts
    • Start logging your workouts!
  3. Optional: Enable AI

    • Go to Settings β†’ AI Configuration
    • Add your API key
    • Toggle "Use Real AI"

For Developers

  1. Prerequisites

    • Flutter SDK 3.8.1+
    • Android Studio / VS Code
    • Git
  2. Clone & Setup

    git clone https://github.com/your-repo/RepX-android-main.git
    cd RepX-android-main
    flutter pub get
    flutter pub run build_runner build
  3. Run

    # Android
    flutter run -d android
    
    # Linux
    flutter run -d linux
    
    # Desktop
    flutter run -d windows
    flutter run -d macos
  4. Build Release

    # Android APK
    flutter build apk --release
    
    # Android App Bundle
    flutter build appbundle --release
    
    # Linux
    flutter build linux --release

See CONTRIBUTING.md and DEVELOPER_GUIDE.md for detailed documentation.

πŸ“± Platform Support

Platform Status Notes
Android βœ… Ready API 21+
Linux βœ… Ready Desktop app
Windows βœ… Ready Desktop app
macOS βœ… Ready Desktop app
iOS 🚧 Coming Soon
Web 🚧 Coming Soon

🀝 Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

Ways to Contribute

  • πŸ› Report bugs
  • πŸ’‘ Suggest features
  • πŸ”§ Submit pull requests
  • πŸ“– Improve documentation
  • 🌍 Add translations
  • 🎨 Design assets

πŸ“„ License

RepX is free and open source software licensed under the MIT License.

What this means:

  • βœ… Free to use for any purpose
  • βœ… Free to modify and distribute
  • βœ… No warranty or liability
  • βœ… Must include original copyright notice

🌟 Features Roadmap

Current (v1.0.0)

  • βœ… Workout tracking
  • βœ… AI workout generation
  • βœ… Exercise recognition (mock + real)
  • βœ… Dark mode
  • βœ… Export/Import
  • βœ… API key management
  • βœ… Offline-first

Planned

  • πŸ”„ Cloud sync (optional)
  • πŸ”„ Social features
  • πŸ”„ Wearable integration
  • πŸ”„ Nutrition tracking
  • πŸ”„ Video tutorials
  • πŸ”„ Progressive overload tracking
  • πŸ”„ Rest timer with notifications
  • πŸ”„ Custom workout builder

πŸ’¬ Community

  • GitHub Issues: Bug reports and feature requests
  • GitHub Discussions: Questions and ideas
  • Discord: Coming soon
  • Reddit: Coming soon

πŸ™ Acknowledgments

Built with:

Special thanks to all contributors and the open source community!

πŸ“ž Support

πŸ”’ Privacy

RepX respects your privacy:

  • βœ… All data stored locally by default
  • βœ… No telemetry or analytics
  • βœ… No user tracking
  • βœ… No third-party data sharing
  • βœ… Optional cloud features (coming soon)
  • βœ… Your API keys stay on your device

⚑ Quick Stats

  • πŸ“± 5 Main Screens
  • 🎯 15+ Features
  • πŸ’Ύ Offline-First
  • πŸŒ™ Dark Mode
  • πŸ€– AI-Powered (optional)
  • πŸ“Š Export to JSON/CSV
  • πŸ”“ 100% Free & Open Source

Made with πŸ’ͺ by the fitness tech community

RepX - Your fitness, your data, your control.

About

open source version of zing ai but better

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors