# homestaypdy-eng/sri-apartment-os10 architecture

> Architecture diagram of the GitHub repository homestaypdy-eng/sri-apartment-os10, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/homestaypdy-eng/sri-apartment-os10
- Repository: https://github.com/homestaypdy-eng/sri-apartment-os10

## Overview

Sri Apartment OS is a property-operations platform with staff and guest-facing web flows backed by a modular API. The main workflow spans property availability and booking management, operational work, financial reconciliation, and reporting; separate customer and guest authentication support the portals. The README documents additional operational modules and notification channels. Several backend modules are represented at their exact directory paths because their implementation was not sampled; their internal call relationships are therefore not inferred.

Main entry points: [`backend/app/main.py`](https://github.com/homestaypdy-eng/sri-apartment-os10/blob/main/backend/app/main.py) (Backend API), [`frontend/src/App.tsx`](https://github.com/homestaypdy-eng/sri-apartment-os10/blob/main/frontend/src/App.tsx) (Staff web app), [`backend/app/modules/auth`](https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/auth) (Staff authentication), [`backend/app/modules/portal`](https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/portal) (Guest authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_webapp["Staff web app<br/>[App.tsx]"]
  node_api["API client<br/>[api.ts]"]
end

subgraph group_booking["Booking and access"]
  node_staffauth["Staff authentication"]
  node_guestauth["Guest authentication"]
  node_customerauth["Customer authentication"]
  node_properties["Properties and availability"]
  node_publicbooking["Public booking"]
  node_bookings["Bookings<br/>[models.py]"]
end

subgraph group_operations["Property operations"]
  node_guestrequests["Guest requests"]
  node_housekeeping["Housekeeping"]
  node_maintenance["Maintenance"]
  node_inventory["Inventory"]
  node_staffops["Staff operations"]
end

subgraph group_business["Business intelligence"]
  node_finance["Finance and payments"]
  node_reports["Reports and analytics"]
  node_automation["Automation"]
end

subgraph group_platform["Platform services"]
  node_notifications["Notifications<br/>[service.py]"]
  node_audit["Audit trail"]
  node_settings["Business settings<br/>[router.py]"]
  node_zotel["Zotel channel sync"]
  node_database[("Database<br/>[session.py]")]
  node_backend["Backend API<br/>[main.py]"]
end

node_staff(("Staff user"))
node_guest(("Guest"))

node_staff -->|"uses"| node_webapp
node_guest -.->|"signs in"| node_guestauth
node_webapp -.->|"requests data"| node_api
node_backend -->|"mounts routes"| node_staffauth
node_backend -->|"mounts routes"| node_bookings
node_backend -->|"mounts routes"| node_properties
node_backend -->|"mounts routes"| node_guestauth
node_backend -->|"mounts routes"| node_customerauth
node_backend -->|"mounts routes"| node_finance
node_backend -->|"mounts routes"| node_guestrequests
node_backend -->|"mounts routes"| node_notifications
node_backend -.->|"configures"| node_database
node_backend -.->|"serves module"| node_housekeeping
node_backend -.->|"serves module"| node_maintenance
node_backend -.->|"serves module"| node_inventory
node_backend -.->|"serves module"| node_staffops
node_backend -.->|"serves module"| node_reports
node_backend -.->|"serves module"| node_automation
node_backend -.->|"serves module"| node_publicbooking
node_backend -->|"mounts routes"| node_audit
node_backend -.->|"mounts routes"| node_settings
node_backend -.->|"mounts routes"| node_zotel
node_backend -.->|"uses security"| node_staffauth

click node_webapp "https://github.com/homestaypdy-eng/sri-apartment-os10/blob/main/frontend/src/App.tsx"
click node_api "https://github.com/homestaypdy-eng/sri-apartment-os10/blob/main/frontend/src/lib/api.ts"
click node_staffauth "https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/auth"
click node_guestauth "https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/portal"
click node_customerauth "https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/customer_auth"
click node_properties "https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/properties"
click node_publicbooking "https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/public_booking"
click node_bookings "https://github.com/homestaypdy-eng/sri-apartment-os10/blob/main/backend/app/modules/bookings/models.py"
click node_guestrequests "https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/inquiries"
click node_housekeeping "https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/housekeeping"
click node_maintenance "https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/maintenance"
click node_inventory "https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/inventory"
click node_staffops "https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/staff_ops"
click node_finance "https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/finance"
click node_reports "https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/reports"
click node_automation "https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/automation"
click node_notifications "https://github.com/homestaypdy-eng/sri-apartment-os10/blob/main/backend/app/modules/notifications/service.py"
click node_audit "https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/audit"
click node_settings "https://github.com/homestaypdy-eng/sri-apartment-os10/blob/main/backend/app/modules/settings/router.py"
click node_zotel "https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/zotel"
click node_database "https://github.com/homestaypdy-eng/sri-apartment-os10/blob/main/backend/app/db/session.py"
click node_backend "https://github.com/homestaypdy-eng/sri-apartment-os10/blob/main/backend/app/main.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_webapp,node_api,node_staff toneBlue
class node_staffauth,node_guestauth,node_customerauth,node_properties,node_publicbooking,node_bookings toneAmber
class node_guestrequests,node_housekeeping,node_maintenance,node_inventory,node_staffops toneMint
class node_finance,node_reports,node_automation toneRose
class node_notifications,node_audit,node_settings,node_zotel,node_database,node_backend,node_guest toneIndigo
```

## Components

### Web application

- [Staff web app](https://github.com/homestaypdy-eng/sri-apartment-os10/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [API client](https://github.com/homestaypdy-eng/sri-apartment-os10/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`

### Booking and access

- [Staff authentication](https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/auth): `backend/app/modules/auth`
- [Guest authentication](https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/portal): `backend/app/modules/portal`
- [Customer authentication](https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/customer_auth): `backend/app/modules/customer_auth`
- [Properties and availability](https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/properties): `backend/app/modules/properties`
- [Public booking](https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/public_booking): `backend/app/modules/public_booking`
- [Bookings](https://github.com/homestaypdy-eng/sri-apartment-os10/blob/main/backend/app/modules/bookings/models.py): `backend/app/modules/bookings/models.py`

### Property operations

- [Guest requests](https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/inquiries): `backend/app/modules/inquiries`
- [Housekeeping](https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/housekeeping): `backend/app/modules/housekeeping`
- [Maintenance](https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/maintenance): `backend/app/modules/maintenance`
- [Inventory](https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/inventory): `backend/app/modules/inventory`
- [Staff operations](https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/staff_ops): `backend/app/modules/staff_ops`

### Business intelligence

- [Finance and payments](https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/finance): `backend/app/modules/finance`
- [Reports and analytics](https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/reports): `backend/app/modules/reports`
- [Automation](https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/automation): `backend/app/modules/automation`

### Platform services

- [Notifications](https://github.com/homestaypdy-eng/sri-apartment-os10/blob/main/backend/app/modules/notifications/service.py): `backend/app/modules/notifications/service.py`
- [Audit trail](https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/audit): `backend/app/modules/audit`
- [Business settings](https://github.com/homestaypdy-eng/sri-apartment-os10/blob/main/backend/app/modules/settings/router.py): `backend/app/modules/settings/router.py`
- [Zotel channel sync](https://github.com/homestaypdy-eng/sri-apartment-os10/tree/main/backend/app/modules/zotel): `backend/app/modules/zotel`
- [Database](https://github.com/homestaypdy-eng/sri-apartment-os10/blob/main/backend/app/db/session.py): `backend/app/db/session.py`
- [Backend API](https://github.com/homestaypdy-eng/sri-apartment-os10/blob/main/backend/app/main.py): `backend/app/main.py`

### Other components

- **Staff user**
- **Guest**

## Connections

- Staff user → Staff web app: uses (evidence: `frontend/src/App.tsx`)
- Guest → Guest authentication: signs in
- Staff web app → API client: requests data
- Backend API → Staff authentication: mounts routes (evidence: `backend/app/main.py`)
- Backend API → Bookings: mounts routes (evidence: `backend/app/main.py`)
- Backend API → Properties and availability: mounts routes (evidence: `backend/app/main.py`)
- Backend API → Guest authentication: mounts routes (evidence: `backend/app/main.py`)
- Backend API → Customer authentication: mounts routes (evidence: `backend/app/main.py`)
- Backend API → Finance and payments: mounts routes (evidence: `backend/app/main.py`)
- Backend API → Guest requests: mounts routes (evidence: `backend/app/main.py`)
- Backend API → Notifications: mounts routes (evidence: `backend/app/main.py`)
- Backend API → Database: configures
- Backend API → Housekeeping: serves module (evidence: `backend/app/main.py`)
- Backend API → Maintenance: serves module (evidence: `backend/app/main.py`)
- Backend API → Inventory: serves module (evidence: `backend/app/main.py`)
- Backend API → Staff operations: serves module (evidence: `backend/app/main.py`)
- Backend API → Reports and analytics: serves module (evidence: `backend/app/main.py`)
- Backend API → Automation: serves module
- Backend API → Public booking: serves module (evidence: `backend/app/main.py`)
- Backend API → Audit trail: mounts routes (evidence: `backend/app/main.py`)
- Backend API → Business settings: mounts routes (evidence: `backend/app/main.py`)
- Backend API → Zotel channel sync: mounts routes (evidence: `backend/app/main.py`)
- Backend API → Staff authentication: uses security (evidence: `backend/app/main.py`)
