How markfdez/gym_tracker works
Project type and purpose
• This is a cross-platform Flutter application (“gym_tracker”) that runs on Android, iOS, Linux, macOS, Windows and web.
• Purpose: let users register/login, create and view workout routines, log sessions, track progress. Data is persisted in Firebase.
File structure
• Top-level platform folders: android/, ios/, linux/, macos/, windows/, web/. These contain the native shell projects generated by Flutter.
• Core application code is in lib/:
• lib/main.dart – entry point
• lib/models/ – domain models (UserProfile, WorkoutRoutine, WorkoutSession, ExerciseProgress)
• lib/providers/ – state-management (AuthProvider)
• lib/service/firebase_service.dart – data layer to Firebase Auth/Firestore
• lib/screens/ – UI screens (auth, home, routines, sessions, profile)
• lib/widgets/ – reusable UI widgets organized by feature
• lib/theme/ & lib/utils/ – theming & utility helpers
• Tests mirror the structure under test/: models, services, widgets, with mocks in test/mocks.
README
• It is the default Flutter starter README with no custom architecture description.
• We infer architecture from the code layout and presence of Firebase config files (android/app/google-services.json, iOS Config).
Elements
• UI → Providers (“state requests & events”)
• Providers → FirebaseService (“API calls”)
• FirebaseService → Firebase (“REST/Websocket”)
• Firebase → FirebaseService (“data response”)
• FirebaseService → Providers → UI (“state updates”)
• UI (blue), state management (green), data layer (orange), external services (purple)
Detailed capturing of essential elements
• Models: UserProfile, WorkoutRoutine, WorkoutSession flowing between Service and Providers