How diegonatalo/fitlog works
FitLog is a client-side workout tracker. Users manage exercises and reusable workout plans, start a workout session, record sets with load and repetitions, then finish and review sessions in history. React routes expose the library, plan and exercise details, active session, and history; a shared store owns domain updates and persists them through localStorage. The README also documents filtering exercises by muscle group and search. Architecture links below follow shown calls or README capabilities; unsampled page internals are not assumed.
Main entry points: App.tsx Route application · shared.ts Store context · SessionScreen.tsx Active session · LibraryPage.tsx Exercise library
Components 23
App navigation
- Route application
src/App.tsx - App layout
src/components/Layout.tsx - Home dashboard
src/pages/HomePage.tsx - Empty state
src/components/EmptyState.tsx
Plans and sessions
- Workout history
src/pages/HistoryPage.tsx - Session review
src/pages/SessionDetail.tsx - Active session
src/pages/SessionScreen.tsx - Workout detail
src/pages/WorkoutDetail.tsx - Workout editor
src/pages/WorkoutForm.tsx - Set log form
src/components/LogForm.tsx - Confirm dialog
src/components/ConfirmDialog.tsx - History list
src/components/HistoryList.tsx
Exercise library
- Exercise library
src/pages/LibraryPage.tsx - Exercise detail
src/pages/ExerciseDetail.tsx - Exercise form
src/components/ExerciseForm.tsx - Load selector
src/components/LoadTypeToggle.tsx - Muscle badge
src/components/MuscleBadge.tsx
State and persistence
- Store context
src/pages/shared.ts - Workout store
src/hooks/useWorkoutStore.ts - Persisted state hook
src/hooks/usePersistedState.ts - Local storage
src/lib/storage.ts
Other components
- User
- Browser localStorage
Connections 40
- User → Route application: opens app
README.md - Route application → App layout: routes through
src/App.tsx - Route application → Store context: provides store
src/App.tsx - Route application → Home dashboard: routes to
src/App.tsx - Route application → Exercise library: routes to
src/App.tsx - Route application → Workout history: routes to
src/App.tsx - Route application → Session review: routes to
src/App.tsx - Route application → Exercise detail: routes to
src/App.tsx - Route application → Workout editor: routes to
src/App.tsx - Route application → Workout detail: routes to
src/App.tsx - Route application → Active session: routes to
src/App.tsx - App layout → Home dashboard: renders route
src/App.tsx - Home dashboard → Store context: reads store
src/pages/HomePage.tsx - Exercise library → Store context: reads store
src/pages/LibraryPage.tsx - Workout history → Store context: reads store
src/pages/HistoryPage.tsx - Session review → Store context: reads store
src/pages/SessionDetail.tsx - Active session → Store context: reads store
src/pages/SessionScreen.tsx - Workout detail → Store context: reads store
src/pages/WorkoutDetail.tsx - Workout editor → Store context: reads store
src/pages/WorkoutForm.tsx - Exercise detail → Store context: reads store
src/pages/ExerciseDetail.tsx - Store context → Workout store: exposes store
src/pages/shared.ts - Workout store → Persisted state hook: uses persisted state
src/hooks/useWorkoutStore.ts - Persisted state hook → Local storage: loads and saves
src/hooks/usePersistedState.ts - Local storage → Browser localStorage: reads and writes
src/lib/storage.ts - Active session → Set log form: renders form
src/pages/SessionScreen.tsx - Set log form → Load selector: renders selector
src/components/LogForm.tsx - Active session → Workout store: records and finishes
src/pages/SessionScreen.tsx - Exercise library → Exercise form: renders form
src/pages/LibraryPage.tsx - Exercise form → Load selector: renders selector
src/components/ExerciseForm.tsx - Exercise library → Workout store: manages exercises
src/pages/LibraryPage.tsx - Workout editor → Workout store: manages plans
src/pages/WorkoutForm.tsx - Workout history → History list: renders list
src/pages/HistoryPage.tsx - Active session → Confirm dialog: confirms discard
src/pages/SessionScreen.tsx - Active session → Empty state: renders empty state
src/pages/SessionScreen.tsx - Exercise library → Empty state: renders empty state
src/pages/LibraryPage.tsx - Exercise detail → Exercise form: renders form
src/pages/ExerciseDetail.tsx - Exercise detail → Set log form: renders form
src/pages/ExerciseDetail.tsx - Exercise detail → Confirm dialog: confirms removal
src/pages/ExerciseDetail.tsx - Active session → Muscle badge: renders badge
src/pages/SessionScreen.tsx - Exercise library → Muscle badge: renders badge
src/pages/LibraryPage.tsx