# alkhazalih/ruhul-plus-gym architecture

> Architecture diagram of the GitHub repository alkhazalih/ruhul-plus-gym, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alkhazalih/ruhul-plus-gym
- Repository: https://github.com/alkhazalih/ruhul-plus-gym

## Overview

Ruhul Plus Gym is a gym-management system with an admin/receptionist portal, coach workspace, and separate member mobile app. Admins sign in to manage members, subscriptions, plans, staff, and check-ins; coaches manage member fitness plans; members use the mobile app for membership and fitness information. The sampled sources show the web portal’s routing and several Supabase interactions. Mobile capabilities beyond the sampled login and screen excerpts are retained as documented; their internal data flows are not inferred.

Main entry points: [`src/App.jsx`](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/App.jsx) (Portal Router), [`src/components/GymDashboard.jsx`](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/GymDashboard.jsx) (Member Dashboard), [`src/supabaseClient.js`](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/supabaseClient.js) (Web Supabase Client), [`src/components/CheckInScanner.jsx`](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/CheckInScanner.jsx) (Check-in Scanner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin["Admin Portal"]
  node_webapp["Portal Router<br/>[App.jsx]"]
  node_login["Staff Login<br/>[LoginScreen.jsx]"]
  node_users["Staff Management<br/>[UserManager.jsx]"]
  node_webclient["Web Supabase Client<br/>[supabaseClient.js]"]
end

subgraph group_operations["Gym Operations"]
  node_dashboard["Member Dashboard<br/>[GymDashboard.jsx]"]
  node_addmember["Add Member<br/>[AddMemberModal.jsx]"]
  node_editmember["Edit Member"]
  node_subscriptions["Subscription Management"]
  node_plans["Plan Management"]
  node_checkin["Check-in Scanner<br/>[CheckInScanner.jsx]"]
  node_checklogs["Check-in Logs<br/>[CheckInLogs.jsx]"]
  node_barcode["Barcode Card<br/>[BarcodeCard.jsx]"]
end

subgraph group_fitness["Fitness Coaching"]
  node_coach["Coach Portal<br/>[CoachPortal.jsx]"]
end

subgraph group_memberapp["Member App"]
  node_mobileentry["Mobile App Entry<br/>[index.js]"]
  node_mobile["Member Experience<br/>[App.js]"]
  node_mobileclient["Mobile Supabase Client<br/>[supabase.js]"]
end

node_staff(("Admin / Staff"))
node_member(("Gym Member"))
node_scanner(("Barcode Scanner"))
node_database[("Supabase Database")]

node_staff -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_login
node_login -->|"queries"| node_webclient
node_webapp -->|"routes to"| node_dashboard
node_webapp -->|"routes to"| node_plans
node_webapp -->|"routes to"| node_users
node_webapp -->|"routes to"| node_coach
node_webapp -->|"routes to"| node_checkin
node_dashboard -->|"opens"| node_addmember
node_dashboard -->|"opens"| node_editmember
node_dashboard -->|"opens"| node_subscriptions
node_dashboard -->|"renders"| node_barcode
node_dashboard -->|"renders"| node_checklogs
node_dashboard -->|"queries"| node_webclient
node_plans -->|"manages plans"| node_webclient
node_users -->|"manages accounts"| node_webclient
node_coach -->|"manages fitness data"| node_webclient
node_scanner -.->|"sends barcode"| node_checkin
node_checkin -->|"checks access"| node_webclient
node_webclient -->|"accesses"| node_database
node_member -.->|"opens"| node_mobileentry
node_mobileentry -->|"registers"| node_mobile
node_mobile -->|"queries"| node_mobileclient
node_mobileclient -->|"accesses"| node_database

click node_webapp "https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/App.jsx"
click node_login "https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/LoginScreen.jsx"
click node_dashboard "https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/GymDashboard.jsx"
click node_addmember "https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/AddMemberModal.jsx"
click node_editmember "https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/EditMemberModal.jsx"
click node_subscriptions "https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/AddSubscriptionModal.jsx"
click node_plans "https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/PlansManagement.jsx"
click node_checkin "https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/CheckInScanner.jsx"
click node_checklogs "https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/CheckInLogs.jsx"
click node_barcode "https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/BarcodeCard.jsx"
click node_users "https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/UserManager.jsx"
click node_coach "https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/CoachPortal.jsx"
click node_webclient "https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/supabaseClient.js"
click node_mobileentry "https://github.com/alkhazalih/ruhul-plus-gym/blob/main/JimzuApp/index.js"
click node_mobile "https://github.com/alkhazalih/ruhul-plus-gym/blob/main/JimzuApp/App.js"
click node_mobileclient "https://github.com/alkhazalih/ruhul-plus-gym/blob/main/JimzuApp/supabase.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webapp,node_login,node_users,node_webclient toneBlue
class node_dashboard,node_addmember,node_editmember,node_subscriptions,node_plans,node_checkin,node_checklogs,node_barcode,node_database toneAmber
class node_coach toneMint
class node_mobileentry,node_mobile,node_mobileclient toneRose
class node_staff,node_member,node_scanner toneIndigo
```

## Components

### Admin Portal

- [Portal Router](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/App.jsx): `src/App.jsx`
- [Staff Login](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/LoginScreen.jsx): `src/components/LoginScreen.jsx`
- [Staff Management](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/UserManager.jsx): `src/components/UserManager.jsx`
- [Web Supabase Client](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/supabaseClient.js): `src/supabaseClient.js`

### Gym Operations

- [Member Dashboard](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/GymDashboard.jsx): `src/components/GymDashboard.jsx`
- [Add Member](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/AddMemberModal.jsx): `src/components/AddMemberModal.jsx`
- [Edit Member](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/EditMemberModal.jsx): `src/components/EditMemberModal.jsx`
- [Subscription Management](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/AddSubscriptionModal.jsx): `src/components/AddSubscriptionModal.jsx`
- [Plan Management](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/PlansManagement.jsx): `src/components/PlansManagement.jsx`
- [Check-in Scanner](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/CheckInScanner.jsx): `src/components/CheckInScanner.jsx`
- [Check-in Logs](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/CheckInLogs.jsx): `src/components/CheckInLogs.jsx`
- [Barcode Card](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/BarcodeCard.jsx): `src/components/BarcodeCard.jsx`

### Fitness Coaching

- [Coach Portal](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/src/components/CoachPortal.jsx): `src/components/CoachPortal.jsx`

### Member App

- [Mobile App Entry](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/JimzuApp/index.js): `JimzuApp/index.js`
- [Member Experience](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/JimzuApp/App.js): `JimzuApp/App.js`
- [Mobile Supabase Client](https://github.com/alkhazalih/ruhul-plus-gym/blob/main/JimzuApp/supabase.js): `JimzuApp/supabase.js`

### Other components

- **Admin / Staff**
- **Gym Member**
- **Barcode Scanner**
- **Supabase Database**

## Connections

- Admin / Staff → Portal Router: uses (evidence: `src/App.jsx`)
- Portal Router → Staff Login: routes to (evidence: `src/App.jsx`)
- Staff Login → Web Supabase Client: queries (evidence: `src/components/LoginScreen.jsx`)
- Portal Router → Member Dashboard: routes to (evidence: `src/App.jsx`)
- Portal Router → Plan Management: routes to (evidence: `src/App.jsx`)
- Portal Router → Staff Management: routes to (evidence: `src/App.jsx`)
- Portal Router → Coach Portal: routes to (evidence: `src/App.jsx`)
- Portal Router → Check-in Scanner: routes to (evidence: `src/App.jsx`)
- Member Dashboard → Add Member: opens (evidence: `src/components/GymDashboard.jsx`)
- Member Dashboard → Edit Member: opens (evidence: `src/components/GymDashboard.jsx`)
- Member Dashboard → Subscription Management: opens (evidence: `src/components/GymDashboard.jsx`)
- Member Dashboard → Barcode Card: renders (evidence: `src/components/GymDashboard.jsx`)
- Member Dashboard → Check-in Logs: renders (evidence: `src/components/GymDashboard.jsx`)
- Member Dashboard → Web Supabase Client: queries (evidence: `src/components/GymDashboard.jsx`)
- Plan Management → Web Supabase Client: manages plans (evidence: `src/components/PlansManagement.jsx`)
- Staff Management → Web Supabase Client: manages accounts (evidence: `src/components/UserManager.jsx`)
- Coach Portal → Web Supabase Client: manages fitness data (evidence: `src/components/CoachPortal.jsx`)
- Barcode Scanner → Check-in Scanner: sends barcode
- Check-in Scanner → Web Supabase Client: checks access (evidence: `src/components/CheckInScanner.jsx`)
- Web Supabase Client → Supabase Database: accesses (evidence: `src/supabaseClient.js`)
- Gym Member → Mobile App Entry: opens
- Mobile App Entry → Member Experience: registers (evidence: `JimzuApp/index.js`)
- Member Experience → Mobile Supabase Client: queries (evidence: `JimzuApp/App.js`)
- Mobile Supabase Client → Supabase Database: accesses (evidence: `JimzuApp/supabase.js`)
