# joyandocoderelatedemail-ux/amega architecture

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

- Interactive diagram: https://gitdiagram.com/joyandocoderelatedemail-ux/amega
- Repository: https://github.com/joyandocoderelatedemail-ux/amega

## Overview

This Laravel application appears to support a travel-services business, with public travel inquiries and several staff-operated client desks. A typical desk workflow is staff entry, application or booking management, document and payment tracking, then client updates. The tree also shows administration, CRM, client accounts, chat, and reporting. Edges are limited to relationships shown in the supplied excerpts or SOURCE INDEX; the route file was not sampled, so entry-point links are marked unverified rather than asserting route wiring.

Main entry points: [`app/Http/Controllers/Ticketing/TicketBookingController.php`](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/Ticketing/TicketBookingController.php) (Ticketing desk), [`app/Services/DepartmentReportService.php`](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Services/DepartmentReportService.php) (Department reports), [`app/Http/Controllers/VisaAssistance/VisaApplicationController.php`](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/VisaAssistance/VisaApplicationController.php) (Visa assistance), [`app/Models/TicketBooking.php`](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/TicketBooking.php) (Ticket bookings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public travel services"]
  node_public_site["Public pages<br/>[PageController.php]"]
  node_travel_packages["Travel packages"]
  node_booking["Travel booking"]
  node_package_inquiry[("Custom inquiries")]
end

subgraph group_ops["Staff operations"]
  node_admin["Administration"]
  node_crm["CRM"]
  node_crm_lead[("CRM leads<br/>[CrmLead.php]")]
  node_reports["Department reports"]
  node_chat["Guest chat"]
end

subgraph group_desks["Client service desks"]
  node_ticketing["Ticketing desk"]
  node_ticket_record[("Ticket bookings<br/>[TicketBooking.php]")]
  node_passengers[("Passengers")]
  node_visa["Visa assistance"]
  node_visa_record[("Visa applications")]
  node_srrv["SRRV desk"]
  node_srrv_record[("SRRV applications")]
  node_immigration[("Immigration sheets")]
end

subgraph group_shared["Shared services"]
  node_client["Client accounts"]
  node_user_record[("User profiles<br/>[User.php]")]
  node_documents["Private documents"]
  node_activity["Activity logging<br/>[ActivityLogger.php]"]
  node_notifier["Client notifications<br/>[ClientNotifier.php]"]
  node_payment_notice["Payment notice"]
  node_own_scope["Desk file scope<br/>[OwnFilesScope.php]"]
end

node_traveler(("Traveler"))
node_staff(("Staff"))

node_traveler -.->|"browses"| node_public_site
node_traveler -.->|"explores"| node_travel_packages
node_traveler -.->|"requests booking"| node_booking
node_traveler -.->|"starts chat"| node_chat
node_staff -.->|"manages"| node_admin
node_staff -.->|"handles tickets"| node_ticketing
node_staff -.->|"handles visas"| node_visa
node_staff -.->|"handles SRRV"| node_srrv
node_booking -.->|"records inquiry"| node_package_inquiry
node_crm -->|"manages leads"| node_crm_lead
node_ticketing -->|"creates bookings"| node_ticket_record
node_ticket_record -->|"has passengers"| node_passengers
node_ticketing -->|"links client"| node_client
node_ticketing -->|"sends updates"| node_notifier
node_ticketing -->|"notifies payment"| node_payment_notice
node_visa -->|"manages applications"| node_visa_record
node_visa -->|"stores documents"| node_documents
node_visa -->|"sends stage updates"| node_notifier
node_srrv -->|"manages applications"| node_srrv_record
node_srrv -->|"links client"| node_client
node_client -->|"creates accounts"| node_user_record
node_user_record -->|"uses private disk"| node_documents
node_ticket_record -->|"scoped by"| node_own_scope
node_visa_record -->|"scoped by"| node_own_scope
node_srrv_record -->|"scoped by"| node_own_scope
node_reports -->|"queries"| node_ticket_record
node_reports -->|"queries"| node_visa_record
node_reports -->|"queries"| node_srrv_record
node_reports -->|"queries"| node_immigration

click node_public_site "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/PageController.php"
click node_travel_packages "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/TravelPackageController.php"
click node_booking "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/BookingController.php"
click node_package_inquiry "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/CustomPackageInquiry.php"
click node_admin "https://github.com/joyandocoderelatedemail-ux/amega/tree/main/app/Http/Controllers/Admin"
click node_crm "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/Admin/AdminCrmController.php"
click node_crm_lead "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/CrmLead.php"
click node_reports "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Services/DepartmentReportService.php"
click node_ticketing "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/Ticketing/TicketBookingController.php"
click node_ticket_record "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/TicketBooking.php"
click node_passengers "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/TicketPassenger.php"
click node_visa "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/VisaAssistance/VisaApplicationController.php"
click node_visa_record "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/VisaApplication.php"
click node_srrv "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/Srrv/SrrvApplicationController.php"
click node_srrv_record "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/SrrvApplication.php"
click node_immigration "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/ImmigrationClient.php"
click node_client "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Services/ClientAccountService.php"
click node_user_record "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/User.php"
click node_documents "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Support/DocumentStorage.php"
click node_activity "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Services/ActivityLogger.php"
click node_notifier "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Services/ClientNotifier.php"
click node_payment_notice "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Notifications/PaymentReceivedNotification.php"
click node_own_scope "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/Scopes/OwnFilesScope.php"
click node_chat "https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/GuestChatController.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_public_site,node_travel_packages,node_booking,node_package_inquiry toneBlue
class node_admin,node_crm,node_crm_lead,node_reports,node_chat toneAmber
class node_ticketing,node_ticket_record,node_passengers,node_visa,node_visa_record,node_srrv,node_srrv_record,node_immigration toneMint
class node_client,node_user_record,node_documents,node_activity,node_notifier,node_payment_notice,node_own_scope toneRose
class node_traveler,node_staff toneIndigo
```

## Components

### Public travel services

- [Public pages](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/PageController.php): `app/Http/Controllers/PageController.php`
- [Travel packages](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/TravelPackageController.php): `app/Http/Controllers/TravelPackageController.php`
- [Travel booking](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/BookingController.php): `app/Http/Controllers/BookingController.php`
- [Custom inquiries](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/CustomPackageInquiry.php): `app/Models/CustomPackageInquiry.php`

### Staff operations

- [Administration](https://github.com/joyandocoderelatedemail-ux/amega/tree/main/app/Http/Controllers/Admin): `app/Http/Controllers/Admin`
- [CRM](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/Admin/AdminCrmController.php): `app/Http/Controllers/Admin/AdminCrmController.php`
- [CRM leads](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/CrmLead.php): `app/Models/CrmLead.php`
- [Department reports](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Services/DepartmentReportService.php): `app/Services/DepartmentReportService.php`
- [Guest chat](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/GuestChatController.php): `app/Http/Controllers/GuestChatController.php`

### Client service desks

- [Ticketing desk](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/Ticketing/TicketBookingController.php): `app/Http/Controllers/Ticketing/TicketBookingController.php`
- [Ticket bookings](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/TicketBooking.php): `app/Models/TicketBooking.php`
- [Passengers](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/TicketPassenger.php): `app/Models/TicketPassenger.php`
- [Visa assistance](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/VisaAssistance/VisaApplicationController.php): `app/Http/Controllers/VisaAssistance/VisaApplicationController.php`
- [Visa applications](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/VisaApplication.php): `app/Models/VisaApplication.php`
- [SRRV desk](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Http/Controllers/Srrv/SrrvApplicationController.php): `app/Http/Controllers/Srrv/SrrvApplicationController.php`
- [SRRV applications](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/SrrvApplication.php): `app/Models/SrrvApplication.php`
- [Immigration sheets](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/ImmigrationClient.php): `app/Models/ImmigrationClient.php`

### Shared services

- [Client accounts](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Services/ClientAccountService.php): `app/Services/ClientAccountService.php`
- [User profiles](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/User.php): `app/Models/User.php`
- [Private documents](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Support/DocumentStorage.php): `app/Support/DocumentStorage.php`
- [Activity logging](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Services/ActivityLogger.php): `app/Services/ActivityLogger.php`
- [Client notifications](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Services/ClientNotifier.php): `app/Services/ClientNotifier.php`
- [Payment notice](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Notifications/PaymentReceivedNotification.php): `app/Notifications/PaymentReceivedNotification.php`
- [Desk file scope](https://github.com/joyandocoderelatedemail-ux/amega/blob/main/app/Models/Scopes/OwnFilesScope.php): `app/Models/Scopes/OwnFilesScope.php`

### Other components

- **Traveler**
- **Staff**

## Connections

- Traveler → Public pages: browses
- Traveler → Travel packages: explores
- Traveler → Travel booking: requests booking
- Traveler → Guest chat: starts chat
- Staff → Administration: manages
- Staff → Ticketing desk: handles tickets
- Staff → Visa assistance: handles visas
- Staff → SRRV desk: handles SRRV
- Travel booking → Custom inquiries: records inquiry
- CRM → CRM leads: manages leads (evidence: `app/Http/Controllers/Admin/AdminCrmController.php`)
- Ticketing desk → Ticket bookings: creates bookings (evidence: `app/Http/Controllers/Ticketing/TicketBookingController.php`)
- Ticket bookings → Passengers: has passengers (evidence: `app/Models/TicketBooking.php`)
- Ticketing desk → Client accounts: links client (evidence: `app/Http/Controllers/Ticketing/TicketBookingController.php`)
- Ticketing desk → Client notifications: sends updates (evidence: `app/Http/Controllers/Ticketing/TicketBookingController.php`)
- Ticketing desk → Payment notice: notifies payment (evidence: `app/Http/Controllers/Ticketing/TicketBookingController.php`)
- Visa assistance → Visa applications: manages applications (evidence: `app/Http/Controllers/VisaAssistance/VisaApplicationController.php`)
- Visa assistance → Private documents: stores documents (evidence: `app/Http/Controllers/VisaAssistance/VisaApplicationController.php`)
- Visa assistance → Client notifications: sends stage updates (evidence: `app/Http/Controllers/VisaAssistance/VisaApplicationController.php`)
- SRRV desk → SRRV applications: manages applications (evidence: `app/Http/Controllers/Srrv/SrrvApplicationController.php`)
- SRRV desk → Client accounts: links client (evidence: `app/Http/Controllers/Srrv/SrrvApplicationController.php`)
- Client accounts → User profiles: creates accounts (evidence: `app/Services/ClientAccountService.php`)
- User profiles → Private documents: uses private disk (evidence: `app/Models/User.php`)
- Ticket bookings → Desk file scope: scoped by (evidence: `app/Models/TicketBooking.php`)
- Visa applications → Desk file scope: scoped by (evidence: `app/Models/VisaApplication.php`)
- SRRV applications → Desk file scope: scoped by (evidence: `app/Models/SrrvApplication.php`)
- Department reports → Ticket bookings: queries (evidence: `app/Services/DepartmentReportService.php`)
- Department reports → Visa applications: queries (evidence: `app/Services/DepartmentReportService.php`)
- Department reports → SRRV applications: queries (evidence: `app/Services/DepartmentReportService.php`)
- Department reports → Immigration sheets: queries (evidence: `app/Services/DepartmentReportService.php`)
