# pradeep7895/aurevia architecture

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

- Interactive diagram: https://gitdiagram.com/pradeep7895/aurevia
- Repository: https://github.com/pradeep7895/aurevia

## Overview

HMS is a hotel booking and management platform serving guests, hotel partners, and administrators. The guest journey spans discovery, hotel and rate selection, booking and payment, then stay management and verified reviews; separate partner and admin workflows handle hotel operations and platform oversight. The backend exposes FastAPI routes over business services, with persistent state and background jobs; an AI assistant adds search and booking support. Connections reflect the excerpts, source index, and README; unsampled route and frontend internals limit finer-grained wiring.

Main entry points: [`backend/app/api/v1/router.py`](https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/router.py) (API router), [`backend/app/api/v1/hotel_ops.py`](https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/hotel_ops.py) (Hotel operations), [`backend/app/api/v1/admin.py`](https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/admin.py) (Admin controls), [`frontend/src/app/router.tsx`](https://github.com/pradeep7895/aurevia/blob/main/frontend/src/app/router.tsx) (Web application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_guest["Guest experience"]
  node_web["Web application<br/>[router.tsx]"]
  node_discovery["Search and hotels<br/>[SearchPage.tsx]"]
  node_booking_ui["Booking checkout<br/>[CheckoutPage.tsx]"]
  node_guest_routes["Guest API routes<br/>[bookings.py]"]
  node_booking_service["Booking lifecycle<br/>[booking.py]"]
  node_payment_api["Payment routes<br/>[payments.py]"]
  node_payment_service["Payments and refunds<br/>[payments.py]"]
  node_reviews["Reviews<br/>[reviews.py]"]
  node_review_search["Review search<br/>[review_search.py]"]
end

subgraph group_operations["Hotel operations"]
  node_hotel_setup["Hotel onboarding<br/>[hotel_manage.py]"]
  node_hotel_ops["Hotel operations<br/>[hotel_ops.py]"]
  node_manager_tools["Manager assistant tools<br/>[manager_tools.py]"]
  node_admin["Admin controls<br/>[admin.py]"]
  node_admin_hotels["Hotel approvals<br/>[admin_hotels.py]"]
end

subgraph group_platform["Platform services"]
  node_audit["Audit logging<br/>[audit.py]"]
  node_documents["Document storage<br/>[documents.py]"]
  node_notifications["Notifications<br/>[notifications.py]"]
  node_settings["Platform settings"]
  node_app["API application<br/>[main.py]"]
  node_api_router["API router<br/>[router.py]"]
  node_auth_deps["Authentication and access<br/>[deps.py]"]
  node_database[("PostgreSQL")]
  node_db_layer["Database setup<br/>[db.py]"]
  node_jobs["Background jobs<br/>[jobs.py]"]
end

subgraph group_intelligence["AI assistant"]
  node_agent["AI assistant runtime<br/>[runtime.py]"]
  node_agent_llm["Language model<br/>[llm.py]"]
  node_assistant_ui["Chat interface<br/>[useChat.ts]"]
end

node_guest(("Guest"))
node_partner(("Hotel partner"))
node_groq{{"Groq"}}

node_guest -.->|"uses"| node_web
node_web -->|"routes to"| node_discovery
node_web -->|"routes to"| node_booking_ui
node_web -->|"routes to"| node_assistant_ui
node_partner -.->|"manages property"| node_hotel_setup
node_partner -.->|"operates hotel"| node_hotel_ops
node_app -->|"registers"| node_api_router
node_api_router -->|"includes"| node_guest_routes
node_api_router -->|"includes"| node_payment_api
node_api_router -->|"includes"| node_reviews
node_api_router -->|"includes"| node_hotel_setup
node_api_router -->|"includes"| node_hotel_ops
node_api_router -->|"includes"| node_admin_hotels
node_api_router -->|"includes"| node_admin
node_guest_routes -->|"calls"| node_booking_service
node_payment_api -->|"calls"| node_payment_service
node_hotel_ops -->|"uses"| node_booking_service
node_hotel_ops -->|"uses"| node_payment_service
node_hotel_ops -->|"uses"| node_settings
node_hotel_ops -->|"uses"| node_documents
node_hotel_ops -->|"uses"| node_notifications
node_admin -->|"uses"| node_booking_service
node_admin -->|"uses"| node_payment_service
node_admin -->|"uses"| node_settings
node_admin -->|"uses"| node_audit
node_admin_hotels -->|"uses"| node_audit
node_admin_hotels -->|"uses"| node_documents
node_admin_hotels -->|"uses"| node_notifications
node_reviews -.->|"uses"| node_review_search
node_reviews -->|"notifies"| node_notifications
node_app -->|"creates"| node_db_layer
node_db_layer -.->|"connects"| node_database
node_app -->|"configures tasks"| node_jobs
node_agent -->|"uses"| node_agent_llm
node_agent_llm -.->|"calls"| node_groq
node_manager_tools -->|"calls"| node_hotel_ops
node_assistant_ui -.->|"sends chat"| node_agent
node_booking_ui -.->|"submits booking"| node_guest_routes
node_booking_ui -.->|"submits payment"| node_payment_api
node_hotel_setup -.->|"requires access"| node_auth_deps

click node_web "https://github.com/pradeep7895/aurevia/blob/main/frontend/src/app/router.tsx"
click node_discovery "https://github.com/pradeep7895/aurevia/blob/main/frontend/src/features/search/SearchPage.tsx"
click node_booking_ui "https://github.com/pradeep7895/aurevia/blob/main/frontend/src/features/booking/CheckoutPage.tsx"
click node_guest_routes "https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/bookings.py"
click node_booking_service "https://github.com/pradeep7895/aurevia/blob/main/backend/app/services/booking.py"
click node_payment_api "https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/payments.py"
click node_payment_service "https://github.com/pradeep7895/aurevia/blob/main/backend/app/services/payments.py"
click node_reviews "https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/reviews.py"
click node_review_search "https://github.com/pradeep7895/aurevia/blob/main/backend/app/services/review_search.py"
click node_hotel_setup "https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/hotel_manage.py"
click node_hotel_ops "https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/hotel_ops.py"
click node_manager_tools "https://github.com/pradeep7895/aurevia/blob/main/backend/app/agent/manager_tools.py"
click node_admin "https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/admin.py"
click node_admin_hotels "https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/admin_hotels.py"
click node_audit "https://github.com/pradeep7895/aurevia/blob/main/backend/app/services/audit.py"
click node_documents "https://github.com/pradeep7895/aurevia/blob/main/backend/app/services/documents.py"
click node_notifications "https://github.com/pradeep7895/aurevia/blob/main/backend/app/services/notifications.py"
click node_settings "https://github.com/pradeep7895/aurevia/blob/main/backend/app/services/platform_settings.py"
click node_app "https://github.com/pradeep7895/aurevia/blob/main/backend/app/main.py"
click node_api_router "https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/router.py"
click node_auth_deps "https://github.com/pradeep7895/aurevia/blob/main/backend/app/core/deps.py"
click node_db_layer "https://github.com/pradeep7895/aurevia/blob/main/backend/app/core/db.py"
click node_jobs "https://github.com/pradeep7895/aurevia/blob/main/backend/app/workers/jobs.py"
click node_agent "https://github.com/pradeep7895/aurevia/blob/main/backend/app/agent/runtime.py"
click node_agent_llm "https://github.com/pradeep7895/aurevia/blob/main/backend/app/agent/llm.py"
click node_assistant_ui "https://github.com/pradeep7895/aurevia/blob/main/frontend/src/features/chat/useChat.ts"

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_web,node_discovery,node_booking_ui,node_guest_routes,node_booking_service,node_payment_api,node_payment_service,node_reviews,node_review_search toneBlue
class node_hotel_setup,node_hotel_ops,node_manager_tools,node_admin,node_admin_hotels toneAmber
class node_audit,node_documents,node_notifications,node_settings,node_app,node_api_router,node_auth_deps,node_database,node_db_layer,node_jobs toneMint
class node_agent,node_agent_llm,node_assistant_ui toneRose
class node_guest,node_partner,node_groq toneIndigo
```

## Components

### Guest experience

- [Web application](https://github.com/pradeep7895/aurevia/blob/main/frontend/src/app/router.tsx): `frontend/src/app/router.tsx`
- [Search and hotels](https://github.com/pradeep7895/aurevia/blob/main/frontend/src/features/search/SearchPage.tsx): `frontend/src/features/search/SearchPage.tsx`
- [Booking checkout](https://github.com/pradeep7895/aurevia/blob/main/frontend/src/features/booking/CheckoutPage.tsx): `frontend/src/features/booking/CheckoutPage.tsx`
- [Guest API routes](https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/bookings.py): `backend/app/api/v1/bookings.py`
- [Booking lifecycle](https://github.com/pradeep7895/aurevia/blob/main/backend/app/services/booking.py): `backend/app/services/booking.py`
- [Payment routes](https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/payments.py): `backend/app/api/v1/payments.py`
- [Payments and refunds](https://github.com/pradeep7895/aurevia/blob/main/backend/app/services/payments.py): `backend/app/services/payments.py`
- [Reviews](https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/reviews.py): `backend/app/api/v1/reviews.py`
- [Review search](https://github.com/pradeep7895/aurevia/blob/main/backend/app/services/review_search.py): `backend/app/services/review_search.py`

### Hotel operations

- [Hotel onboarding](https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/hotel_manage.py): `backend/app/api/v1/hotel_manage.py`
- [Hotel operations](https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/hotel_ops.py): `backend/app/api/v1/hotel_ops.py`
- [Manager assistant tools](https://github.com/pradeep7895/aurevia/blob/main/backend/app/agent/manager_tools.py): `backend/app/agent/manager_tools.py`
- [Admin controls](https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/admin.py): `backend/app/api/v1/admin.py`
- [Hotel approvals](https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/admin_hotels.py): `backend/app/api/v1/admin_hotels.py`

### Platform services

- [Audit logging](https://github.com/pradeep7895/aurevia/blob/main/backend/app/services/audit.py): `backend/app/services/audit.py`
- [Document storage](https://github.com/pradeep7895/aurevia/blob/main/backend/app/services/documents.py): `backend/app/services/documents.py`
- [Notifications](https://github.com/pradeep7895/aurevia/blob/main/backend/app/services/notifications.py): `backend/app/services/notifications.py`
- [Platform settings](https://github.com/pradeep7895/aurevia/blob/main/backend/app/services/platform_settings.py): `backend/app/services/platform_settings.py`
- [API application](https://github.com/pradeep7895/aurevia/blob/main/backend/app/main.py): `backend/app/main.py`
- [API router](https://github.com/pradeep7895/aurevia/blob/main/backend/app/api/v1/router.py): `backend/app/api/v1/router.py`
- [Authentication and access](https://github.com/pradeep7895/aurevia/blob/main/backend/app/core/deps.py): `backend/app/core/deps.py`
- **PostgreSQL**
- [Database setup](https://github.com/pradeep7895/aurevia/blob/main/backend/app/core/db.py): `backend/app/core/db.py`
- [Background jobs](https://github.com/pradeep7895/aurevia/blob/main/backend/app/workers/jobs.py): `backend/app/workers/jobs.py`

### AI assistant

- [AI assistant runtime](https://github.com/pradeep7895/aurevia/blob/main/backend/app/agent/runtime.py): `backend/app/agent/runtime.py`
- [Language model](https://github.com/pradeep7895/aurevia/blob/main/backend/app/agent/llm.py): `backend/app/agent/llm.py`
- [Chat interface](https://github.com/pradeep7895/aurevia/blob/main/frontend/src/features/chat/useChat.ts): `frontend/src/features/chat/useChat.ts`

### Other components

- **Guest**
- **Hotel partner**
- **Groq**

## Connections

- Guest → Web application: uses (evidence: `README.md`)
- Web application → Search and hotels: routes to (evidence: `frontend/src/app/router.tsx`)
- Web application → Booking checkout: routes to (evidence: `frontend/src/app/router.tsx`)
- Web application → Chat interface: routes to (evidence: `frontend/src/app/router.tsx`)
- Hotel partner → Hotel onboarding: manages property (evidence: `README.md`)
- Hotel partner → Hotel operations: operates hotel (evidence: `README.md`)
- API application → API router: registers (evidence: `backend/app/main.py`)
- API router → Guest API routes: includes (evidence: `backend/app/api/v1/router.py`)
- API router → Payment routes: includes (evidence: `backend/app/api/v1/router.py`)
- API router → Reviews: includes (evidence: `backend/app/api/v1/router.py`)
- API router → Hotel onboarding: includes (evidence: `backend/app/api/v1/router.py`)
- API router → Hotel operations: includes (evidence: `backend/app/api/v1/router.py`)
- API router → Hotel approvals: includes (evidence: `backend/app/api/v1/router.py`)
- API router → Admin controls: includes (evidence: `backend/app/api/v1/router.py`)
- Guest API routes → Booking lifecycle: calls (evidence: `backend/app/api/v1/bookings.py`)
- Payment routes → Payments and refunds: calls
- Hotel operations → Booking lifecycle: uses (evidence: `backend/app/api/v1/hotel_ops.py`)
- Hotel operations → Payments and refunds: uses (evidence: `backend/app/api/v1/hotel_ops.py`)
- Hotel operations → Platform settings: uses (evidence: `backend/app/api/v1/hotel_ops.py`)
- Hotel operations → Document storage: uses (evidence: `backend/app/api/v1/hotel_ops.py`)
- Hotel operations → Notifications: uses (evidence: `backend/app/api/v1/hotel_ops.py`)
- Admin controls → Booking lifecycle: uses (evidence: `backend/app/api/v1/admin.py`)
- Admin controls → Payments and refunds: uses (evidence: `backend/app/api/v1/admin.py`)
- Admin controls → Platform settings: uses (evidence: `backend/app/api/v1/admin.py`)
- Admin controls → Audit logging: uses (evidence: `backend/app/api/v1/admin.py`)
- Hotel approvals → Audit logging: uses (evidence: `backend/app/api/v1/admin_hotels.py`)
- Hotel approvals → Document storage: uses (evidence: `backend/app/api/v1/admin_hotels.py`)
- Hotel approvals → Notifications: uses (evidence: `backend/app/api/v1/admin_hotels.py`)
- Reviews → Review search: uses
- Reviews → Notifications: notifies (evidence: `backend/app/api/v1/reviews.py`)
- API application → Database setup: creates (evidence: `backend/app/main.py`)
- Database setup → PostgreSQL: connects
- API application → Background jobs: configures tasks (evidence: `backend/app/main.py`)
- AI assistant runtime → Language model: uses (evidence: `backend/app/agent/runtime.py`)
- Language model → Groq: calls
- Manager assistant tools → Hotel operations: calls (evidence: `backend/app/agent/manager_tools.py`)
- Chat interface → AI assistant runtime: sends chat
- Booking checkout → Guest API routes: submits booking
- Booking checkout → Payment routes: submits payment
- Hotel onboarding → Authentication and access: requires access
