How cmendess01/coachpass works
CoachPass is a combined trainer/nutritionist management platform and student app, with a Payload CMS backend. Professionals onboard and link students, then manage workouts, nutrition, sessions, assessments, and progress; students consume assigned plans, log activity, and view progress. The graph preserves documented app, CMS, and AI capabilities. Relationships are limited to calls or routes evidenced in excerpts and the README; unsampled feature wiring is left unasserted.
Main entry points: professionalApi.ts Professional data API · studentApi.ts Student data API · cms.ts CMS API client · App.tsx App bootstrap
Components 25
Web application
- App bootstrap
apps/fitsync-cms/src/web/App.tsx - Role-based routes
apps/fitsync-cms/src/web/routes.tsx - Authentication
apps/fitsync-cms/src/web/context/AuthContext.tsx - Role workspaces
apps/fitsync-cms/src/web/components/Layout.tsx
Professional workflows
- Onboarding
apps/fitsync-cms/src/web/components/pages/ProfessionalOnboarding.tsx - Professional portal
apps/fitsync-cms/src/web/components/pages/PersonalDashboard.tsx - Nutrition planning
apps/fitsync-cms/src/web/components/pages/CreateDietPlan.tsx - Workout planning
apps/fitsync-cms/src/web/components/pages/CreateWorkout.tsx
Student workflows
- Student diet
apps/fitsync-cms/src/web/components/pages/Diet.tsx - Student dashboard
apps/fitsync-cms/src/web/components/pages/Dashboard.tsx - Progress tracking
apps/fitsync-cms/src/web/components/pages/Evolution.tsx
CMS and API
- Student data API
apps/fitsync-cms/src/web/lib/studentApi.ts - Professional data API
apps/fitsync-cms/src/web/lib/professionalApi.ts - CMS API client
apps/fitsync-cms/src/lib/cms.ts - Payload REST API
apps/fitsync-cms/src/app/(payload)/api/[...slug]/route.ts - Domain collections
apps/fitsync-cms/src/collections - Link access rules
apps/fitsync-cms/src/access/links.ts - CMS administration
apps/fitsync-cms/src/app/(payload)/admin/[[...segments]]/page.tsx
AI services
- AI workout generation
apps/fitsync-cms/src/app/(payload)/api/ai/generate-workout/route.ts - AI meal generation
apps/fitsync-cms/src/app/(payload)/api/ai/generate-meal-plan/route.ts - AI chat
apps/fitsync-cms/src/app/(payload)/api/ai/chat/route.ts - AI generators
apps/fitsync-cms/src/services/ai - Gemini provider
apps/fitsync-cms/src/services/ai/geminiProvider.ts
Other components
- User
- AI user
Connections 27
- User → App bootstrap: opens app
apps/fitsync-cms/src/web/App.tsx - App bootstrap → Role-based routes: mounts router
apps/fitsync-cms/src/web/App.tsx - App bootstrap → Authentication: provides auth
apps/fitsync-cms/src/web/App.tsx - Role-based routes → Authentication: guards access
apps/fitsync-cms/src/web/routes.tsx - Role-based routes → Role workspaces: renders workspace
apps/fitsync-cms/src/web/routes.tsx - Authentication → CMS API client: requests login
apps/fitsync-cms/src/web/context/AuthContext.tsx - Onboarding → Professional data API: loads linked people
- Professional portal → Professional data API: loads management data
- Nutrition planning → Professional data API: creates meal plans
apps/fitsync-cms/src/web/components/pages/CreateDietPlan.tsx - Nutrition planning → Student data API: loads foods
apps/fitsync-cms/src/web/components/pages/CreateDietPlan.tsx - Workout planning → Professional data API: manages workouts
apps/fitsync-cms/src/web/components/pages/CreateWorkout.tsx - Student diet → Student data API: loads meal plans
apps/fitsync-cms/src/web/components/pages/Diet.tsx - Student dashboard → Student data API: loads dashboard data
apps/fitsync-cms/src/web/components/pages/Dashboard.tsx - Progress tracking → Student data API: loads student progress
apps/fitsync-cms/src/web/components/pages/Evolution.tsx - Progress tracking → Professional data API: loads professional data
apps/fitsync-cms/src/web/components/pages/Evolution.tsx - Student data API → CMS API client: uses requests
apps/fitsync-cms/src/web/lib/studentApi.ts - Professional data API → CMS API client: uses requests
apps/fitsync-cms/src/web/lib/professionalApi.ts - CMS API client → Payload REST API: calls REST API
- Payload REST API → Domain collections: serves collections
- Domain collections → Link access rules: checks active links
apps/fitsync-cms/src/collections/Sessions.ts - User → CMS administration: administers content
- AI user → AI workout generation: requests workout
- AI user → AI meal generation: requests meal plan
- AI user → AI chat: chats with AI
- AI workout generation → AI generators: generates workout
- AI meal generation → AI generators: generates meal plan
- AI chat → Gemini provider: uses provider