How deepak007bgd/fitbuddy works
FitBuddy is a workout-tracking and personalized fitness web app. Users register and maintain a fitness profile, then log workouts, view daily plans, track progress and streaks, and optionally request AI coaching or analysis. The main path runs from authenticated Home or Progress screens through workout/progress services and Firestore; AI features use a separate service and server handler. The graph follows shown imports, calls, and routes; AI-service-to-server wiring is not visible in the excerpts, so that link is marked unverified.
Main entry points: Home.jsx Home dashboard · App.jsx Application routes · Progress.jsx Progress dashboard · aiService.js AI feature service
Components 24
Accounts and Profiles
- Application routes
src/App.jsx - Authentication
src/context/AuthContext.jsx - Login
src/pages/Login.jsx - Registration
src/pages/Register.jsx - Fitness profile
src/pages/Profile.jsx
Workout and Progress
- Home dashboard
src/pages/Home.jsx - Workout logging
src/components/WorkoutModal.jsx - Workout history
src/components/WorkoutHistoryModal.jsx - Workout records
src/lib/workoutService.js - Daily plan
src/components/DailyPlanView.jsx - Progress dashboard
src/pages/Progress.jsx - Progress metrics
src/lib/progressService.js - Streak milestones
src/lib/milestoneService.js - Streak display
src/components/StreakWidget.jsx - Milestone celebration
src/components/MilestoneCelebrationModal.jsx
AI Coaching
- AI assistant
src/components/AiAssistant.jsx - AI progress analysis
src/components/AiProgressAnalysisCard.jsx - AI feature service
src/lib/aiService.js - AI request handler
server/aiHandler.js
Shared Platform
- Firebase client
src/lib/firebase.js - Shared UI
src/components/ui.jsx
Other components
- Fitness user
- Gemini API
- Firestore
Connections 40
- Fitness user → Application routes: uses
- Application routes → Authentication: guards routes
src/App.jsx - Application routes → Login: routes to
src/App.jsx - Application routes → Registration: routes to
src/App.jsx - Application routes → Fitness profile: routes to
src/App.jsx - Application routes → Home dashboard: routes to
src/App.jsx - Application routes → Progress dashboard: routes to
src/App.jsx - Authentication → Firebase client: uses auth and data
src/context/AuthContext.jsx - Fitness profile → Authentication: reads profile
src/pages/Profile.jsx - Home dashboard → Authentication: reads session
src/pages/Home.jsx - Home dashboard → Workout records: loads and updates
src/pages/Home.jsx - Home dashboard → Workout logging: opens logging
src/pages/Home.jsx - Home dashboard → Workout history: shows history
src/pages/Home.jsx - Workout logging → Workout records: logs workouts
src/components/WorkoutModal.jsx - Workout history → Workout records: reads records
src/components/WorkoutHistoryModal.jsx - Home dashboard → Daily plan: displays plan
src/pages/Home.jsx - Home dashboard → AI feature service: requests daily plan
src/pages/Home.jsx - Home dashboard → Streak milestones: claims milestones
src/pages/Home.jsx - Home dashboard → Streak display: renders streak
src/pages/Home.jsx - Home dashboard → Milestone celebration: shows milestone
src/pages/Home.jsx - Streak display → Streak milestones: uses milestone data
src/components/StreakWidget.jsx - Progress dashboard → Authentication: reads profile
src/pages/Progress.jsx - Progress dashboard → Workout records: loads workout logs
src/pages/Progress.jsx - Progress dashboard → Progress metrics: computes metrics
src/pages/Progress.jsx - Progress metrics → Firebase client: reads weight logs
src/lib/progressService.js - Progress dashboard → AI feature service: requests analysis
src/pages/Progress.jsx - Progress dashboard → AI progress analysis: renders analysis
src/pages/Progress.jsx - AI assistant → AI feature service: sends chat
src/components/AiAssistant.jsx - AI feature service → Firebase client: caches AI results
src/lib/aiService.js - AI feature service → Workout records: uses workout context
src/lib/aiService.js - AI feature service → AI request handler: requests AI generation
- AI request handler → Gemini API: calls generation API
server/aiHandler.js - Workout records → Firebase client: reads and writes records
src/lib/workoutService.js - Streak milestones → Firebase client: updates claims
src/lib/milestoneService.js - Firebase client → Firestore: connects
src/lib/firebase.js - Login → Shared UI: renders controls
src/pages/Login.jsx - Registration → Shared UI: renders controls
src/pages/Register.jsx - Daily plan → Shared UI: renders controls
src/components/DailyPlanView.jsx - AI assistant → Shared UI: renders controls
src/components/AiAssistant.jsx - AI progress analysis → Shared UI: renders controls
src/components/AiProgressAnalysisCard.jsx