# jenothan/keysclub-backend architecture

> Architecture diagram of the GitHub repository jenothan/keysclub-backend, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jenothan/keysclub-backend
- Repository: https://github.com/jenothan/keysclub-backend

## Overview

This appears to be a KEYS Club badminton-court booking and membership application built on Laravel. Users check court availability, submit bookings, and can request membership; administrators manage bookings, blocked time, membership decisions, users, and club website data. The graph reflects controller responsibilities and the booking, membership, SMS, and upload interactions visible in sampled source. Routes and several controller implementations were not sampled, so their detailed wiring is intentionally limited.

Main entry points: [`routes/api.php`](https://github.com/jenothan/keysclub-backend/blob/main/routes/api.php) (API routes), [`app/Models/Booking.php`](https://github.com/jenothan/keysclub-backend/blob/main/app/Models/Booking.php) (Booking records), [`app/Http/Controllers/MembershipRequestController.php`](https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/MembershipRequestController.php) (Membership requests), [`app/Models/Court.php`](https://github.com/jenothan/keysclub-backend/blob/main/app/Models/Court.php) (Club records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["HTTP entry"]
  node_api["API routes<br/>[api.php]"]
  node_auth["Authentication<br/>[AuthController.php]"]
end

subgraph group_booking["Court booking"]
  node_availability["Availability lookup"]
  node_booking_ctl["Booking requests"]
  node_admin_booking["Booking administration"]
  node_blocked_dates["Blocked dates"]
  node_recurring_blocks["Recurring blocks"]
  node_court_ctl["Court management"]
end

subgraph group_club["Club operations"]
  node_membership["Membership requests"]
  node_otp["Booking OTP"]
  node_profile["Member profile"]
  node_phone["Phone updates"]
  node_inquiries["Club inquiries"]
  node_website["Website data"]
  node_dashboard["Admin dashboard"]
  node_admin_users["User administration"]
  node_admin_management["Club administration"]
end

subgraph group_support["Shared services"]
  node_booking_data["Booking records<br/>[Booking.php]"]
  node_membership_data["Membership records"]
  node_club_data["Club records<br/>[Court.php]"]
  node_db[("Application database<br/>[database.php]")]
  node_sms["SMS service<br/>[SmsService.php]"]
  node_cloudinary["File uploads"]
end

node_visitor(("Visitor / member"))
node_admin(("Club administrator"))
node_sms_provider["SMSlenz"]
node_cloudinary_provider["Cloudinary"]

node_visitor -->|"sends requests"| node_api
node_admin -->|"sends requests"| node_api
node_api -->|"dispatches auth"| node_auth
node_api -->|"dispatches lookup"| node_availability
node_api -->|"dispatches booking"| node_booking_ctl
node_api -->|"dispatches admin actions"| node_admin_booking
node_api -->|"dispatches date controls"| node_blocked_dates
node_api -->|"dispatches block controls"| node_recurring_blocks
node_api -->|"dispatches court actions"| node_court_ctl
node_api -->|"dispatches requests"| node_membership
node_api -->|"dispatches verification"| node_otp
node_api -->|"dispatches profile"| node_profile
node_api -->|"dispatches phone updates"| node_phone
node_api -->|"dispatches inquiries"| node_inquiries
node_api -->|"dispatches content"| node_website
node_api -->|"dispatches dashboard"| node_dashboard
node_api -->|"dispatches user actions"| node_admin_users
node_api -->|"dispatches management"| node_admin_management
node_availability -->|"queries"| node_booking_data
node_availability -->|"queries"| node_club_data
node_booking_ctl -->|"creates and checks"| node_booking_data
node_booking_ctl -->|"checks court"| node_club_data
node_booking_ctl -->|"sends messages"| node_sms
node_admin_booking -->|"updates bookings"| node_booking_data
node_admin_booking -->|"sends messages"| node_sms
node_blocked_dates -->|"manages blocks"| node_booking_data
node_recurring_blocks -->|"manages recurring blocks"| node_booking_data
node_court_ctl -->|"manages courts"| node_club_data
node_membership -->|"creates and reviews"| node_membership_data
node_membership -->|"sends messages"| node_sms
node_membership -->|"uploads proof"| node_cloudinary
node_membership -->|"updates membership"| node_club_data
node_otp -->|"sends codes"| node_sms
node_sms -->|"calls API"| node_sms_provider
node_cloudinary -->|"uploads assets"| node_cloudinary_provider
node_booking_data -->|"reads and writes"| node_db
node_membership_data -->|"reads and writes"| node_db
node_club_data -->|"reads and writes"| node_db

click node_api "https://github.com/jenothan/keysclub-backend/blob/main/routes/api.php"
click node_auth "https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/AuthController.php"
click node_availability "https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/AvailabilityController.php"
click node_booking_ctl "https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/BookingController.php"
click node_admin_booking "https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/AdminBookingController.php"
click node_blocked_dates "https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/AdminBlockedDateController.php"
click node_recurring_blocks "https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/RecurringBlockedSlotController.php"
click node_court_ctl "https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/CourtController.php"
click node_membership "https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/MembershipRequestController.php"
click node_otp "https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/BookingOtpController.php"
click node_profile "https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/ProfileController.php"
click node_phone "https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/PhoneUpdateController.php"
click node_inquiries "https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/InquiryController.php"
click node_website "https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/WebsiteDataController.php"
click node_dashboard "https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/AdminDashboardController.php"
click node_admin_users "https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/AdminUserController.php"
click node_admin_management "https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/AdminManagementController.php"
click node_booking_data "https://github.com/jenothan/keysclub-backend/blob/main/app/Models/Booking.php"
click node_membership_data "https://github.com/jenothan/keysclub-backend/blob/main/app/Models/MembershipRequest.php"
click node_club_data "https://github.com/jenothan/keysclub-backend/blob/main/app/Models/Court.php"
click node_db "https://github.com/jenothan/keysclub-backend/blob/main/config/database.php"
click node_sms "https://github.com/jenothan/keysclub-backend/blob/main/app/Services/SmsService.php"
click node_cloudinary "https://github.com/jenothan/keysclub-backend/blob/main/app/Services/CloudinaryService.php"

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_api,node_auth toneBlue
class node_availability,node_booking_ctl,node_admin_booking,node_blocked_dates,node_recurring_blocks,node_court_ctl toneAmber
class node_membership,node_otp,node_profile,node_phone,node_inquiries,node_website,node_dashboard,node_admin_users,node_admin_management toneMint
class node_booking_data,node_membership_data,node_club_data,node_db,node_sms,node_cloudinary toneRose
class node_visitor,node_admin,node_sms_provider,node_cloudinary_provider toneIndigo
```

## Components

### HTTP entry

- [API routes](https://github.com/jenothan/keysclub-backend/blob/main/routes/api.php): `routes/api.php`
- [Authentication](https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`

### Court booking

- [Availability lookup](https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/AvailabilityController.php): `app/Http/Controllers/AvailabilityController.php`
- [Booking requests](https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/BookingController.php): `app/Http/Controllers/BookingController.php`
- [Booking administration](https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/AdminBookingController.php): `app/Http/Controllers/AdminBookingController.php`
- [Blocked dates](https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/AdminBlockedDateController.php): `app/Http/Controllers/AdminBlockedDateController.php`
- [Recurring blocks](https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/RecurringBlockedSlotController.php): `app/Http/Controllers/RecurringBlockedSlotController.php`
- [Court management](https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/CourtController.php): `app/Http/Controllers/CourtController.php`

### Club operations

- [Membership requests](https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/MembershipRequestController.php): `app/Http/Controllers/MembershipRequestController.php`
- [Booking OTP](https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/BookingOtpController.php): `app/Http/Controllers/BookingOtpController.php`
- [Member profile](https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/ProfileController.php): `app/Http/Controllers/ProfileController.php`
- [Phone updates](https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/PhoneUpdateController.php): `app/Http/Controllers/PhoneUpdateController.php`
- [Club inquiries](https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/InquiryController.php): `app/Http/Controllers/InquiryController.php`
- [Website data](https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/WebsiteDataController.php): `app/Http/Controllers/WebsiteDataController.php`
- [Admin dashboard](https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/AdminDashboardController.php): `app/Http/Controllers/AdminDashboardController.php`
- [User administration](https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/AdminUserController.php): `app/Http/Controllers/AdminUserController.php`
- [Club administration](https://github.com/jenothan/keysclub-backend/blob/main/app/Http/Controllers/AdminManagementController.php): `app/Http/Controllers/AdminManagementController.php`

### Shared services

- [Booking records](https://github.com/jenothan/keysclub-backend/blob/main/app/Models/Booking.php): `app/Models/Booking.php`
- [Membership records](https://github.com/jenothan/keysclub-backend/blob/main/app/Models/MembershipRequest.php): `app/Models/MembershipRequest.php`
- [Club records](https://github.com/jenothan/keysclub-backend/blob/main/app/Models/Court.php): `app/Models/Court.php`
- [Application database](https://github.com/jenothan/keysclub-backend/blob/main/config/database.php): `config/database.php`
- [SMS service](https://github.com/jenothan/keysclub-backend/blob/main/app/Services/SmsService.php): `app/Services/SmsService.php`
- [File uploads](https://github.com/jenothan/keysclub-backend/blob/main/app/Services/CloudinaryService.php): `app/Services/CloudinaryService.php`

### Other components

- **Visitor / member**
- **Club administrator**
- **SMSlenz**
- **Cloudinary**

## Connections

- Visitor / member → API routes: sends requests
- Club administrator → API routes: sends requests
- API routes → Authentication: dispatches auth
- API routes → Availability lookup: dispatches lookup
- API routes → Booking requests: dispatches booking
- API routes → Booking administration: dispatches admin actions
- API routes → Blocked dates: dispatches date controls
- API routes → Recurring blocks: dispatches block controls
- API routes → Court management: dispatches court actions
- API routes → Membership requests: dispatches requests
- API routes → Booking OTP: dispatches verification
- API routes → Member profile: dispatches profile
- API routes → Phone updates: dispatches phone updates
- API routes → Club inquiries: dispatches inquiries
- API routes → Website data: dispatches content
- API routes → Admin dashboard: dispatches dashboard
- API routes → User administration: dispatches user actions
- API routes → Club administration: dispatches management
- Availability lookup → Booking records: queries
- Availability lookup → Club records: queries
- Booking requests → Booking records: creates and checks
- Booking requests → Club records: checks court
- Booking requests → SMS service: sends messages
- Booking administration → Booking records: updates bookings
- Booking administration → SMS service: sends messages
- Blocked dates → Booking records: manages blocks
- Recurring blocks → Booking records: manages recurring blocks
- Court management → Club records: manages courts
- Membership requests → Membership records: creates and reviews
- Membership requests → SMS service: sends messages
- Membership requests → File uploads: uploads proof
- Membership requests → Club records: updates membership
- Booking OTP → SMS service: sends codes
- SMS service → SMSlenz: calls API
- File uploads → Cloudinary: uploads assets
- Booking records → Application database: reads and writes
- Membership records → Application database: reads and writes
- Club records → Application database: reads and writes
