How hasan-selawy/qawi works
Qawi is a multi-tenant gym-management SaaS for Arabic-speaking markets, with web and mobile clients using a shared Spring Boot REST API. Users authenticate and then use role-specific features: gym administration and analytics, coaching and workout plans, member workouts/nutrition/progress, and platform-level gym management. The backend separates REST controllers from business services and persists application data in PostgreSQL. The README documents the broad client/API and feature scope; source excerpts support selected controller-to-service and service-to-repository interactions, so unshown domain links are not drawn.
Main entry points: controller REST API · App.tsx Web dashboard · AuthService.java Authentication · MemberController.java Member workflows
Components 21
User clients
- Web dashboard
artifacts/qawi-web/src/App.tsx - Mobile app
artifacts/qawi-mobile/app
Access and routing
- Authentication
qawi-backend/src/main/java/com/qawi/service/AuthService.java - JWT tokens
qawi-backend/src/main/java/com/qawi/security/JwtService.java - REST API
qawi-backend/src/main/java/com/qawi/controller
Gym workflows
- Gym administration
qawi-backend/src/main/java/com/qawi/controller/GymAdminController.java - Gym admin logic
qawi-backend/src/main/java/com/qawi/service/GymAdminService.java - Member workflows
qawi-backend/src/main/java/com/qawi/controller/MemberController.java - Workout planning
qawi-backend/src/main/java/com/qawi/service/WorkoutPlanService.java - Nutrition tracking
qawi-backend/src/main/java/com/qawi/service/NutritionV2Service.java - Coach workflows
qawi-backend/src/main/java/com/qawi/controller/WorkoutPlanController.java - Attendance
qawi-backend/src/main/java/com/qawi/controller/AttendanceController.java - Finance and HR
qawi-backend/src/main/java/com/qawi/controller - Platform management
qawi-backend/src/main/java/com/qawi/controller/SuperAdminController.java
Platform services
- User records
qawi-backend/src/main/java/com/qawi/repository/UserRepository.java - PostgreSQL
- Object storage routes
artifacts/api-server/src/routes/storage.ts - Object storage service
artifacts/api-server/src/lib/objectStorage.ts - Object access rules
artifacts/api-server/src/lib/objectAcl.ts
Other components
- Gym users
- Google Cloud Storage
Connections 21
- Gym users → Web dashboard: uses
README.md - Gym users → Mobile app: uses
README.md - Web dashboard → REST API: calls shared API
README.md - Mobile app → REST API: calls shared API
README.md - Web dashboard → Authentication: routes login
artifacts/qawi-web/src/App.tsx - Authentication → JWT tokens: issues tokens
qawi-backend/src/main/java/com/qawi/service/AuthService.java - REST API → Gym administration: routes requests
README.md - Gym administration → Gym admin logic: delegates
qawi-backend/src/main/java/com/qawi/controller/GymAdminController.java - REST API → Member workflows: routes requests
README.md - Member workflows → Workout planning: delegates
qawi-backend/src/main/java/com/qawi/controller/MemberController.java - Member workflows → Nutrition tracking: delegates
qawi-backend/src/main/java/com/qawi/controller/MemberController.java - REST API → Coach workflows: routes requests
README.md - REST API → Attendance: routes requests
README.md - REST API → Finance and HR: routes requests
README.md - REST API → Platform management: routes requests
README.md - Authentication → User records: loads users
qawi-backend/src/main/java/com/qawi/service/AuthService.java - Gym admin logic → User records: reads and writes
qawi-backend/src/main/java/com/qawi/service/GymAdminService.java - User records → PostgreSQL: persists records
README.md - Object storage routes → Object storage service: calls
artifacts/api-server/src/routes/storage.ts - Object storage service → Object access rules: checks access
artifacts/api-server/src/lib/objectStorage.ts - Object storage service → Google Cloud Storage: reads and writes objects
artifacts/api-server/src/lib/objectStorage.ts