# services-hls/haritha-resorts architecture

> Architecture diagram of the GitHub repository services-hls/haritha-resorts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/services-hls/haritha-resorts
- Repository: https://github.com/services-hls/haritha-resorts

## Overview

This is a browser-based hotel/property management application: users sign in, choose a global or property-specific view, and work with dashboards and operational pages. Its domain spans room inventory and booking, guest management, billing, restaurant orders, amenities, reporting, and property settings. The sampled code shows route protection and property selection, plus in-memory property state and mock records; it does not establish persistence beyond authentication in local storage. Page-level data wiring beyond the sampled excerpts is therefore left unspecified.

Main entry points: [`src/App.tsx`](https://github.com/services-hls/haritha-resorts/blob/main/src/App.tsx) (Application routes), [`src/contexts/AuthContext.tsx`](https://github.com/services-hls/haritha-resorts/blob/main/src/contexts/AuthContext.tsx) (Authentication state), [`src/contexts/PropertyContext.tsx`](https://github.com/services-hls/haritha-resorts/blob/main/src/contexts/PropertyContext.tsx) (Property state and filters), [`src/data/mockData.ts`](https://github.com/services-hls/haritha-resorts/blob/main/src/data/mockData.ts) (Mock records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_app["Application routes<br/>[App.tsx]"]
  node_login["Sign in<br/>[Login.tsx]"]
end

subgraph group_portfolio["Portfolio views"]
  node_global_dashboard["Global dashboard"]
  node_property_dashboard["Property dashboard"]
  node_global_filters["Portfolio filters"]
end

subgraph group_operations["Property operations"]
  node_rooms["Rooms and details"]
  node_room_details["Room details<br/>[RoomDetails.tsx]"]
  node_booking_management["Booking management"]
  node_day_view["Daily schedule<br/>[DayView.tsx]"]
  node_booking_form["Booking form"]
  node_booking_calendar["Booking calendar"]
  node_guests["Guest management"]
  node_billing["Billing and payments"]
  node_restaurant["Restaurant orders"]
  node_amenities["Amenities management"]
  node_reports["Reports<br/>[Reports.tsx]"]
  node_settings["Property settings<br/>[Settings.tsx]"]
end

subgraph group_state["Shared state and records"]
  node_auth["Authentication state<br/>[AuthContext.tsx]"]
  node_data["Mock records<br/>[mockData.ts]"]
  node_property_state["Property state and filters"]
end

node_operator(("Operator"))
node_browser_storage["Browser local storage"]

node_operator -->|"uses"| node_app
node_app -->|"provides auth"| node_auth
node_app -->|"provides property state"| node_property_state
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_global_dashboard
node_app -->|"routes to"| node_property_dashboard
node_app -->|"routes to"| node_rooms
node_app -->|"routes to"| node_room_details
node_app -->|"routes to"| node_booking_management
node_app -->|"routes to"| node_day_view
node_app -->|"routes to"| node_guests
node_app -->|"routes to"| node_billing
node_app -->|"routes to"| node_restaurant
node_app -->|"routes to"| node_amenities
node_app -->|"routes to"| node_reports
node_app -->|"routes to"| node_settings
node_auth -->|"reads users"| node_data
node_auth -->|"reads and writes"| node_browser_storage
node_property_state -->|"initializes from"| node_data
node_global_filters -->|"reads and updates"| node_property_state

click node_app "https://github.com/services-hls/haritha-resorts/blob/main/src/App.tsx"
click node_login "https://github.com/services-hls/haritha-resorts/blob/main/src/pages/Login.tsx"
click node_auth "https://github.com/services-hls/haritha-resorts/blob/main/src/contexts/AuthContext.tsx"
click node_data "https://github.com/services-hls/haritha-resorts/blob/main/src/data/mockData.ts"
click node_property_state "https://github.com/services-hls/haritha-resorts/blob/main/src/contexts/PropertyContext.tsx"
click node_global_dashboard "https://github.com/services-hls/haritha-resorts/blob/main/src/pages/GlobalDashboard.tsx"
click node_property_dashboard "https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/PropertyDashboard.tsx"
click node_rooms "https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/RoomsManagement.tsx"
click node_room_details "https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/RoomDetails.tsx"
click node_booking_management "https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/BookingManagement.tsx"
click node_day_view "https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/DayView.tsx"
click node_booking_form "https://github.com/services-hls/haritha-resorts/blob/main/src/components/BookingFormModal.tsx"
click node_booking_calendar "https://github.com/services-hls/haritha-resorts/blob/main/src/components/BookingCalendar.tsx"
click node_guests "https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/GuestManagement.tsx"
click node_billing "https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/BillingPayments.tsx"
click node_restaurant "https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/RestaurantOrders.tsx"
click node_amenities "https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/AmenitiesManagement.tsx"
click node_reports "https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/Reports.tsx"
click node_settings "https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/Settings.tsx"
click node_global_filters "https://github.com/services-hls/haritha-resorts/blob/main/src/components/layout/GlobalFilterBar.tsx"

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_app,node_login toneBlue
class node_global_dashboard,node_property_dashboard,node_global_filters,node_browser_storage toneAmber
class node_rooms,node_room_details,node_booking_management,node_day_view,node_booking_form,node_booking_calendar,node_guests,node_billing,node_restaurant,node_amenities,node_reports,node_settings toneMint
class node_auth,node_data,node_property_state toneRose
class node_operator toneIndigo
```

## Components

### Access and navigation

- [Application routes](https://github.com/services-hls/haritha-resorts/blob/main/src/App.tsx): `src/App.tsx`
- [Sign in](https://github.com/services-hls/haritha-resorts/blob/main/src/pages/Login.tsx): `src/pages/Login.tsx`

### Portfolio views

- [Global dashboard](https://github.com/services-hls/haritha-resorts/blob/main/src/pages/GlobalDashboard.tsx): `src/pages/GlobalDashboard.tsx`
- [Property dashboard](https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/PropertyDashboard.tsx): `src/pages/property/PropertyDashboard.tsx`
- [Portfolio filters](https://github.com/services-hls/haritha-resorts/blob/main/src/components/layout/GlobalFilterBar.tsx): `src/components/layout/GlobalFilterBar.tsx`

### Property operations

- [Rooms and details](https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/RoomsManagement.tsx): `src/pages/property/RoomsManagement.tsx`
- [Room details](https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/RoomDetails.tsx): `src/pages/property/RoomDetails.tsx`
- [Booking management](https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/BookingManagement.tsx): `src/pages/property/BookingManagement.tsx`
- [Daily schedule](https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/DayView.tsx): `src/pages/property/DayView.tsx`
- [Booking form](https://github.com/services-hls/haritha-resorts/blob/main/src/components/BookingFormModal.tsx): `src/components/BookingFormModal.tsx`
- [Booking calendar](https://github.com/services-hls/haritha-resorts/blob/main/src/components/BookingCalendar.tsx): `src/components/BookingCalendar.tsx`
- [Guest management](https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/GuestManagement.tsx): `src/pages/property/GuestManagement.tsx`
- [Billing and payments](https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/BillingPayments.tsx): `src/pages/property/BillingPayments.tsx`
- [Restaurant orders](https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/RestaurantOrders.tsx): `src/pages/property/RestaurantOrders.tsx`
- [Amenities management](https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/AmenitiesManagement.tsx): `src/pages/property/AmenitiesManagement.tsx`
- [Reports](https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/Reports.tsx): `src/pages/property/Reports.tsx`
- [Property settings](https://github.com/services-hls/haritha-resorts/blob/main/src/pages/property/Settings.tsx): `src/pages/property/Settings.tsx`

### Shared state and records

- [Authentication state](https://github.com/services-hls/haritha-resorts/blob/main/src/contexts/AuthContext.tsx): `src/contexts/AuthContext.tsx`
- [Mock records](https://github.com/services-hls/haritha-resorts/blob/main/src/data/mockData.ts): `src/data/mockData.ts`
- [Property state and filters](https://github.com/services-hls/haritha-resorts/blob/main/src/contexts/PropertyContext.tsx): `src/contexts/PropertyContext.tsx`

### Other components

- **Operator**
- **Browser local storage**

## Connections

- Operator → Application routes: uses
- Application routes → Authentication state: provides auth
- Application routes → Property state and filters: provides property state
- Application routes → Sign in: routes to
- Application routes → Global dashboard: routes to
- Application routes → Property dashboard: routes to
- Application routes → Rooms and details: routes to
- Application routes → Room details: routes to
- Application routes → Booking management: routes to
- Application routes → Daily schedule: routes to
- Application routes → Guest management: routes to
- Application routes → Billing and payments: routes to
- Application routes → Restaurant orders: routes to
- Application routes → Amenities management: routes to
- Application routes → Reports: routes to
- Application routes → Property settings: routes to
- Authentication state → Mock records: reads users
- Authentication state → Browser local storage: reads and writes
- Property state and filters → Mock records: initializes from
- Portfolio filters → Property state and filters: reads and updates
