How deen7028/healthymate works
HealthyMate is a Flutter personal-health app with PHP/MySQL APIs and local SQLite storage. Its user workflow spans onboarding and account access, daily health tracking (workouts, nutrition, routines), dashboard/calculator results, and profile management. The README also documents food recognition, notifications, badges, exports, and health-platform synchronization, so these remain visible despite unsampled Dart implementations. Relationships among Dart features are mostly based on the documented product flow; their exact calls are not shown in the excerpts.
Main entry points: api_service.dart API client · db_connect.php API auth and DB · upload_image.php Image upload · login_controller.dart Authentication
Components 28
Flutter app
- Onboarding
lib/features/onboarding/pages/onboarding_wizard_page.dart - Authentication
lib/features/auth/login/controllers/login_controller.dart
Health tracking
- GPS workouts
lib/features/workout - Nutrition logs
lib/core/database/daos/activity_and_goals/nutrition_dao.dart - Food recognition
lib/features/food_recognition/services/food_recognition_service.dart - Habits and routines
lib/features/practice/controllers/routine_controller.dart - Notifications
lib/features/notifications/controllers/notification_controller.dart - Badges
api/routines/badges.php
Account and insights
- Daily dashboard
lib/features/dashboard/controllers/dashboard_controller.dart - Health calculator
lib/features/health_calculator/controllers/health_calculator_controller.dart - Profile settings
lib/features/profile - Data export
lib/core/services/export/data_export_service.dart
PHP API
- API client
lib/core/services/api_service.dart - Auth endpoints
api/auth/login.php - Dashboard endpoint
api/dashboard/dashboard.php - Workout endpoint
api/workouts/workouts.php - Nutrition endpoint
api/nutrition/nutrition_logs.php - Routine endpoints
api/routines.php - Profile endpoints
api/profile/user_profile.php - Image upload
api/media/upload_image.php - Email OTP
api/auth/send_email_otp.php
Data and integrations
- Health sync
lib/core/services/health_kit/health_kit_connect_service.dart - API auth and DB
api/db_connect.php - SQLite store
lib/core/database/app_database.dart - MySQL store
HealthyMate.sql
Other components
- User
- Email delivery
- Apple Health / Google Fit
Connections 32
- User → Onboarding: starts
- Onboarding → Authentication: continues to
- User → Authentication: signs in
- Authentication → API client: requests
- Daily dashboard → API client: loads data
- GPS workouts → API client: syncs workout
- Nutrition logs → API client: syncs logs
- Habits and routines → API client: syncs routines
- Profile settings → API client: updates profile
- Food recognition → Nutrition logs: supports logging
- Health calculator → SQLite store: stores history
- Habits and routines → Notifications: schedules reminders
- GPS workouts → Badges: earns achievements
- Data export → SQLite store: reads data
- Health sync → Apple Health / Google Fit: connects
- API client → Auth endpoints: calls
- API client → Dashboard endpoint: calls
- API client → Workout endpoint: calls
- API client → Nutrition endpoint: calls
- API client → Routine endpoints: calls
- API client → Profile endpoints: calls
- API client → Image upload: calls
- Auth endpoints → API auth and DB: loads
api/auth/login.php - Dashboard endpoint → API auth and DB: loads
api/dashboard/dashboard.php - Workout endpoint → API auth and DB: loads
api/workouts/workouts.php - Nutrition endpoint → API auth and DB: loads
api/nutrition/nutrition_logs.php - Routine endpoints → API auth and DB: loads
api/routines.php - Profile endpoints → API auth and DB: loads
api/profile/user_profile.php - Image upload → API auth and DB: loads
api/media/upload_image.php - Email OTP → API auth and DB: loads
api/auth/send_email_otp.php - Image upload → Email delivery: sends OTP
- API auth and DB → MySQL store: connects