How protrainingunaj/protraining-front works
ProTraining is a role-based PWA for physical trainers and athletes. Trainers manage organizations, athletes, training plans, calendars and daily monitoring; athletes complete check-ins, view their routine and track progress. The router separates the two role-specific experiences, while API modules mediate backend access. The graph includes documented product areas whose page internals were not sampled; their unverified connections are intentionally omitted. Source excerpts establish selected routing, authentication, monitoring, organization and routine relationships, but do not expose the full application call graph.
Main entry points: router.tsx Role router · authService.ts Authentication · FinishRoutineModal.tsx Routine completion · seguimientoService.ts Check-in and load API
Components 20
Application shell
- Role router
src/router.tsx - Trainer layout
src/layouts/CoachLayout.tsx - Athlete layout
src/layouts/AthleteLayout.tsx
Identity and access
- Session context
src/context/AuthContext.tsx - Authentication
src/api/authService.ts
Trainer workspace
- Organizations and athletes
src/pages/coach/OrganizationsPage.tsx - Plan authoring
src/pages/coach/PlanningPage.tsx - Season calendar
src/pages/coach/SeasonCalendarPage.tsx - Daily monitoring
src/pages/coach/MonitoringPage.tsx
Athlete experience
- Training routine
src/pages/athlete/RoutinePage.tsx - Routine completion
src/components/routine/FinishRoutineModal.tsx - Wellness check-in
src/pages/athlete/CheckInPage.tsx - Daily load
src/pages/athlete/DailyLoadPage.tsx - Progress and records
src/pages/athlete/ProgressPage.tsx
Backend integration
- HTTP client
src/api/axiosClient.ts - Organization API
src/api/structureService.ts - Check-in and load API
src/api/seguimientoService.ts - Push notifications
public/push-sw.js
Other components
- Physical trainer
- Athlete
Connections 10
- Role router → Trainer layout: routes trainer
src/router.tsx - Role router → Athlete layout: routes athlete
src/router.tsx - Session context → Authentication: calls authentication
src/context/AuthContext.tsx - Authentication → HTTP client: sends login
src/api/authService.ts - Organizations and athletes → Organization API: manages organization data
src/pages/coach/OrganizationsPage.tsx - Daily monitoring → Check-in and load API: updates attendance
src/pages/coach/MonitoringPage.tsx - Training routine → Routine completion: opens completion
src/pages/athlete/RoutinePage.tsx - Routine completion → Check-in and load API: submits session data
src/components/routine/FinishRoutineModal.tsx - Physical trainer → Role router: uses trainer workspace
README.md - Athlete → Role router: uses athlete workspace
README.md