How 04-varsha/fitlog works
FitLog is a workout tracker: users create, browse, filter, edit, and delete workouts, then review weekly totals, workout-type breakdowns, and streaks. The React app routes these workflows to API-backed pages; the Express API handles workout CRUD and weekly aggregation through a Mongoose model, while the weekly goal is stored in the browser. README capabilities such as responsive layout and motivational quotes are included; backend details beyond the sampled routes and model are limited to the shown source.
Main entry points: App.jsx App routing · Stats.jsx Weekly statistics · api.js Axios API client · ExerciseForm.jsx Workout form
Components 17
React application
- App routing
client/src/App.jsx - Navigation bar
client/src/components/NavBar.jsx - Motivational quote
client/src/components/MotivationQuote.jsx
Workout workflows
- Workout form
client/src/pages/ExerciseForm.jsx - Workout list
client/src/pages/ExerciseList.jsx - Workout card
client/src/components/ExerciseCard.jsx - Date and streak utilities
client/src/utils.js
Progress insights
- Weekly statistics
client/src/pages/Stats.jsx - Weekly goal bar
client/src/components/GoalBar.jsx - Stat cards
client/src/components/StatCard.jsx
API and persistence
- Axios API client
client/src/api.js - Express server
server/server.js - Workout API routes
server/routes/exercises.js - Exercise model
server/models/Exercise.js
Other components
- Tracker user
- MongoDB
- Browser local storage
Connections 20
- Tracker user → App routing: uses
README.md - App routing → Navigation bar: renders
client/src/App.jsx - App routing → Motivational quote: renders
client/src/App.jsx - App routing → Workout list: routes to
client/src/App.jsx - App routing → Workout form: routes to
client/src/App.jsx - App routing → Weekly statistics: routes to
client/src/App.jsx - Workout form → Axios API client: sends requests
client/src/pages/ExerciseForm.jsx - Workout list → Axios API client: loads and deletes
client/src/pages/ExerciseList.jsx - Workout list → Workout card: renders
client/src/pages/ExerciseList.jsx - Workout form → Date and streak utilities: uses date helpers
client/src/pages/ExerciseForm.jsx - Weekly statistics → Axios API client: loads summaries
client/src/pages/Stats.jsx - Weekly statistics → Date and streak utilities: calculates streaks
client/src/pages/Stats.jsx - Weekly statistics → Weekly goal bar: renders
client/src/pages/Stats.jsx - Weekly statistics → Stat cards: renders
client/src/pages/Stats.jsx - Weekly statistics → Browser local storage: reads and writes goal
client/src/pages/Stats.jsx - Axios API client → Express server: calls API
- Express server → Workout API routes: mounts routes
server/server.js - Express server → MongoDB: connects
server/server.js - Workout API routes → Exercise model: queries and updates
server/routes/exercises.js - Exercise model → MongoDB: persists documents