A comprehensive iOS fitness tracking application built with SwiftUI and Clean Architecture, featuring exercise library, workout planning, and progress tracking.
FitTrackPro is a modern fitness application that provides users with a complete workout experience. From browsing over 1000+ exercises with animated GIF demonstrations to tracking weekly progress and creating custom workouts, the app delivers an intuitive and engaging fitness journey.
The project follows Clean Architecture principles, organizing the code into well-defined layers:
FitTrackPro/
├── Domain/ # Business rules and entities
│ ├── Entities/ # Domain models
│ ├── UseCases/ # Application use cases
│ └── Repositories/ # Repository contracts
├── Data/ # Data layer
│ ├── Repositories/ # Repository implementations
│ ├── DataSources/ # Data sources
│ │ ├── Local/ # Local data (SwiftData, UserDefaults)
│ │ └── Remote/ # Remote APIs and services
│ └── Models/ # Data models
├── Presentation/ # User interface
│ ├── Views/ # SwiftUI Views
│ └── ViewModels/ # ViewModels (MVVM)
└── Core/ # Utilities and extensions
├── Extensions/ # Swift/SwiftUI extensions
├── Utilities/ # Utility functions
├── Constants/ # Application constants
└── Network/ # Network configurations
- Swift - Programming language
- SwiftUI - UI framework with NavigationView, ScrollView, LazyVGrid
- Alamofire - HTTP networking client for API communication
- SDWebImageSwiftUI - Animated GIF and image loading with caching
- SwiftData - Modern data persistence framework with offline-first approach
- Combine - Reactive programming for ViewModels
- Clean Architecture - Architectural pattern with clear separation of concerns
- MVVM - Presentation pattern with ObservableObject ViewModels
- Repository Pattern - Data access abstraction layer with API fallback system
- Boundary Pattern - Clean interfaces between domain and data layers
- Dependency Injection - For testable and modular code with Resolver
The project uses the ExerciseDB API via RapidAPI to fetch exercise data:
- Base URL:
https://exercisedb.p.rapidapi.com - Available endpoints:
/exercises- List all exercises/exercises/bodyPart/{bodyPart}- Exercises by body part/exercises/target/{target}- Exercises by target muscle/exercises/equipment/{equipment}- Exercises by equipment/exercises/bodyPartList- List of body parts/exercises/targetList- List of target muscles/exercises/equipmentList- List of equipment/image- Get animated GIF for specific exercise with resolution support
- Multiple resolutions: 180p, 360p, 720p, 1080p
- Animated exercise demonstrations
- Automatic caching and optimization
- Smooth loading with placeholders
- Clone the repository:
git clone https://github.com/hoffsilva/FitTrackPro.git-
Set up the API Key:
- Get a key from ExerciseDB API on RapidAPI
- Edit the
.envfile in the project root:
RAPID_API_KEY=your_key_here- Add the
.envfile to the Xcode bundle (drag it into the project)
-
Open the project in Xcode:
open FitTrackPro.xcodeproj- Run the project on simulator or physical device
- Dynamic greeting based on time of day
- Real-time statistics with calories, steps, workouts, and streak tracking
- Recommended exercises from multiple body parts with animated GIFs
- Quick workout actions to start or continue workouts
- Responsive UI with gradient stat cards and loading states
- Comprehensive exercise database with 1000+ exercises
- Offline-first approach with automatic API→local data synchronization
- Intelligent fallback system - seamless offline experience after initial sync
- Advanced search functionality with debounced input
- Category filtering by body parts (All, Back, Chest, Arms, Legs, etc.)
- Animated GIF demonstrations with multiple resolutions
- Exercise details with step-by-step instructions and muscle targets
- Navigation integration with detailed exercise views
- Weekly activity charts with interactive navigation between weeks
- Dynamic statistics showing total workouts, calories, and streaks
- Achievement system with progress bars and earned badges
- Real-time progress updates with pull-to-refresh functionality
- Custom loading animations throughout the interface
- Workout creation with exercise selection and scheduling
- Day-based workout planning with visual day selection
- Active workout tracking with timer and set completion
- Hybrid repository pattern with SwiftData integration for persistence
- Automatic data sync with smart local caching
- Resilient offline support for uninterrupted workout experience
- Custom loading indicators with consistent circular animations
- Navigation bar loading states for seamless user experience
- Error handling with retry functionality
- Empty states with contextual messaging
- Responsive design with proper spacing and typography
- Color system with branded orange, blue, and purple themes
Hoff Henry Pereira da Silva
- GitHub: @hoffsilva