# artesia0528/booking-villa-laravel-inertia architecture

> Architecture diagram of the GitHub repository artesia0528/booking-villa-laravel-inertia, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/artesia0528/booking-villa-laravel-inertia
- Repository: https://github.com/artesia0528/booking-villa-laravel-inertia

## Overview

This Laravel application supports a villa-rental website and booking operations, with a Filament admin panel for managing inventory and content. The visible public flow validates stay details, then serves availability and price quotes; booking creation and lifecycle actions exist in the tree, but their wiring was not shown. The graph also preserves public-site content, admin management and reporting, and authentication. Edges are limited to relationships evidenced by excerpts or the source index; unsampled workflows are not asserted.

Main entry points: [`app/Http/Controllers/VillaBookingController.php`](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Http/Controllers/VillaBookingController.php) (Stay endpoints), [`app/Actions/PublicHomeData.php`](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Actions/PublicHomeData.php) (Home data), [`app/Actions/AvailabilityQuery.php`](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Actions/AvailabilityQuery.php) (Availability query), [`app/Filament/Resources`](https://github.com/artesia0528/booking-villa-laravel-inertia/tree/main/app/Filament/Resources) (Management resources)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public experience"]
  node_public_home["Home data<br/>[PublicHomeData.php]"]
  node_home_controller["Home controller<br/>[HomeController.php]"]
  node_public_resources["Public resources"]
  node_site_content[("Site content<br/>[PageSection.php]")]
  node_settings[("Site settings<br/>[Setting.php]")]
  node_content_cache["Content cache<br/>[ContentCache.php]"]
end

subgraph group_booking["Booking operations"]
  node_booking_controller["Stay endpoints"]
  node_stay_request["Stay validation"]
  node_availability["Availability query"]
  node_pricing["Price calculator"]
  node_booking_actions["Booking lifecycle"]
  node_booking_model[("Bookings<br/>[Booking.php]")]
  node_unit_model[("Rental units<br/>[Unit.php]")]
end

subgraph group_admin["Administration"]
  node_admin_panel["Admin panel"]
  node_admin_resources["Management resources"]
  node_admin_dashboard["Operations dashboard<br/>[Dashboard.php]"]
  node_reports["Booking reports"]
end

subgraph group_identity["Identity and access"]
  node_user_model[("User accounts<br/>[User.php]")]
  node_auth_provider["Authentication setup"]
  node_registration["User registration<br/>[CreateNewUser.php]"]
end

node_guest(("Guest"))
node_web_routes["Web routes<br/>[web.php]"]
node_middleware["Request context"]
node_database[("Application database")]

node_guest -->|"requests pages"| node_web_routes
node_web_routes -.->|"routes to"| node_booking_controller
node_booking_controller -->|"validates with"| node_stay_request
node_booking_controller -->|"queries availability"| node_availability
node_booking_controller -->|"calculates quote"| node_pricing
node_availability -->|"uses unit"| node_unit_model
node_availability -->|"reads nights"| node_database
node_pricing -->|"prices unit"| node_unit_model
node_booking_actions -.->|"manages bookings"| node_booking_model
node_booking_controller -.->|"starts booking"| node_booking_actions
node_home_controller -->|"loads home data"| node_public_home
node_public_home -->|"builds responses"| node_public_resources
node_public_home -->|"reads sections"| node_site_content
node_public_home -->|"reads settings"| node_settings
node_middleware -->|"shares site settings"| node_settings
node_admin_panel -.->|"registers resources"| node_admin_resources
node_admin_panel -.->|"hosts dashboard"| node_admin_dashboard
node_admin_dashboard -.->|"uses reporting"| node_reports
node_admin_resources -.->|"manages units"| node_unit_model
node_admin_resources -.->|"manages bookings"| node_booking_model
node_auth_provider -->|"configures creation"| node_registration
node_registration -->|"creates user"| node_user_model
node_user_model -.->|"persists account"| node_database

click node_booking_controller "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Http/Controllers/VillaBookingController.php"
click node_stay_request "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Http/Requests/StayQueryRequest.php"
click node_availability "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Actions/AvailabilityQuery.php"
click node_pricing "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Actions/PriceCalculator.php"
click node_booking_actions "https://github.com/artesia0528/booking-villa-laravel-inertia/tree/main/app/Actions"
click node_booking_model "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Models/Booking.php"
click node_unit_model "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Models/Unit.php"
click node_public_home "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Actions/PublicHomeData.php"
click node_home_controller "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Http/Controllers/HomeController.php"
click node_public_resources "https://github.com/artesia0528/booking-villa-laravel-inertia/tree/main/app/Http/Resources/Public"
click node_site_content "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Models/PageSection.php"
click node_settings "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Models/Setting.php"
click node_content_cache "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Support/ContentCache.php"
click node_admin_panel "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Providers/Filament/AdminPanelProvider.php"
click node_admin_resources "https://github.com/artesia0528/booking-villa-laravel-inertia/tree/main/app/Filament/Resources"
click node_admin_dashboard "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Filament/Pages/Dashboard.php"
click node_reports "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Support/BookingOperationsReport.php"
click node_user_model "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Models/User.php"
click node_auth_provider "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Providers/FortifyServiceProvider.php"
click node_registration "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Actions/Fortify/CreateNewUser.php"
click node_web_routes "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/routes/web.php"
click node_middleware "https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Http/Middleware/HandleInertiaRequests.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_home,node_home_controller,node_public_resources,node_site_content,node_settings,node_content_cache toneBlue
class node_booking_controller,node_stay_request,node_availability,node_pricing,node_booking_actions,node_booking_model,node_unit_model,node_database toneAmber
class node_admin_panel,node_admin_resources,node_admin_dashboard,node_reports,node_web_routes,node_middleware toneMint
class node_user_model,node_auth_provider,node_registration toneRose
class node_guest toneIndigo
```

## Components

### Public experience

- [Home data](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Actions/PublicHomeData.php): `app/Actions/PublicHomeData.php`
- [Home controller](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Http/Controllers/HomeController.php): `app/Http/Controllers/HomeController.php`
- [Public resources](https://github.com/artesia0528/booking-villa-laravel-inertia/tree/main/app/Http/Resources/Public): `app/Http/Resources/Public`
- [Site content](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Models/PageSection.php): `app/Models/PageSection.php`
- [Site settings](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Models/Setting.php): `app/Models/Setting.php`
- [Content cache](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Support/ContentCache.php): `app/Support/ContentCache.php`

### Booking operations

- [Stay endpoints](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Http/Controllers/VillaBookingController.php): `app/Http/Controllers/VillaBookingController.php`
- [Stay validation](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Http/Requests/StayQueryRequest.php): `app/Http/Requests/StayQueryRequest.php`
- [Availability query](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Actions/AvailabilityQuery.php): `app/Actions/AvailabilityQuery.php`
- [Price calculator](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Actions/PriceCalculator.php): `app/Actions/PriceCalculator.php`
- [Booking lifecycle](https://github.com/artesia0528/booking-villa-laravel-inertia/tree/main/app/Actions): `app/Actions`
- [Bookings](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Models/Booking.php): `app/Models/Booking.php`
- [Rental units](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Models/Unit.php): `app/Models/Unit.php`

### Administration

- [Admin panel](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Providers/Filament/AdminPanelProvider.php): `app/Providers/Filament/AdminPanelProvider.php`
- [Management resources](https://github.com/artesia0528/booking-villa-laravel-inertia/tree/main/app/Filament/Resources): `app/Filament/Resources`
- [Operations dashboard](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Filament/Pages/Dashboard.php): `app/Filament/Pages/Dashboard.php`
- [Booking reports](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Support/BookingOperationsReport.php): `app/Support/BookingOperationsReport.php`

### Identity and access

- [User accounts](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Models/User.php): `app/Models/User.php`
- [Authentication setup](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Providers/FortifyServiceProvider.php): `app/Providers/FortifyServiceProvider.php`
- [User registration](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Actions/Fortify/CreateNewUser.php): `app/Actions/Fortify/CreateNewUser.php`

### Other components

- **Guest**
- [Web routes](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/routes/web.php): `routes/web.php`
- [Request context](https://github.com/artesia0528/booking-villa-laravel-inertia/blob/main/app/Http/Middleware/HandleInertiaRequests.php): `app/Http/Middleware/HandleInertiaRequests.php`
- **Application database**

## Connections

- Guest → Web routes: requests pages
- Web routes → Stay endpoints: routes to
- Stay endpoints → Stay validation: validates with (evidence: `app/Http/Controllers/VillaBookingController.php`)
- Stay endpoints → Availability query: queries availability (evidence: `app/Http/Controllers/VillaBookingController.php`)
- Stay endpoints → Price calculator: calculates quote (evidence: `app/Http/Controllers/VillaBookingController.php`)
- Availability query → Rental units: uses unit (evidence: `app/Actions/AvailabilityQuery.php`)
- Availability query → Application database: reads nights (evidence: `app/Actions/AvailabilityQuery.php`)
- Price calculator → Rental units: prices unit (evidence: `app/Actions/PriceCalculator.php`)
- Booking lifecycle → Bookings: manages bookings
- Stay endpoints → Booking lifecycle: starts booking (evidence: `app/Http/Controllers/VillaBookingController.php`)
- Home controller → Home data: loads home data (evidence: `app/Http/Controllers/HomeController.php`)
- Home data → Public resources: builds responses (evidence: `app/Actions/PublicHomeData.php`)
- Home data → Site content: reads sections (evidence: `app/Actions/PublicHomeData.php`)
- Home data → Site settings: reads settings (evidence: `app/Actions/PublicHomeData.php`)
- Request context → Site settings: shares site settings (evidence: `app/Http/Middleware/HandleInertiaRequests.php`)
- Admin panel → Management resources: registers resources
- Admin panel → Operations dashboard: hosts dashboard
- Operations dashboard → Booking reports: uses reporting
- Management resources → Rental units: manages units
- Management resources → Bookings: manages bookings
- Authentication setup → User registration: configures creation (evidence: `app/Providers/FortifyServiceProvider.php`)
- User registration → User accounts: creates user (evidence: `app/Actions/Fortify/CreateNewUser.php`)
- User accounts → Application database: persists account
