How coach-montanha/montanha-hybrid-training works
Sistema Híbrido de Treinamento is a coach-facing training platform for managing athletes, exercises, programs, and workout sessions, with AI-assisted prescription across multiple training methodologies. The main workflow moves from authenticated coach and athlete context into program generation or editing, then session design, persistence, and export. The graph includes catalog curation and the specialized AI engines listed in the source index. Several feature modules were not excerpted, so their internal calls are omitted rather than inferred.
Main entry points: client.ts Supabase client · SessionBuilder.tsx Session builder · prescricao-ia.server.ts Prescription services · PrescreverIaDialog.tsx AI prescription dialog
Components 26
Access & coaching
- Coach workspace
src/routes/_authenticated/app.index.tsx - Authentication
src/routes/auth.tsx - Ecosystem access
src/services/ecosystem-auth-service.ts - Athlete management
src/routes/_authenticated/app.alunos.tsx - Coach profile hook
src/hooks/use-coach.ts
Training catalog
- Exercise catalog
src/routes/_authenticated/app.exercicios.tsx - Catalog translation review
src/components/exercises/CatalogReviewList.tsx
Programs & sessions
- Program management
src/routes/_authenticated/app.programas.tsx - Program generation
src/routes/_authenticated/app.gerar.tsx - AI prescription dialog
src/components/programa-ia/PrescreverIaDialog.tsx - Session builder
src/components/session-builder/SessionBuilder.tsx - Session builder state
src/lib/session-builder-store.ts - Training methodology
src/lib/methodology.ts - Block format registry
src/lib/format-registry.ts
AI prescription
- Prescription services
src/lib/prescricao-ia.server.ts - Hybrid training AI
src/lib/hibrido-ia.server.ts - Functional training AI
src/lib/funcional-ia.server.ts - Running AI
src/lib/corrida-ia.server.ts - Weightlifting AI
src/lib/weightlifting-ia.server.ts - Kettlebell sport AI
src/lib/kb-sport-ia.server.ts
Persistence & export
- Supabase client
src/integrations/supabase/client.ts - Supabase data service
- Session export
src/lib/session-export.ts - Workout PDF export
src/lib/pdf-treino.ts - A4 image export
src/lib/a4-image-export.ts
Other components
- Coach
Connections 35
- Coach → Authentication: signs in
src/routes/auth.tsx - Authentication → Ecosystem access: checks access
src/routes/auth.tsx - Authentication → Supabase client: authenticates with
src/routes/auth.tsx - Coach workspace → Coach profile hook: loads profile
- Coach profile hook → Supabase client: queries coach
src/hooks/use-coach.ts - Athlete management → Supabase client: reads athlete data
src/routes/_authenticated/app.alunos.tsx - Athlete management → Coach profile hook: uses coach context
- Exercise catalog → Supabase client: accesses catalog
src/routes/_authenticated/app.exercicios.tsx - Catalog translation review → Supabase client: loads catalog
src/components/exercises/CatalogReviewList.tsx - Catalog translation review → Exercise catalog: reviews translations
- Catalog translation review → Supabase client: submits review
src/components/exercises/CatalogReviewList.tsx - Program generation → AI prescription dialog: opens prescription
src/routes/_authenticated/app.gerar.tsx - Program generation → Training methodology: uses methodology
src/routes/_authenticated/app.gerar.tsx - Program generation → Coach profile hook: loads coach context
src/routes/_authenticated/app.gerar.tsx - Program generation → Supabase client: loads preferences
src/routes/_authenticated/app.gerar.tsx - Program management → Supabase client: manages programs
src/routes/_authenticated/app.programas.tsx - Program management → AI prescription dialog: opens prescription
src/routes/_authenticated/app.programas.tsx - Program management → A4 image export: exports images
src/routes/_authenticated/app.programas.tsx - AI prescription dialog → Supabase client: saves sessions
src/components/programa-ia/PrescreverIaDialog.tsx - AI prescription dialog → Prescription services: invokes prescription
src/components/programa-ia/PrescreverIaDialog.tsx - AI prescription dialog → Training methodology: selects methodology
src/components/programa-ia/PrescreverIaDialog.tsx - Prescription services → Hybrid training AI: dispatches hybrid
- Prescription services → Functional training AI: dispatches functional
- Prescription services → Running AI: dispatches running
- Prescription services → Weightlifting AI: dispatches weightlifting
- Prescription services → Kettlebell sport AI: dispatches kettlebell
- Session builder → Session builder state: uses state
src/components/session-builder/SessionBuilder.tsx - Session builder → Training methodology: uses methodology
src/components/session-builder/SessionBuilder.tsx - Session builder → Block format registry: uses block formats
src/components/session-builder/SessionBuilder.tsx - Session builder → Supabase client: reads session data
src/components/session-builder/SessionBuilder.tsx - Session builder → Session export: exports sessions
src/components/session-builder/SessionBuilder.tsx - Session builder → Workout PDF export: exports PDF
src/components/session-builder/SessionBuilder.tsx - Session builder → AI prescription dialog: opens prescription
src/components/session-builder/SessionBuilder.tsx - Supabase client → Supabase data service: connects to
src/integrations/supabase/client.ts - Ecosystem access → Supabase data service: stores access records
src/services/ecosystem-auth-service.ts