# nyallaiah/hotelmanagementsystem architecture

> Architecture diagram of the GitHub repository nyallaiah/hotelmanagementsystem, 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/nyallaiah/hotelmanagementsystem
- Repository: https://github.com/nyallaiah/hotelmanagementsystem

## Overview

Grand Azure is a hotel PMS/ERP joining guest booking and self-service with staff operations. Guests browse rooms, check availability, book and pay, then use a booking reference to view folios; staff authenticate to manage reservations, room status, dining orders, invoices and analytics. The frontend API client calls a FastAPI app that registers domain routers; those routes use database, authentication and payment services. Relationships are limited to visible imports, calls, and README-documented capabilities; unsampled route internals are not inferred.

Main entry points: [`frontend/src/App.jsx`](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/App.jsx) (App and navigation), [`frontend/src/services/api.js`](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/services/api.js) (API client), [`backend/main.py`](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/main.py) (FastAPI application), [`backend/database.py`](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/database.py) (Database adapter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_guest["Guest experience"]
  node_app["App and navigation<br/>[App.jsx]"]
  node_guest_showcase["Hotel showcase<br/>[Amenities.jsx]"]
  node_room_catalog["Room catalog<br/>[RoomCatalog.jsx]"]
  node_booking_ui["Booking flow<br/>[BookingModal.jsx]"]
  node_guest_folio["Guest folio<br/>[GuestFolio.jsx]"]
end

subgraph group_staff["Staff operations"]
  node_auth_context["Session and auth<br/>[AuthContext.jsx]"]
  node_admin_login["Staff login<br/>[AdminLogin.jsx]"]
  node_admin_dashboard["Operations dashboard<br/>[AdminDashboard.jsx]"]
  node_room_matrix["Room and housekeeping<br/>[RoomMatrix.jsx]"]
  node_booking_management["Booking management"]
  node_kitchen_pos["Kitchen POS<br/>[KitchenPOS.jsx]"]
  node_folio_invoices["Folio and invoices<br/>[FolioInvoices.jsx]"]
end

subgraph group_backend["Backend services"]
  node_api_client["API client<br/>[api.js]"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_schemas["Domain schemas<br/>[schemas.py]"]
  node_auth_routes["Authentication routes<br/>[auth.py]"]
  node_booking_routes["Booking routes<br/>[bookings.py]"]
  node_room_routes["Room routes<br/>[rooms.py]"]
  node_payment_routes["Payment routes<br/>[payments.py]"]
  node_pos_routes["Dining routes<br/>[pos.py]"]
  node_analytics_routes["Analytics routes<br/>[analytics.py]"]
  node_auth_service["Identity and access<br/>[auth_service.py]"]
  node_payment_service["Payment and invoice service<br/>[payment_service.py]"]
end

subgraph group_data["Persistence and integrations"]
  node_database_layer["Database adapter<br/>[database.py]"]
  node_mongo[("MongoDB or memory store")]
  node_supabase["Supabase auth"]
  node_payment_gateways["Stripe or Razorpay"]
end

node_guest_actor(("Guest"))
node_staff_actor(("Hotel staff"))

node_guest_actor -->|"uses"| node_app
node_staff_actor -->|"opens portal"| node_app
node_app -->|"renders"| node_guest_showcase
node_app -->|"renders"| node_room_catalog
node_app -->|"renders"| node_booking_ui
node_app -->|"renders"| node_guest_folio
node_app -->|"renders"| node_admin_login
node_app -->|"renders"| node_admin_dashboard
node_app -->|"renders"| node_room_matrix
node_app -->|"renders"| node_booking_management
node_app -->|"renders"| node_kitchen_pos
node_app -->|"renders"| node_folio_invoices
node_app -->|"provides session"| node_auth_context
node_admin_login -->|"uses"| node_auth_context
node_booking_ui -->|"requests"| node_api_client
node_guest_folio -->|"requests"| node_api_client
node_auth_context -->|"calls"| node_api_client
node_auth_context -.->|"optional sign-in"| node_supabase
node_admin_dashboard -->|"requests"| node_api_client
node_room_matrix -->|"requests"| node_api_client
node_booking_management -->|"requests"| node_api_client
node_kitchen_pos -->|"requests"| node_api_client
node_folio_invoices -->|"requests"| node_api_client
node_api_client -->|"HTTP API"| node_api_app
node_api_app -->|"registers"| node_auth_routes
node_api_app -->|"registers"| node_room_routes
node_api_app -->|"registers"| node_booking_routes
node_api_app -->|"registers"| node_payment_routes
node_api_app -->|"registers"| node_pos_routes
node_api_app -->|"registers"| node_analytics_routes
node_auth_routes -->|"uses"| node_auth_service
node_booking_routes -->|"uses"| node_payment_service
node_auth_service -->|"looks up users"| node_database_layer
node_database_layer -->|"backs collections"| node_mongo
node_payment_service -.->|"optional processing"| node_payment_gateways
node_api_app -->|"connects and seeds"| node_database_layer
node_booking_routes -->|"validates bookings"| node_schemas
node_auth_routes -->|"validates identity"| node_schemas
node_payment_routes -->|"uses"| node_payment_service
node_payment_routes -->|"accesses records"| node_database_layer
node_booking_routes -->|"reads and writes"| node_database_layer
node_room_routes -->|"accesses rooms"| node_database_layer
node_pos_routes -->|"accesses dining data"| node_database_layer
node_analytics_routes -->|"reads metrics"| node_database_layer
node_room_catalog -.->|"availability path"| node_api_client

click node_app "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/App.jsx"
click node_guest_showcase "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/guest/Amenities.jsx"
click node_room_catalog "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/guest/RoomCatalog.jsx"
click node_booking_ui "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/guest/BookingModal.jsx"
click node_guest_folio "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/guest/GuestFolio.jsx"
click node_auth_context "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/context/AuthContext.jsx"
click node_admin_login "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/admin/AdminLogin.jsx"
click node_admin_dashboard "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/admin/AdminDashboard.jsx"
click node_room_matrix "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/admin/RoomMatrix.jsx"
click node_booking_management "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/admin/BookingManagement.jsx"
click node_kitchen_pos "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/admin/KitchenPOS.jsx"
click node_folio_invoices "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/admin/FolioInvoices.jsx"
click node_api_client "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/services/api.js"
click node_api_app "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/main.py"
click node_schemas "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/models/schemas.py"
click node_auth_routes "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/routes/auth.py"
click node_booking_routes "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/routes/bookings.py"
click node_room_routes "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/routes/rooms.py"
click node_payment_routes "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/routes/payments.py"
click node_pos_routes "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/routes/pos.py"
click node_analytics_routes "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/routes/analytics.py"
click node_auth_service "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/services/auth_service.py"
click node_payment_service "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/services/payment_service.py"
click node_database_layer "https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/database.py"

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_guest_showcase,node_room_catalog,node_booking_ui,node_guest_folio toneBlue
class node_auth_context,node_admin_login,node_admin_dashboard,node_room_matrix,node_booking_management,node_kitchen_pos,node_folio_invoices toneAmber
class node_api_client,node_api_app,node_schemas,node_auth_routes,node_booking_routes,node_room_routes,node_payment_routes,node_pos_routes,node_analytics_routes,node_auth_service,node_payment_service toneMint
class node_database_layer,node_mongo,node_supabase,node_payment_gateways toneRose
class node_guest_actor,node_staff_actor toneIndigo
```

## Components

### Guest experience

- [App and navigation](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Hotel showcase](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/guest/Amenities.jsx): `frontend/src/components/guest/Amenities.jsx`
- [Room catalog](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/guest/RoomCatalog.jsx): `frontend/src/components/guest/RoomCatalog.jsx`
- [Booking flow](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/guest/BookingModal.jsx): `frontend/src/components/guest/BookingModal.jsx`
- [Guest folio](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/guest/GuestFolio.jsx): `frontend/src/components/guest/GuestFolio.jsx`

### Staff operations

- [Session and auth](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Staff login](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/admin/AdminLogin.jsx): `frontend/src/components/admin/AdminLogin.jsx`
- [Operations dashboard](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/admin/AdminDashboard.jsx): `frontend/src/components/admin/AdminDashboard.jsx`
- [Room and housekeeping](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/admin/RoomMatrix.jsx): `frontend/src/components/admin/RoomMatrix.jsx`
- [Booking management](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/admin/BookingManagement.jsx): `frontend/src/components/admin/BookingManagement.jsx`
- [Kitchen POS](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/admin/KitchenPOS.jsx): `frontend/src/components/admin/KitchenPOS.jsx`
- [Folio and invoices](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/components/admin/FolioInvoices.jsx): `frontend/src/components/admin/FolioInvoices.jsx`

### Backend services

- [API client](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/frontend/src/services/api.js): `frontend/src/services/api.js`
- [FastAPI application](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/main.py): `backend/main.py`
- [Domain schemas](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/models/schemas.py): `backend/models/schemas.py`
- [Authentication routes](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/routes/auth.py): `backend/routes/auth.py`
- [Booking routes](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/routes/bookings.py): `backend/routes/bookings.py`
- [Room routes](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/routes/rooms.py): `backend/routes/rooms.py`
- [Payment routes](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/routes/payments.py): `backend/routes/payments.py`
- [Dining routes](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/routes/pos.py): `backend/routes/pos.py`
- [Analytics routes](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/routes/analytics.py): `backend/routes/analytics.py`
- [Identity and access](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/services/auth_service.py): `backend/services/auth_service.py`
- [Payment and invoice service](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/services/payment_service.py): `backend/services/payment_service.py`

### Persistence and integrations

- [Database adapter](https://github.com/nyallaiah/hotelmanagementsystem/blob/master/backend/database.py): `backend/database.py`
- **MongoDB or memory store**
- **Supabase auth**
- **Stripe or Razorpay**

### Other components

- **Guest**
- **Hotel staff**

## Connections

- Guest → App and navigation: uses (evidence: `frontend/src/App.jsx`)
- Hotel staff → App and navigation: opens portal (evidence: `frontend/src/App.jsx`)
- App and navigation → Hotel showcase: renders (evidence: `frontend/src/App.jsx`)
- App and navigation → Room catalog: renders (evidence: `frontend/src/App.jsx`)
- App and navigation → Booking flow: renders (evidence: `frontend/src/App.jsx`)
- App and navigation → Guest folio: renders (evidence: `frontend/src/App.jsx`)
- App and navigation → Staff login: renders (evidence: `frontend/src/App.jsx`)
- App and navigation → Operations dashboard: renders (evidence: `frontend/src/App.jsx`)
- App and navigation → Room and housekeeping: renders (evidence: `frontend/src/App.jsx`)
- App and navigation → Booking management: renders (evidence: `frontend/src/App.jsx`)
- App and navigation → Kitchen POS: renders (evidence: `frontend/src/App.jsx`)
- App and navigation → Folio and invoices: renders (evidence: `frontend/src/App.jsx`)
- App and navigation → Session and auth: provides session (evidence: `frontend/src/App.jsx`)
- Staff login → Session and auth: uses (evidence: `frontend/src/components/admin/AdminLogin.jsx`)
- Booking flow → API client: requests (evidence: `frontend/src/components/guest/BookingModal.jsx`)
- Guest folio → API client: requests (evidence: `frontend/src/components/guest/GuestFolio.jsx`)
- Session and auth → API client: calls (evidence: `frontend/src/context/AuthContext.jsx`)
- Session and auth → Supabase auth: optional sign-in (evidence: `frontend/src/context/AuthContext.jsx`)
- Operations dashboard → API client: requests (evidence: `frontend/src/components/admin/AdminDashboard.jsx`)
- Room and housekeeping → API client: requests (evidence: `frontend/src/components/admin/RoomMatrix.jsx`)
- Booking management → API client: requests (evidence: `frontend/src/components/admin/BookingManagement.jsx`)
- Kitchen POS → API client: requests (evidence: `frontend/src/components/admin/KitchenPOS.jsx`)
- Folio and invoices → API client: requests (evidence: `frontend/src/components/admin/FolioInvoices.jsx`)
- API client → FastAPI application: HTTP API (evidence: `frontend/src/services/api.js`)
- FastAPI application → Authentication routes: registers (evidence: `backend/main.py`)
- FastAPI application → Room routes: registers (evidence: `backend/main.py`)
- FastAPI application → Booking routes: registers (evidence: `backend/main.py`)
- FastAPI application → Payment routes: registers (evidence: `backend/main.py`)
- FastAPI application → Dining routes: registers (evidence: `backend/main.py`)
- FastAPI application → Analytics routes: registers (evidence: `backend/main.py`)
- Authentication routes → Identity and access: uses (evidence: `backend/routes/auth.py`)
- Booking routes → Payment and invoice service: uses (evidence: `backend/routes/bookings.py`)
- Identity and access → Database adapter: looks up users (evidence: `backend/services/auth_service.py`)
- Database adapter → MongoDB or memory store: backs collections (evidence: `backend/database.py`)
- Payment and invoice service → Stripe or Razorpay: optional processing (evidence: `backend/services/payment_service.py`)
- FastAPI application → Database adapter: connects and seeds (evidence: `backend/main.py`)
- Booking routes → Domain schemas: validates bookings (evidence: `backend/routes/bookings.py`)
- Authentication routes → Domain schemas: validates identity (evidence: `backend/routes/auth.py`)
- Payment routes → Payment and invoice service: uses (evidence: `backend/routes/payments.py`)
- Payment routes → Database adapter: accesses records (evidence: `backend/routes/payments.py`)
- Booking routes → Database adapter: reads and writes (evidence: `backend/routes/bookings.py`)
- Room routes → Database adapter: accesses rooms (evidence: `backend/routes/rooms.py`)
- Dining routes → Database adapter: accesses dining data (evidence: `backend/routes/pos.py`)
- Analytics routes → Database adapter: reads metrics (evidence: `backend/routes/analytics.py`)
- Room catalog → API client: availability path
