How mahmoudsaeedyousef/gymos works
GymOS is a multi-tenant gym-management SaaS with a Flutter mobile shell and an ASP.NET API/application backend. The main operational workflow is a gym user making an API request that reaches a domain endpoint and application handler; handlers use tenant-aware application services and persist gym records through the database context. The tree documents authentication, members, plans, subscriptions, payments, attendance, visits and dashboard capabilities. Endpoint-to-handler dispatch beyond the sampled auth endpoint is not shown, so those links are omitted; unsampled capabilities are retained as subsystem nodes.
Main entry points: Program.cs API host · GymDbContext.cs Gym database context · AuthEndpoints.cs Authentication · IGymDbContext.cs Database interface
Components 27
API and identity
- API host
backend/GymOS.Api/Program.cs - Authentication
backend/GymOS.Api/Endpoints/AuthEndpoints.cs - Gym endpoints
backend/GymOS.Api/Endpoints/GymEndpoints.cs - Attendance endpoints
backend/GymOS.Api/Endpoints/AttendanceEndpoints.cs - Payment endpoints
backend/GymOS.Api/Endpoints/PaymentsEndpoints.cs - Plan endpoints
backend/GymOS.Api/Endpoints/PlansEndpoints.cs - Visit endpoints
backend/GymOS.Api/Endpoints/VisitEndpoints.cs - Dashboard endpoints
backend/GymOS.Api/Endpoints/DashboardEndpoints.cs
Gym operations
- Member management
backend/GymOS.Application/Features/Members - Plan management
backend/GymOS.Application/Features/Plans - Subscriptions
backend/GymOS.Application/Features/Subscriptions - Payments
backend/GymOS.Application/Features/Payments - Drop-in visits
backend/GymOS.Application/Features/Visits/Commands/RecordDropInVisit/RecordDropInVisitCommandHandler.cs - Attendance
backend/GymOS.Application/Features/Attendance - Dashboard
backend/GymOS.Application/Features/Dashboard
Domain records
- User and tenant
backend/GymOS.Domain/Entities/ApplicationUser.cs - Plan
backend/GymOS.Domain/Entities/Plan.cs - Subscription
backend/GymOS.Domain/Entities/Subscription.cs - Attendance record
backend/GymOS.Domain/Entities/AttendanceRecord.cs - Payment record
backend/GymOS.Domain/Entities/PaymentRecord.cs
Persistence and services
- Gym database context
backend/GymOS.Infrastructure/Data/GymDbContext.cs - Database interface
backend/GymOS.Application/Interfaces/IGymDbContext.cs - Tenant service
backend/GymOS.Infrastructure/Services/CurrentTenantService.cs - Cache service
backend/GymOS.Infrastructure/Services/InMemoryCacheService.cs - File storage
backend/GymOS.Infrastructure/Services/LocalFileStorageService.cs
Other components
- Gym user
- Mobile app shell
app/gym_os
Connections 24
- Gym user → API host: sends requests
- API host → Authentication: maps routes
backend/GymOS.Api/Program.cs - API host → Gym endpoints: maps routes
backend/GymOS.Api/Program.cs - API host → Attendance endpoints: maps routes
backend/GymOS.Api/Program.cs - API host → Payment endpoints: maps routes
backend/GymOS.Api/Program.cs - API host → Plan endpoints: maps routes
backend/GymOS.Api/Program.cs - API host → Visit endpoints: maps routes
backend/GymOS.Api/Program.cs - API host → Dashboard endpoints: maps routes
backend/GymOS.Api/Program.cs - Authentication → User and tenant: creates users
backend/GymOS.Api/Endpoints/AuthEndpoints.cs - Authentication → Gym database context: uses identity store
backend/GymOS.Api/Endpoints/AuthEndpoints.cs - API host → Gym database context: configures database
backend/GymOS.Api/Program.cs - API host → Database interface: registers context
backend/GymOS.Api/Program.cs - API host → Tenant service: registers service
backend/GymOS.Api/Program.cs - API host → Cache service: registers service
backend/GymOS.Api/Program.cs - API host → File storage: registers service
backend/GymOS.Api/Program.cs - Drop-in visits → Database interface: reads and writes
backend/GymOS.Application/Features/Visits/Commands/RecordDropInVisit/RecordDropInVisitCommandHandler.cs - Drop-in visits → Tenant service: gets tenant
backend/GymOS.Application/Features/Visits/Commands/RecordDropInVisit/RecordDropInVisitCommandHandler.cs - Gym database context → Database interface: implements
backend/GymOS.Infrastructure/Data/GymDbContext.cs - Gym database context → User and tenant: stores
backend/GymOS.Infrastructure/Data/GymDbContext.cs - Gym database context → Plan: stores
backend/GymOS.Infrastructure/Data/GymDbContext.cs - Gym database context → Subscription: stores
backend/GymOS.Infrastructure/Data/GymDbContext.cs - Gym database context → Attendance record: stores
backend/GymOS.Infrastructure/Data/GymDbContext.cs - Gym database context → Payment record: stores
backend/GymOS.Infrastructure/Data/GymDbContext.cs - Gym database context → Tenant service: applies tenant filters
backend/GymOS.Infrastructure/Data/GymDbContext.cs