Health Analytics & Tracking - Jashan-randhawa/AI-FitnessTracker1 GitHub Wiki
π Health Analytics & Tracking
FitTrack AI provides a real-time health dashboard that converts raw calorie numbers into actionable visual feedback.
π― Dynamic Goal Rings
The top of the dashboard showcases three interactive SVG goal rings that scale smoothly on both mobile viewports and wide desktop displays:
- Calories In (Emerald Ring): Tracks calories consumed against your daily caloric target.
- Calories Out (Orange Ring): Tracks active calories burned from logged workouts and cardio.
- Active Minutes (Blue Ring): Tracks physical activity duration against your daily goal (e.g. 45 mins).
$$\text{Net Calories} = \text{Calories Consumed} - \text{Calories Burned}$$
π
Interactive Calendar Heatmap (CalendarHeatmap)
FitTrack AI features an interactive, contribution-style calendar heatmap embedded in both the Food Log and Activity Log pages:
- 90-Day Visual Window: Displays the past 12β13 weeks organized by day of the week (MonβSun).
- 4-Level Intensity Scale:
Level 0(Empty): No activity or food logged for the day.Level 1(Light): 1β499 kcal (Food) / 1β199 kcal (Activity).Level 2(Medium): 500β1,199 kcal (Food) / 200β399 kcal (Activity).Level 3(High): 1,200β1,999 kcal (Food) / 400β699 kcal (Activity).Level 4(Maximum): $\ge 2,000$ kcal (Food) / $\ge 700$ kcal (Activity).
- Streak Calculation: Automatically computes Current Streak and Max Streak from contiguous logged days.
- Interactive Day Selection: Clicking any square filters the active log table directly to that selected date for instant inspection.
- Hover Tooltips: Native browser and custom tooltips showing the formatted date, day of week, and exact calorie count.
π₯ Activity Streak Engine
Consistency is the foundation of fitness. FitTrack AI features an automated streak calculator:
- Inspects consecutive daily activity logs.
- When you log an activity today after yesterday's log, your streak count increments.
- Milestone achievements (e.g. 7-day, 14-day, 30-day streaks) trigger full-screen Framer Motion confetti animations.
π§ Interactive Hydration Tracker
Proper hydration is essential for metabolic health and athletic recovery:
- Visual Bottle Fill: Dynamic SVG hydration graphic that fills with water as you log intake.
- Quick-Add Presets:
+150ml(Small cup)+250ml(Standard glass)+350ml(Mug / Small bottle)+500ml(Full shaker bottle)
- Custom Volume Input: Log precise water volumes in milliliters.
βοΈ Automated BMI & Body Metrics
- Instant Calculation: Computes your Body Mass Index: $$\text{BMI} = \frac{\text{Weight (kg)}}{[\text{Height (m)}]^2}$$
- Visual Categorization: Underweight ($<18.5$), Normal ($18.5 - 24.9$), Overweight ($25.0 - 29.9$), or Obese ($\ge 30.0$).
- Data Exports (PDF & CSV): Download a formatted PDF progress report or export raw CSV spreadsheets of your historical food logs and activity entries directly from the Profile page.