# wander-su/su-spaces architecture

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

- Interactive diagram: https://gitdiagram.com/wander-su/su-spaces
- Repository: https://github.com/wander-su/su-spaces

## Overview

SU-Spaces is a university room-booking and timetable-management application. Users enter through web routes to authenticate, browse rooms and submit bookings; staff also manage timetable data, while administrators review booking reports and manage users and campus resources. The graph reflects the controller/model interactions visible in sampled source and the major product areas indicated by the tree. Route wiring and several unsampled controllers are represented only at subsystem level; uncertain implementation links are omitted.

Main entry points: [`routes/web.php`](https://github.com/wander-su/su-spaces/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/BookingController.php`](https://github.com/wander-su/su-spaces/blob/main/app/Http/Controllers/BookingController.php) (Bookings), [`app/Http/Controllers/BaseBookingController.php`](https://github.com/wander-su/su-spaces/blob/main/app/Http/Controllers/BaseBookingController.php) (Timetable editing), [`app/Http/Controllers/ReportsController.php`](https://github.com/wander-su/su-spaces/blob/main/app/Http/Controllers/ReportsController.php) (Booking reports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry"]
  node_routes["Web routes<br/>[web.php]"]
  node_auth["Authentication"]
  node_registration["Registration"]
end

subgraph group_booking["Booking operations"]
  node_booking_controller["Bookings"]
  node_booking_views["Booking screens<br/>[view.blade.php]"]
  node_booking_model["Booking records<br/>[Booking.php]"]
end

subgraph group_campus["Campus scheduling"]
  node_base_controller["Timetable editing"]
  node_base_model["Base timetable<br/>[BaseBooking.php]"]
  node_timetable_view["Timetable screen<br/>[view.blade.php]"]
  node_timetable_file["Timetable CSV"]
  node_building_views["Building navigation"]
  node_building_controller["Campus resources"]
  node_building_model["Buildings and rooms<br/>[Building.php]"]
end

subgraph group_admin["Administration"]
  node_reports_controller["Booking reports"]
  node_reports_view["Reports dashboard"]
  node_user_controller["User management<br/>[UserController.php]"]
  node_user_views["User screens"]
end

node_user(("User"))
node_email["Mail service"]
node_database[("Application database")]

node_user -->|"requests pages"| node_routes
node_routes -->|"dispatches auth"| node_auth
node_routes -->|"dispatches signup"| node_registration
node_routes -->|"dispatches bookings"| node_booking_controller
node_routes -->|"dispatches timetable"| node_base_controller
node_routes -->|"dispatches resources"| node_building_controller
node_routes -->|"dispatches reports"| node_reports_controller
node_routes -->|"dispatches users"| node_user_controller
node_auth -->|"looks up users"| node_database
node_registration -->|"creates user"| node_database
node_registration -->|"sends token"| node_email
node_booking_controller -->|"queries bookings"| node_booking_model
node_booking_controller -->|"updates bookings"| node_database
node_booking_controller -->|"renders booking data"| node_booking_views
node_booking_controller -->|"sends void notices"| node_email
node_base_controller -->|"manages timetable"| node_base_model
node_base_controller -->|"reads CSV"| node_timetable_file
node_base_controller -->|"renders timetable"| node_timetable_view
node_building_controller -->|"queries buildings"| node_building_model
node_reports_controller -->|"queries bookings"| node_booking_model
node_reports_controller -->|"counts users"| node_database
node_reports_controller -->|"renders metrics"| node_reports_view
node_user_controller -->|"renders management"| node_user_views
node_user_controller -->|"manages users"| node_database

click node_routes "https://github.com/wander-su/su-spaces/blob/main/routes/web.php"
click node_auth "https://github.com/wander-su/su-spaces/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_registration "https://github.com/wander-su/su-spaces/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_booking_controller "https://github.com/wander-su/su-spaces/blob/main/app/Http/Controllers/BookingController.php"
click node_booking_views "https://github.com/wander-su/su-spaces/blob/main/resources/views/allBookings/view.blade.php"
click node_booking_model "https://github.com/wander-su/su-spaces/blob/main/app/Models/Booking.php"
click node_base_controller "https://github.com/wander-su/su-spaces/blob/main/app/Http/Controllers/BaseBookingController.php"
click node_base_model "https://github.com/wander-su/su-spaces/blob/main/app/Models/BaseBooking.php"
click node_timetable_view "https://github.com/wander-su/su-spaces/blob/main/resources/views/updateTimetable/view.blade.php"
click node_building_views "https://github.com/wander-su/su-spaces/blob/main/resources/views/components/building-navigation/%E2%9A%A1building-navigation.blade.php"
click node_building_controller "https://github.com/wander-su/su-spaces/blob/main/app/Http/Controllers/BuildingController.php"
click node_building_model "https://github.com/wander-su/su-spaces/blob/main/app/Models/Building.php"
click node_reports_controller "https://github.com/wander-su/su-spaces/blob/main/app/Http/Controllers/ReportsController.php"
click node_reports_view "https://github.com/wander-su/su-spaces/blob/main/resources/views/reports/dashboard.blade.php"
click node_user_controller "https://github.com/wander-su/su-spaces/blob/main/app/Http/Controllers/UserController.php"
click node_user_views "https://github.com/wander-su/su-spaces/blob/main/resources/views/components/user-management/%E2%9A%A1user-management.blade.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_routes,node_auth,node_registration,node_user toneBlue
class node_booking_controller,node_booking_views,node_booking_model,node_database toneAmber
class node_base_controller,node_base_model,node_timetable_view,node_timetable_file,node_building_views,node_building_controller,node_building_model toneMint
class node_reports_controller,node_reports_view,node_user_controller,node_user_views toneRose
class node_email toneIndigo
```

## Components

### Web entry

- [Web routes](https://github.com/wander-su/su-spaces/blob/main/routes/web.php): `routes/web.php`
- [Authentication](https://github.com/wander-su/su-spaces/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Registration](https://github.com/wander-su/su-spaces/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`

### Booking operations

- [Bookings](https://github.com/wander-su/su-spaces/blob/main/app/Http/Controllers/BookingController.php): `app/Http/Controllers/BookingController.php`
- [Booking screens](https://github.com/wander-su/su-spaces/blob/main/resources/views/allBookings/view.blade.php): `resources/views/allBookings/view.blade.php`
- [Booking records](https://github.com/wander-su/su-spaces/blob/main/app/Models/Booking.php): `app/Models/Booking.php`

### Campus scheduling

- [Timetable editing](https://github.com/wander-su/su-spaces/blob/main/app/Http/Controllers/BaseBookingController.php): `app/Http/Controllers/BaseBookingController.php`
- [Base timetable](https://github.com/wander-su/su-spaces/blob/main/app/Models/BaseBooking.php): `app/Models/BaseBooking.php`
- [Timetable screen](https://github.com/wander-su/su-spaces/blob/main/resources/views/updateTimetable/view.blade.php): `resources/views/updateTimetable/view.blade.php`
- **Timetable CSV**
- [Building navigation](https://github.com/wander-su/su-spaces/blob/main/resources/views/components/building-navigation/%E2%9A%A1building-navigation.blade.php): `resources/views/components/building-navigation/⚡building-navigation.blade.php`
- [Campus resources](https://github.com/wander-su/su-spaces/blob/main/app/Http/Controllers/BuildingController.php): `app/Http/Controllers/BuildingController.php`
- [Buildings and rooms](https://github.com/wander-su/su-spaces/blob/main/app/Models/Building.php): `app/Models/Building.php`

### Administration

- [Booking reports](https://github.com/wander-su/su-spaces/blob/main/app/Http/Controllers/ReportsController.php): `app/Http/Controllers/ReportsController.php`
- [Reports dashboard](https://github.com/wander-su/su-spaces/blob/main/resources/views/reports/dashboard.blade.php): `resources/views/reports/dashboard.blade.php`
- [User management](https://github.com/wander-su/su-spaces/blob/main/app/Http/Controllers/UserController.php): `app/Http/Controllers/UserController.php`
- [User screens](https://github.com/wander-su/su-spaces/blob/main/resources/views/components/user-management/%E2%9A%A1user-management.blade.php): `resources/views/components/user-management/⚡user-management.blade.php`

### Other components

- **User**
- **Mail service**
- **Application database**

## Connections

- User → Web routes: requests pages
- Web routes → Authentication: dispatches auth
- Web routes → Registration: dispatches signup
- Web routes → Bookings: dispatches bookings
- Web routes → Timetable editing: dispatches timetable
- Web routes → Campus resources: dispatches resources
- Web routes → Booking reports: dispatches reports
- Web routes → User management: dispatches users
- Authentication → Application database: looks up users
- Registration → Application database: creates user
- Registration → Mail service: sends token
- Bookings → Booking records: queries bookings
- Bookings → Application database: updates bookings
- Bookings → Booking screens: renders booking data
- Bookings → Mail service: sends void notices
- Timetable editing → Base timetable: manages timetable
- Timetable editing → Timetable CSV: reads CSV
- Timetable editing → Timetable screen: renders timetable
- Campus resources → Buildings and rooms: queries buildings
- Booking reports → Booking records: queries bookings
- Booking reports → Application database: counts users
- Booking reports → Reports dashboard: renders metrics
- User management → User screens: renders management
- User management → Application database: manages users
