# cateeejah/wbt-summer-25-26-project-tour-ms architecture

> Architecture diagram of the GitHub repository cateeejah/wbt-summer-25-26-project-tour-ms, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cateeejah/wbt-summer-25-26-project-tour-ms
- Repository: https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms

## Overview

TourMS is a role-based tour marketplace for travelers, guides, vendors, and administrators. A traveler registers and awaits verification, then explores listings and guide-created tours, submits tour requests, books listings or tours, and can later rate guides or listings. Guides manage offerings and availability, claim and complete tours; vendors manage listings and respond to special requests. Administrators verify accounts and manage users, notifications, and discounts. The sampled source shows these dispatch and model interactions; some subsystem details are inferred only from the repository tree and README capabilities.

Main entry points: [`index.php`](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/index.php) (Request router), [`database.sql`](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/database.sql) (TourMS database), [`app/controllers/AdminController.php`](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/AdminController.php) (Administration), [`app/controllers/TourController.php`](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/TourController.php) (Explore and bookings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_index["Request router<br/>[index.php]"]
  node_database_config["Database connection<br/>[database.php]"]
end

subgraph group_identity["Access and governance"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_home["Home and verification<br/>[HomeController.php]"]
  node_admin["Administration"]
  node_notify_controller["Notification inbox"]
end

subgraph group_market["Marketplace workflows"]
  node_user_tours["Explore and bookings<br/>[TourController.php]"]
  node_guide["Guide operations"]
  node_vendor["Vendor operations"]
  node_ajax["Live search endpoints<br/>[AjaxController.php]"]
end

subgraph group_presentation["User interface"]
  node_home_view["Welcome page<br/>[index.php]"]
  node_auth_views["Sign-in and registration<br/>[login.php]"]
  node_user_views["Traveler pages<br/>[explore.php]"]
  node_guide_view["Guide dashboard<br/>[dashboard.php]"]
  node_vendor_view["Vendor dashboard"]
  node_admin_view["Admin pages<br/>[dashboard.php]"]
  node_notification_view["Notification inbox<br/>[inbox.php]"]
end

subgraph group_persistence["Persistence"]
  node_users["Accounts and roles<br/>[User.php]"]
  node_admin_model["Admin operations<br/>[AdminModel.php]"]
  node_notification_model["Notifications<br/>[Notification.php]"]
  node_tour_model["Tours and bookings<br/>[Tour.php]"]
  node_guide_model["Guide profiles<br/>[Guide.php]"]
  node_vendor_model["Vendor listings<br/>[Vendor.php]"]
  node_store[("TourMS database<br/>[database.sql]")]
end

node_visitor(("Visitor or member"))

node_visitor -->|"requests pages"| node_index
node_index -->|"opens connection"| node_database_config
node_index -->|"dispatches auth"| node_auth
node_index -->|"dispatches home"| node_home
node_index -->|"dispatches admin"| node_admin
node_index -->|"dispatches traveler"| node_user_tours
node_index -->|"dispatches guide"| node_guide
node_index -->|"dispatches vendor"| node_vendor
node_index -->|"dispatches inbox"| node_notify_controller
node_index -->|"dispatches search"| node_ajax
node_auth -->|"authenticates accounts"| node_users
node_auth -->|"renders forms"| node_auth_views
node_home -->|"renders welcome"| node_home_view
node_admin -->|"manages platform"| node_admin_model
node_admin -->|"manages accounts"| node_users
node_admin -->|"creates notifications"| node_notification_model
node_admin -->|"renders admin pages"| node_admin_view
node_notify_controller -->|"loads notifications"| node_notification_model
node_notify_controller -->|"renders inbox"| node_notification_view
node_user_tours -->|"browses and books"| node_tour_model
node_user_tours -->|"loads vendors"| node_vendor_model
node_user_tours -->|"renders traveler pages"| node_user_views
node_guide -->|"manages guide profile"| node_guide_model
node_guide -->|"manages tours"| node_tour_model
node_guide -->|"renders dashboard"| node_guide_view
node_vendor -->|"manages listings"| node_vendor_model
node_vendor -->|"notifies requesters"| node_notification_model
node_vendor -->|"renders dashboard"| node_vendor_view
node_ajax -->|"searches users"| node_users
node_ajax -->|"searches listings"| node_vendor_model
node_ajax -->|"searches available listings"| node_tour_model
node_users -->|"reads and writes"| node_store
node_admin_model -->|"reads and writes"| node_store
node_notification_model -->|"reads and writes"| node_store
node_tour_model -->|"reads and writes"| node_store
node_guide_model -->|"reads and writes"| node_store
node_vendor_model -->|"reads and writes"| node_store

click node_index "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/index.php"
click node_database_config "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/config/database.php"
click node_auth "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/AuthController.php"
click node_users "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/models/User.php"
click node_home "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/HomeController.php"
click node_admin "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/AdminController.php"
click node_admin_model "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/models/AdminModel.php"
click node_notify_controller "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/NotificationController.php"
click node_notification_model "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/models/Notification.php"
click node_user_tours "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/TourController.php"
click node_tour_model "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/models/Tour.php"
click node_guide "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/GuideController.php"
click node_guide_model "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/models/Guide.php"
click node_vendor "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/VendorController.php"
click node_vendor_model "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/models/Vendor.php"
click node_ajax "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/AjaxController.php"
click node_home_view "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/views/home/index.php"
click node_auth_views "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/views/auth/login.php"
click node_user_views "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/views/user/explore.php"
click node_guide_view "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/views/guide/dashboard.php"
click node_admin_view "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/views/admin/dashboard.php"
click node_notification_view "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/views/notifications/inbox.php"
click node_store "https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/database.sql"

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_index,node_database_config toneBlue
class node_auth,node_home,node_admin,node_notify_controller toneAmber
class node_user_tours,node_guide,node_vendor,node_ajax toneMint
class node_home_view,node_auth_views,node_user_views,node_guide_view,node_vendor_view,node_admin_view,node_notification_view toneRose
class node_users,node_admin_model,node_notification_model,node_tour_model,node_guide_model,node_vendor_model,node_store,node_visitor toneIndigo
```

## Components

### Application entry

- [Request router](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/index.php): `index.php`
- [Database connection](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/config/database.php): `config/database.php`

### Access and governance

- [Authentication](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/AuthController.php): `app/controllers/AuthController.php`
- [Home and verification](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/HomeController.php): `app/controllers/HomeController.php`
- [Administration](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/AdminController.php): `app/controllers/AdminController.php`
- [Notification inbox](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/NotificationController.php): `app/controllers/NotificationController.php`

### Marketplace workflows

- [Explore and bookings](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/TourController.php): `app/controllers/TourController.php`
- [Guide operations](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/GuideController.php): `app/controllers/GuideController.php`
- [Vendor operations](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/VendorController.php): `app/controllers/VendorController.php`
- [Live search endpoints](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/controllers/AjaxController.php): `app/controllers/AjaxController.php`

### User interface

- [Welcome page](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/views/home/index.php): `app/views/home/index.php`
- [Sign-in and registration](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/views/auth/login.php): `app/views/auth/login.php`
- [Traveler pages](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/views/user/explore.php): `app/views/user/explore.php`
- [Guide dashboard](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/views/guide/dashboard.php): `app/views/guide/dashboard.php`
- **Vendor dashboard**
- [Admin pages](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/views/admin/dashboard.php): `app/views/admin/dashboard.php`
- [Notification inbox](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/views/notifications/inbox.php): `app/views/notifications/inbox.php`

### Persistence

- [Accounts and roles](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/models/User.php): `app/models/User.php`
- [Admin operations](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/models/AdminModel.php): `app/models/AdminModel.php`
- [Notifications](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/models/Notification.php): `app/models/Notification.php`
- [Tours and bookings](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/models/Tour.php): `app/models/Tour.php`
- [Guide profiles](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/models/Guide.php): `app/models/Guide.php`
- [Vendor listings](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/app/models/Vendor.php): `app/models/Vendor.php`
- [TourMS database](https://github.com/cateeejah/wbt-summer-25-26-project-tour-ms/blob/main/database.sql): `database.sql`

### Other components

- **Visitor or member**

## Connections

- Visitor or member → Request router: requests pages
- Request router → Database connection: opens connection
- Request router → Authentication: dispatches auth
- Request router → Home and verification: dispatches home
- Request router → Administration: dispatches admin
- Request router → Explore and bookings: dispatches traveler
- Request router → Guide operations: dispatches guide
- Request router → Vendor operations: dispatches vendor
- Request router → Notification inbox: dispatches inbox
- Request router → Live search endpoints: dispatches search
- Authentication → Accounts and roles: authenticates accounts
- Authentication → Sign-in and registration: renders forms
- Home and verification → Welcome page: renders welcome
- Administration → Admin operations: manages platform
- Administration → Accounts and roles: manages accounts
- Administration → Notifications: creates notifications
- Administration → Admin pages: renders admin pages
- Notification inbox → Notifications: loads notifications
- Notification inbox → Notification inbox: renders inbox
- Explore and bookings → Tours and bookings: browses and books
- Explore and bookings → Vendor listings: loads vendors
- Explore and bookings → Traveler pages: renders traveler pages
- Guide operations → Guide profiles: manages guide profile
- Guide operations → Tours and bookings: manages tours
- Guide operations → Guide dashboard: renders dashboard
- Vendor operations → Vendor listings: manages listings
- Vendor operations → Notifications: notifies requesters
- Vendor operations → Vendor dashboard: renders dashboard
- Live search endpoints → Accounts and roles: searches users
- Live search endpoints → Vendor listings: searches listings
- Live search endpoints → Tours and bookings: searches available listings
- Accounts and roles → TourMS database: reads and writes
- Admin operations → TourMS database: reads and writes
- Notifications → TourMS database: reads and writes
- Tours and bookings → TourMS database: reads and writes
- Guide profiles → TourMS database: reads and writes
- Vendor listings → TourMS database: reads and writes
