# xeeshan-dev/kiraya-haa architecture

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

- Interactive diagram: https://gitdiagram.com/xeeshan-dev/kiraya-haa
- Repository: https://github.com/xeeshan-dev/kiraya-haa

## Overview

KIRAYA-HAA is a Flask rental marketplace: renters and owners use the site to browse approved properties, contact owners, and manage listings; administrators review listings and manage accounts. The main runtime is organized around Flask blueprints, with SQLAlchemy models for persistent marketplace state and utilities for listing photos. The excerpts show the principal routes and several integrations; some README-described capabilities cannot be verified because the README is empty and not all source files were sampled.

Main entry points: [`kiraya_haa/app.py`](https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/app.py) (Flask app), [`kiraya_haa/blueprints/admin/routes.py`](https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/admin/routes.py) (Admin operations), [`kiraya_haa/blueprints/listings/routes.py`](https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/listings/routes.py) (Listing browse and manage), [`kiraya_haa/blueprints/auth/routes.py`](https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/auth/routes.py) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Flask app<br/>[app.py]"]
  node_config["App configuration<br/>[config.py]"]
  node_extensions["Flask extensions<br/>[extensions.py]"]
  node_site_views["Site templates"]
end

subgraph group_market["Marketplace"]
  node_listing_routes["Listing browse and manage<br/>[routes.py]"]
  node_listing_forms["Listing and search forms<br/>[forms.py]"]
  node_photo_utils["Photo handling<br/>[utils.py]"]
end

subgraph group_accounts["Accounts and inquiries"]
  node_auth_routes["Authentication<br/>[routes.py]"]
  node_auth_forms["Auth forms<br/>[forms.py]"]
  node_inquiry_routes["Inquiry workflow<br/>[routes.py]"]
  node_inquiry_forms["Inquiry forms<br/>[forms.py]"]
end

subgraph group_operations["Administration and storage"]
  node_admin_routes["Admin operations<br/>[routes.py]"]
  node_admin_forms["Admin forms<br/>[forms.py]"]
  node_models[("Marketplace records<br/>[models.py]")]
  node_photo_files["Uploaded photos"]
end

node_renter(("Renter"))
node_owner(("Property owner"))
node_admin_actor(("Administrator"))
node_mail_service["Email service"]

node_renter -.->|"uses site"| node_app
node_owner -.->|"uses site"| node_app
node_admin_actor -.->|"uses site"| node_app
node_app -->|"loads config"| node_config
node_app -->|"initializes"| node_extensions
node_app -->|"registers routes"| node_auth_routes
node_app -->|"registers routes"| node_listing_routes
node_app -->|"registers routes"| node_inquiry_routes
node_app -->|"registers routes"| node_admin_routes
node_app -->|"renders home"| node_site_views
node_app -->|"uses photo URL"| node_photo_utils
node_auth_routes -->|"validates with"| node_auth_forms
node_auth_routes -->|"reads and writes"| node_models
node_auth_routes -->|"uses auth and mail"| node_extensions
node_auth_routes -->|"renders pages"| node_site_views
node_auth_routes -->|"sends reset email"| node_mail_service
node_listing_routes -->|"validates and searches"| node_listing_forms
node_listing_routes -->|"creates inquiry form"| node_inquiry_forms
node_listing_routes -->|"queries and updates"| node_models
node_listing_routes -->|"saves and deletes"| node_photo_utils
node_listing_routes -->|"renders pages"| node_site_views
node_photo_utils -->|"writes and removes"| node_photo_files
node_inquiry_routes -->|"validates with"| node_inquiry_forms
node_inquiry_routes -->|"reads and updates"| node_models
node_inquiry_routes -->|"uses database and mail"| node_extensions
node_inquiry_routes -->|"sends inquiry email"| node_mail_service
node_inquiry_routes -->|"renders inbox"| node_site_views
node_admin_routes -->|"validates with"| node_admin_forms
node_admin_routes -->|"reads and updates"| node_models
node_admin_routes -->|"calls file cleanup"| node_listing_routes
node_admin_routes -->|"uses database and mail"| node_extensions
node_admin_routes -->|"sends rejection email"| node_mail_service
node_admin_routes -->|"renders admin pages"| node_site_views

