# vishwa13-dot/gh-resort-website architecture

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

- Interactive diagram: https://gitdiagram.com/vishwa13-dot/gh-resort-website
- Repository: https://github.com/vishwa13-dot/gh-resort-website

## Overview

Green Heaven is a resort website with room discovery, booking, informational pages, and an admin portal. Visitors browse rooms or search availability, then reach the booking form; administrators manage rooms, gallery content, messages, and settings. The React app routes pages and provides shared resort state, persisted in browser local storage with fallback data. Several page implementations are only indexed, so their connections are shown only where the app or sampled source supports them; no external booking or payment service is evidenced.

Main entry points: [`src/App.jsx`](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/App.jsx) (App router), [`src/pages/Home.jsx`](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/Home.jsx) (Home page), [`src/hooks/useResortState.js`](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/hooks/useResortState.js) (Resort state), [`src/pages/Booking.jsx`](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/Booking.jsx) (Booking form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_visitor["Guest experience"]
  node_home["Home page<br/>[Home.jsx]"]
  node_home_sections["Home sections"]
  node_rooms["Room listing<br/>[Rooms.jsx]"]
  node_room_details["Room details<br/>[RoomDetails.jsx]"]
  node_room_card["Room card<br/>[RoomCard.jsx]"]
  node_about["About page<br/>[About.jsx]"]
  node_facilities["Facilities page<br/>[Facilities.jsx]"]
  node_gallery["Gallery page<br/>[Gallery.jsx]"]
  node_contact["Contact page<br/>[Contact.jsx]"]
end

subgraph group_reservation["Reservations"]
  node_search["Booking search"]
  node_booking["Booking form<br/>[Booking.jsx]"]
end

subgraph group_admin["Resort administration"]
  node_admin_login["Admin login<br/>[AdminLogin.jsx]"]
  node_admin_panel["Admin panel<br/>[AdminPanel.jsx]"]
end

subgraph group_state["Shared state and UI"]
  node_app["App router<br/>[App.jsx]"]
  node_resort_state["Resort state<br/>[useResortState.js]"]
  node_local_storage[("Browser storage<br/>[secureLS.js]")]
  node_fallbacks["Fallback content"]
  node_shared_ui["Shared UI controls"]
  node_layout["Site layout"]
end

node_guest(("Website visitor"))

node_guest -->|"opens site"| node_app
node_app -->|"loads state"| node_resort_state
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_rooms
node_app -->|"routes to"| node_room_details
node_app -.->|"routes to"| node_booking
node_app -->|"routes to"| node_gallery
node_app -->|"routes to"| node_facilities
node_app -->|"routes to"| node_about
node_app -->|"routes to"| node_contact
node_app -.->|"routes to"| node_admin_login
node_app -->|"routes to"| node_admin_panel
node_app -->|"renders"| node_layout
node_app -->|"renders toast"| node_shared_ui
node_home -->|"renders"| node_home_sections
node_home -->|"renders"| node_search
node_home -->|"links to"| node_rooms
node_home -->|"links to"| node_gallery
node_rooms -->|"renders"| node_room_card
node_room_card -->|"links to"| node_room_details
node_room_card -->|"links to"| node_booking
node_search -.->|"navigates to"| node_booking
node_booking -->|"uses controls"| node_shared_ui
node_admin_panel -->|"uses controls"| node_shared_ui
node_admin_panel -.->|"updates content"| node_resort_state
node_contact -->|"submits messages"| node_resort_state
node_resort_state -->|"reads and writes"| node_local_storage
node_resort_state -->|"loads defaults"| node_fallbacks

click node_app "https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/App.jsx"
click node_home "https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/Home.jsx"
click node_home_sections "https://github.com/vishwa13-dot/gh-resort-website/tree/main/src/components/home"
click node_search "https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/components/home/BookingSearchBar.jsx"
click node_rooms "https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/Rooms.jsx"
click node_room_details "https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/RoomDetails.jsx"
click node_room_card "https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/components/rooms/RoomCard.jsx"
click node_booking "https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/Booking.jsx"
click node_about "https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/About.jsx"
click node_facilities "https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/Facilities.jsx"
click node_gallery "https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/Gallery.jsx"
click node_contact "https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/Contact.jsx"
click node_admin_login "https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/AdminLogin.jsx"
click node_admin_panel "https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/AdminPanel.jsx"
click node_resort_state "https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/hooks/useResortState.js"
click node_local_storage "https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/utils/secureLS.js"
click node_fallbacks "https://github.com/vishwa13-dot/gh-resort-website/tree/main/src/data"
click node_shared_ui "https://github.com/vishwa13-dot/gh-resort-website/tree/main/src/components/common"
click node_layout "https://github.com/vishwa13-dot/gh-resort-website/tree/main/src/components/layout"

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_home,node_home_sections,node_rooms,node_room_details,node_room_card,node_about,node_facilities,node_gallery,node_contact toneBlue
class node_search,node_booking toneAmber
class node_admin_login,node_admin_panel toneMint
class node_app,node_resort_state,node_local_storage,node_fallbacks,node_shared_ui,node_layout toneRose
class node_guest toneIndigo
```

## Components

### Guest experience

- [Home page](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Home sections](https://github.com/vishwa13-dot/gh-resort-website/tree/main/src/components/home): `src/components/home`
- [Room listing](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/Rooms.jsx): `src/pages/Rooms.jsx`
- [Room details](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/RoomDetails.jsx): `src/pages/RoomDetails.jsx`
- [Room card](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/components/rooms/RoomCard.jsx): `src/components/rooms/RoomCard.jsx`
- [About page](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/About.jsx): `src/pages/About.jsx`
- [Facilities page](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/Facilities.jsx): `src/pages/Facilities.jsx`
- [Gallery page](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/Gallery.jsx): `src/pages/Gallery.jsx`
- [Contact page](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/Contact.jsx): `src/pages/Contact.jsx`

### Reservations

- [Booking search](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/components/home/BookingSearchBar.jsx): `src/components/home/BookingSearchBar.jsx`
- [Booking form](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/Booking.jsx): `src/pages/Booking.jsx`

### Resort administration

- [Admin login](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/AdminLogin.jsx): `src/pages/AdminLogin.jsx`
- [Admin panel](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/pages/AdminPanel.jsx): `src/pages/AdminPanel.jsx`

### Shared state and UI

- [App router](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/App.jsx): `src/App.jsx`
- [Resort state](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/hooks/useResortState.js): `src/hooks/useResortState.js`
- [Browser storage](https://github.com/vishwa13-dot/gh-resort-website/blob/main/src/utils/secureLS.js): `src/utils/secureLS.js`
- [Fallback content](https://github.com/vishwa13-dot/gh-resort-website/tree/main/src/data): `src/data`
- [Shared UI controls](https://github.com/vishwa13-dot/gh-resort-website/tree/main/src/components/common): `src/components/common`
- [Site layout](https://github.com/vishwa13-dot/gh-resort-website/tree/main/src/components/layout): `src/components/layout`

### Other components

- **Website visitor**

## Connections

- Website visitor → App router: opens site
- App router → Resort state: loads state (evidence: `src/App.jsx`)
- App router → Home page: routes to (evidence: `src/App.jsx`)
- App router → Room listing: routes to (evidence: `src/App.jsx`)
- App router → Room details: routes to (evidence: `src/App.jsx`)
- App router → Booking form: routes to (evidence: `src/App.jsx`)
- App router → Gallery page: routes to (evidence: `src/App.jsx`)
- App router → Facilities page: routes to (evidence: `src/App.jsx`)
- App router → About page: routes to (evidence: `src/App.jsx`)
- App router → Contact page: routes to (evidence: `src/App.jsx`)
- App router → Admin login: routes to (evidence: `src/App.jsx`)
- App router → Admin panel: routes to (evidence: `src/App.jsx`)
- App router → Site layout: renders (evidence: `src/App.jsx`)
- App router → Shared UI controls: renders toast (evidence: `src/App.jsx`)
- Home page → Home sections: renders (evidence: `src/pages/Home.jsx`)
- Home page → Booking search: renders (evidence: `src/pages/Home.jsx`)
- Home page → Room listing: links to (evidence: `src/pages/Home.jsx`)
- Home page → Gallery page: links to (evidence: `src/pages/Home.jsx`)
- Room listing → Room card: renders (evidence: `src/pages/Rooms.jsx`)
- Room card → Room details: links to (evidence: `src/components/rooms/RoomCard.jsx`)
- Room card → Booking form: links to (evidence: `src/components/rooms/RoomCard.jsx`)
- Booking search → Booking form: navigates to
- Booking form → Shared UI controls: uses controls (evidence: `src/pages/Booking.jsx`)
- Admin panel → Shared UI controls: uses controls (evidence: `src/pages/AdminPanel.jsx`)
- Admin panel → Resort state: updates content
- Contact page → Resort state: submits messages (evidence: `src/App.jsx`)
- Resort state → Browser storage: reads and writes (evidence: `src/hooks/useResortState.js`)
- Resort state → Fallback content: loads defaults (evidence: `src/hooks/useResortState.js`)
