How syrinetriki/gymapp works
GymApp combines athlete and coach mobile experiences with a web administration console and a FastAPI backend. The user-facing workflow spans account registration/verification and login, role-specific training and coaching activities, and administrative oversight. The mobile app separates screens from domain services and a shared authenticated API client; the backend mounts auth, admin, exercise, and plan routes over shared database and authentication infrastructure. Messaging, nutrition, marketplace, progress, and related mobile domains appear in the source index, but their server-side wiring is not shown, so those connections are omitted.
Main entry points: main.py FastAPI application · auth.py Authentication routes · super_admin.py Super-admin routes · admin.py Admin routes
Components 27
Mobile app
- Sign in and register
mobile/app/(auth) - Coach clients
mobile/app/(coach)/(tabs)/clients.tsx - Coach sessions
mobile/app/(coach)/(tabs)/sessions.tsx - Program editor
mobile/components/ProgramForm.tsx - AI coach
mobile/AiCoach/aiCoachService.ts - Athlete and coach features
mobile/services - Auth service
mobile/services/auth.service.ts - Authenticated API client
mobile/services/apiClient.ts - AI chat hook
mobile/AiCoach/useAiCoach.ts
Web console
- Admin console
frontend-web/src/app/admin/page.tsx - Super-admin console
frontend-web/src/app/super-admin - Web login
frontend-web/src/app/login/page.tsx
Backend API
- FastAPI application
backend/main.py - Authentication routes
backend/routes/auth.py - Admin routes
backend/routes/admin.py - Super-admin routes
backend/routes/super_admin.py - Exercise catalog
backend/routes/exercises.py - Training plans
backend/routes/plans.py
Backend core
- Auth and email utilities
backend/auth_utils.py - Request and response schemas
backend/schemas.py - Domain models
backend/models.py - Database sessions
backend/database.py - Relational database
Other components
- Athlete
- Coach
- Administrator
- AI chat service
Connections 32
- Athlete → Sign in and register: registers or signs in
mobile/app/(auth)/register.tsx - Coach → Sign in and register: registers or signs in
mobile/app/(auth)/register.tsx - Coach → Coach clients: manages roster
mobile/app/(coach)/(tabs)/clients.tsx - Coach → Coach sessions: views schedule
mobile/app/(coach)/(tabs)/sessions.tsx - Coach clients → Athlete and coach features: loads client links
mobile/app/(coach)/(tabs)/clients.tsx - Coach sessions → Athlete and coach features: loads sessions
mobile/app/(coach)/(tabs)/sessions.tsx - Program editor → Athlete and coach features: uses client and program services
mobile/components/ProgramForm.tsx - Sign in and register → Auth service: submits registration
mobile/app/(auth)/register.tsx - Auth service → FastAPI application: calls auth endpoints
mobile/services/auth.service.ts - Athlete and coach features → Authenticated API client: shares authenticated client
mobile/services/apiClient.ts - FastAPI application → Authentication routes: mounts
backend/main.py - FastAPI application → Admin routes: mounts
backend/main.py - FastAPI application → Super-admin routes: mounts
backend/main.py - FastAPI application → Exercise catalog: mounts
backend/main.py - FastAPI application → Training plans: mounts
backend/main.py - Authentication routes → Auth and email utilities: uses auth utilities
backend/routes/auth.py - Authentication routes → Request and response schemas: validates requests
backend/routes/auth.py - Authentication routes → Domain models: queries and updates
backend/routes/auth.py - Authentication routes → Database sessions: uses database session
backend/routes/auth.py - Admin routes → Domain models: uses domain models
backend/routes/admin.py - Admin routes → Request and response schemas: uses schemas
backend/routes/admin.py - Admin routes → Database sessions: uses database session
backend/routes/admin.py - Super-admin routes → Auth and email utilities: uses auth utilities
backend/routes/super_admin.py - Super-admin routes → Domain models: uses domain models
backend/routes/super_admin.py - Super-admin routes → Request and response schemas: uses schemas
backend/routes/super_admin.py - Super-admin routes → Database sessions: uses database session
backend/routes/super_admin.py - Database sessions → Relational database: connects and commits
backend/database.py - Administrator → Admin console: uses
frontend-web/src/app/admin/page.tsx - Administrator → Super-admin console: uses
frontend-web/src/app/super-admin/users/page.tsx - Administrator → Web login: signs in
frontend-web/src/app/login/page.tsx - AI chat hook → AI coach: supports chat hook
mobile/AiCoach/useAiCoach.ts - AI coach → AI chat service: posts chat messages
mobile/AiCoach/aiCoachService.ts