click node_app "https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/app.py"
click node_config "https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/config.py"
click node_extensions "https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/extensions.py"
click node_site_views "https://github.com/xeeshan-dev/kiraya-haa/tree/main/kiraya_haa/templates"
click node_auth_routes "https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/auth/routes.py"
click node_auth_forms "https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/auth/forms.py"
click node_listing_routes "https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/listings/routes.py"
click node_listing_forms "https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/listings/forms.py"
click node_photo_utils "https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/listings/utils.py"
click node_inquiry_routes "https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/inquiries/routes.py"
click node_inquiry_forms "https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/inquiries/forms.py"
click node_admin_routes "https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/admin/routes.py"
click node_admin_forms "https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/admin/forms.py"
click node_models "https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/models.py"
click node_photo_files "https://github.com/xeeshan-dev/kiraya-haa/tree/main/kiraya_haa/static/uploads"

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_config,node_extensions,node_site_views toneBlue
class node_listing_routes,node_listing_forms,node_photo_utils toneAmber
class node_auth_routes,node_auth_forms,node_inquiry_routes,node_inquiry_forms toneMint
class node_admin_routes,node_admin_forms,node_models,node_photo_files toneRose
class node_renter,node_owner,node_admin_actor,node_mail_service toneIndigo
```

## Components

### Web application

- [Flask app](https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/app.py): `kiraya_haa/app.py`
- [App configuration](https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/config.py): `kiraya_haa/config.py`
- [Flask extensions](https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/extensions.py): `kiraya_haa/extensions.py`
- [Site templates](https://github.com/xeeshan-dev/kiraya-haa/tree/main/kiraya_haa/templates): `kiraya_haa/templates`

### Marketplace

- [Listing browse and manage](https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/listings/routes.py): `kiraya_haa/blueprints/listings/routes.py`
- [Listing and search forms](https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/listings/forms.py): `kiraya_haa/blueprints/listings/forms.py`
- [Photo handling](https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/listings/utils.py): `kiraya_haa/blueprints/listings/utils.py`

### Accounts and inquiries

- [Authentication](https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/auth/routes.py): `kiraya_haa/blueprints/auth/routes.py`
- [Auth forms](https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/auth/forms.py): `kiraya_haa/blueprints/auth/forms.py`
- [Inquiry workflow](https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/inquiries/routes.py): `kiraya_haa/blueprints/inquiries/routes.py`
- [Inquiry forms](https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/inquiries/forms.py): `kiraya_haa/blueprints/inquiries/forms.py`

### Administration and storage

- [Admin operations](https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/admin/routes.py): `kiraya_haa/blueprints/admin/routes.py`
- [Admin forms](https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/blueprints/admin/forms.py): `kiraya_haa/blueprints/admin/forms.py`
- [Marketplace records](https://github.com/xeeshan-dev/kiraya-haa/blob/main/kiraya_haa/models.py): `kiraya_haa/models.py`
- [Uploaded photos](https://github.com/xeeshan-dev/kiraya-haa/tree/main/kiraya_haa/static/uploads): `kiraya_haa/static/uploads`

### Other components

- **Renter**
- **Property owner**
- **Administrator**
- **Email service**

## Connections

- Renter → Flask app: uses site
- Property owner → Flask app: uses site
- Administrator → Flask app: uses site
- Flask app → App configuration: loads config (evidence: `kiraya_haa/app.py`)
- Flask app → Flask extensions: initializes (evidence: `kiraya_haa/app.py`)
- Flask app → Authentication: registers routes (evidence: `kiraya_haa/app.py`)
- Flask app → Listing browse and manage: registers routes (evidence: `kiraya_haa/app.py`)
- Flask app → Inquiry workflow: registers routes (evidence: `kiraya_haa/app.py`)
- Flask app → Admin operations: registers routes (evidence: `kiraya_haa/app.py`)
- Flask app → Site templates: renders home (evidence: `kiraya_haa/app.py`)
- Flask app → Photo handling: uses photo URL (evidence: `kiraya_haa/app.py`)
- Authentication → Auth forms: validates with (evidence: `kiraya_haa/blueprints/auth/routes.py`)
- Authentication → Marketplace records: reads and writes (evidence: `kiraya_haa/blueprints/auth/routes.py`)
- Authentication → Flask extensions: uses auth and mail (evidence: `kiraya_haa/blueprints/auth/routes.py`)
- Authentication → Site templates: renders pages (evidence: `kiraya_haa/blueprints/auth/routes.py`)
- Authentication → Email service: sends reset email (evidence: `kiraya_haa/blueprints/auth/routes.py`)
- Listing browse and manage → Listing and search forms: validates and searches (evidence: `kiraya_haa/blueprints/listings/routes.py`)
- Listing browse and manage → Inquiry forms: creates inquiry form (evidence: `kiraya_haa/blueprints/listings/routes.py`)
- Listing browse and manage → Marketplace records: queries and updates (evidence: `kiraya_haa/blueprints/listings/routes.py`)
- Listing browse and manage → Photo handling: saves and deletes (evidence: `kiraya_haa/blueprints/listings/routes.py`)
- Listing browse and manage → Site templates: renders pages (evidence: `kiraya_haa/blueprints/listings/routes.py`)
- Photo handling → Uploaded photos: writes and removes (evidence: `kiraya_haa/blueprints/listings/utils.py`)
- Inquiry workflow → Inquiry forms: validates with (evidence: `kiraya_haa/blueprints/inquiries/routes.py`)
- Inquiry workflow → Marketplace records: reads and updates (evidence: `kiraya_haa/blueprints/inquiries/routes.py`)
- Inquiry workflow → Flask extensions: uses database and mail (evidence: `kiraya_haa/blueprints/inquiries/routes.py`)
- Inquiry workflow → Email service: sends inquiry email (evidence: `kiraya_haa/blueprints/inquiries/routes.py`)
- Inquiry workflow → Site templates: renders inbox (evidence: `kiraya_haa/blueprints/inquiries/routes.py`)
- Admin operations → Admin forms: validates with (evidence: `kiraya_haa/blueprints/admin/routes.py`)
- Admin operations → Marketplace records: reads and updates (evidence: `kiraya_haa/blueprints/admin/routes.py`)
- Admin operations → Listing browse and manage: calls file cleanup (evidence: `kiraya_haa/blueprints/admin/routes.py`)
- Admin operations → Flask extensions: uses database and mail (evidence: `kiraya_haa/blueprints/admin/routes.py`)
- Admin operations → Email service: sends rejection email (evidence: `kiraya_haa/blueprints/admin/routes.py`)
- Admin operations → Site templates: renders admin pages (evidence: `kiraya_haa/blueprints/admin/routes.py`)
