# webenred/agency-project architecture

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

- Interactive diagram: https://gitdiagram.com/webenred/agency-project
- Repository: https://github.com/webenred/agency-project

## Overview

Agency mini project is a Laravel application with hotel administration and account workflows; its models also indicate booking and trip domains. The visible workflow is request routing into controllers, which validate user or hotel data, update models, and return views or API responses. Registration emits an event that the configured listener uses for email verification. Booking and trip components are included as model-backed domain areas, but their behavior and connections are not shown in the sampled source.

Main entry points: [`app/Providers/RouteServiceProvider.php`](https://github.com/webenred/agency-project/blob/master/app/Providers/RouteServiceProvider.php) (Route registration), [`app/Http/Controllers/Auth/RegisteredUserController.php`](https://github.com/webenred/agency-project/blob/master/app/Http/Controllers/Auth/RegisteredUserController.php) (User registration), [`app/Events/RegistrationEvent.php`](https://github.com/webenred/agency-project/blob/master/app/Events/RegistrationEvent.php) (Registration event), [`app/Providers/EventServiceProvider.php`](https://github.com/webenred/agency-project/blob/master/app/Providers/EventServiceProvider.php) (Event wiring)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_front["HTTP entry<br/>[index.php]"]
  node_bootstrap["App bootstrap<br/>[app.php]"]
  node_httpkernel["HTTP kernel<br/>[Kernel.php]"]
  node_routes["Route registration"]
  node_authroutes["Auth routes<br/>[auth.php]"]
  node_webapi["Web and API routes<br/>[web.php]"]
end

subgraph group_accounts["Accounts and verification"]
  node_registration["User registration"]
  node_user[("User account<br/>[User.php]")]
  node_registrationevent["Registration event"]
  node_eventconfig["Event wiring"]
  node_verificationlistener["Verification listener"]
  node_verification["Email verification"]
  node_verificationmail["Verification mail"]
  node_apiaccount["API authentication<br/>[AuthController.php]"]
end

subgraph group_agency["Agency operations"]
  node_hoteladmin["Hotel administration"]
  node_hotel[("Hotel records<br/>[Hotel.php]")]
  node_hotelviews["Hotel admin views"]
end

subgraph group_domain["Travel domain"]
  node_booking[("Booking records<br/>[Booking.php]")]
  node_trips[("Trip records<br/>[Trip.php]")]
end

node_visitor(("Visitor"))

node_visitor -->|"sends request"| node_front
node_front -->|"loads app"| node_bootstrap
node_bootstrap -->|"binds kernel"| node_httpkernel
node_httpkernel -.->|"handles requests"| node_routes
node_routes -->|"registers routes"| node_authroutes
node_routes -->|"registers routes"| node_webapi
node_authroutes -->|"routes registration"| node_registration
node_registration -->|"creates account"| node_user
node_registration -->|"dispatches event"| node_registrationevent
node_eventconfig -->|"registers event"| node_registrationevent
node_eventconfig -->|"registers listener"| node_verificationlistener
node_verificationlistener -->|"sends notification"| node_verification
node_verification -->|"builds mail"| node_verificationmail
node_apiaccount -->|"authenticates user"| node_user
node_apiaccount -->|"dispatches event"| node_registrationevent
node_hoteladmin -->|"creates and updates"| node_hotel
node_hoteladmin -->|"renders view"| node_hotelviews

click node_front "https://github.com/webenred/agency-project/blob/master/public/index.php"
click node_bootstrap "https://github.com/webenred/agency-project/blob/master/bootstrap/app.php"
click node_httpkernel "https://github.com/webenred/agency-project/blob/master/app/Http/Kernel.php"
click node_routes "https://github.com/webenred/agency-project/blob/master/app/Providers/RouteServiceProvider.php"
click node_authroutes "https://github.com/webenred/agency-project/blob/master/routes/auth.php"
click node_webapi "https://github.com/webenred/agency-project/blob/master/routes/web.php"
click node_registration "https://github.com/webenred/agency-project/blob/master/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_user "https://github.com/webenred/agency-project/blob/master/app/Models/User.php"
click node_registrationevent "https://github.com/webenred/agency-project/blob/master/app/Events/RegistrationEvent.php"
click node_eventconfig "https://github.com/webenred/agency-project/blob/master/app/Providers/EventServiceProvider.php"
click node_verificationlistener "https://github.com/webenred/agency-project/blob/master/app/Listeners/SendEmailVerificationNotif.php"
click node_verification "https://github.com/webenred/agency-project/blob/master/app/Notifications/VerifyEmailNotification.php"
click node_verificationmail "https://github.com/webenred/agency-project/blob/master/app/Mail/VerificationMail.php"
click node_apiaccount "https://github.com/webenred/agency-project/blob/master/app/Http/Controllers/Api/AuthController.php"
click node_hoteladmin "https://github.com/webenred/agency-project/blob/master/app/Http/Controllers/Admin/HotelController.php"
click node_hotel "https://github.com/webenred/agency-project/blob/master/app/Models/Hotel.php"
click node_hotelviews "https://github.com/webenred/agency-project/blob/master/resources/views/admin/manage-hotels.blade.php"
click node_booking "https://github.com/webenred/agency-project/blob/master/app/Models/Booking.php"
click node_trips "https://github.com/webenred/agency-project/blob/master/app/Models/Trip.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_front,node_bootstrap,node_httpkernel,node_routes,node_authroutes,node_webapi toneBlue
class node_registration,node_user,node_registrationevent,node_eventconfig,node_verificationlistener,node_verification,node_verificationmail,node_apiaccount toneAmber
class node_hoteladmin,node_hotel,node_hotelviews toneMint
class node_booking,node_trips toneRose
class node_visitor toneIndigo
```

## Components

### Application entry

- [HTTP entry](https://github.com/webenred/agency-project/blob/master/public/index.php): `public/index.php`
- [App bootstrap](https://github.com/webenred/agency-project/blob/master/bootstrap/app.php): `bootstrap/app.php`
- [HTTP kernel](https://github.com/webenred/agency-project/blob/master/app/Http/Kernel.php): `app/Http/Kernel.php`
- [Route registration](https://github.com/webenred/agency-project/blob/master/app/Providers/RouteServiceProvider.php): `app/Providers/RouteServiceProvider.php`
- [Auth routes](https://github.com/webenred/agency-project/blob/master/routes/auth.php): `routes/auth.php`
- [Web and API routes](https://github.com/webenred/agency-project/blob/master/routes/web.php): `routes/web.php`

### Accounts and verification

- [User registration](https://github.com/webenred/agency-project/blob/master/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`
- [User account](https://github.com/webenred/agency-project/blob/master/app/Models/User.php): `app/Models/User.php`
- [Registration event](https://github.com/webenred/agency-project/blob/master/app/Events/RegistrationEvent.php): `app/Events/RegistrationEvent.php`
- [Event wiring](https://github.com/webenred/agency-project/blob/master/app/Providers/EventServiceProvider.php): `app/Providers/EventServiceProvider.php`
- [Verification listener](https://github.com/webenred/agency-project/blob/master/app/Listeners/SendEmailVerificationNotif.php): `app/Listeners/SendEmailVerificationNotif.php`
- [Email verification](https://github.com/webenred/agency-project/blob/master/app/Notifications/VerifyEmailNotification.php): `app/Notifications/VerifyEmailNotification.php`
- [Verification mail](https://github.com/webenred/agency-project/blob/master/app/Mail/VerificationMail.php): `app/Mail/VerificationMail.php`
- [API authentication](https://github.com/webenred/agency-project/blob/master/app/Http/Controllers/Api/AuthController.php): `app/Http/Controllers/Api/AuthController.php`

### Agency operations

- [Hotel administration](https://github.com/webenred/agency-project/blob/master/app/Http/Controllers/Admin/HotelController.php): `app/Http/Controllers/Admin/HotelController.php`
- [Hotel records](https://github.com/webenred/agency-project/blob/master/app/Models/Hotel.php): `app/Models/Hotel.php`
- [Hotel admin views](https://github.com/webenred/agency-project/blob/master/resources/views/admin/manage-hotels.blade.php): `resources/views/admin/manage-hotels.blade.php`

### Travel domain

- [Booking records](https://github.com/webenred/agency-project/blob/master/app/Models/Booking.php): `app/Models/Booking.php`
- [Trip records](https://github.com/webenred/agency-project/blob/master/app/Models/Trip.php): `app/Models/Trip.php`

### Other components

- **Visitor**

## Connections

- Visitor → HTTP entry: sends request (evidence: `public/index.php`)
- HTTP entry → App bootstrap: loads app (evidence: `public/index.php`)
- App bootstrap → HTTP kernel: binds kernel (evidence: `bootstrap/app.php`)
- HTTP kernel → Route registration: handles requests
- Route registration → Auth routes: registers routes (evidence: `app/Providers/RouteServiceProvider.php`)
- Route registration → Web and API routes: registers routes (evidence: `app/Providers/RouteServiceProvider.php`)
- Auth routes → User registration: routes registration (evidence: `routes/auth.php`)
- User registration → User account: creates account (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- User registration → Registration event: dispatches event (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Event wiring → Registration event: registers event (evidence: `app/Providers/EventServiceProvider.php`)
- Event wiring → Verification listener: registers listener (evidence: `app/Providers/EventServiceProvider.php`)
- Verification listener → Email verification: sends notification (evidence: `app/Listeners/SendEmailVerificationNotif.php`)
- Email verification → Verification mail: builds mail (evidence: `app/Notifications/VerifyEmailNotification.php`)
- API authentication → User account: authenticates user (evidence: `app/Http/Controllers/Api/AuthController.php`)
- API authentication → Registration event: dispatches event (evidence: `app/Http/Controllers/Api/AuthController.php`)
- Hotel administration → Hotel records: creates and updates (evidence: `app/Http/Controllers/Admin/HotelController.php`)
- Hotel administration → Hotel admin views: renders view (evidence: `app/Http/Controllers/Admin/HotelController.php`)
