# sleeplesslh/airost_finance_hub architecture

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

- Interactive diagram: https://gitdiagram.com/sleeplesslh/airost_finance_hub
- Repository: https://github.com/sleeplesslh/airost_finance_hub

## Overview

AIROST Finance Hub is a Flask reimbursement and event-finance application. Members submit and track claims; treasurers review them against budgets and record payments; administrators manage users, events, and audit history. The graph follows these domain stages and includes shared persistence, upload/AI support, reporting, and notifications. Evidence is limited to the supplied README and source excerpts/index; optional AI and email connections are documented, but some route internals were not sampled.

Main entry points: [`routes/claims.py`](https://github.com/sleeplesslh/airost_finance_hub/blob/main/routes/claims.py) (Claim workflow), [`models.py`](https://github.com/sleeplesslh/airost_finance_hub/blob/main/models.py) (Domain models), [`app.py`](https://github.com/sleeplesslh/airost_finance_hub/blob/main/app.py) (Flask application), [`routes/admin.py`](https://github.com/sleeplesslh/airost_finance_hub/blob/main/routes/admin.py) (User and event admin)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Claims and payments"]
  node_claims["Claim workflow<br/>[claims.py]"]
  node_receipt_storage["Receipt storage<br/>[file_upload.py]"]
  node_claim_history["Claim history<br/>[timeline.py]"]
  node_payments["Payment records<br/>[claims.py]"]
  node_ai_receipts["AI receipt analysis<br/>[receipt_ai.py]"]
end

subgraph group_operations["Budgets and reports"]
  node_budgets["Event budgets<br/>[budget.py]"]
  node_dashboard["Dashboards<br/>[dashboard.py]"]
  node_reports["Event reports<br/>[claims.py]"]
  node_claim_listing["Claim search<br/>[listing.py]"]
  node_ai_review["AI review and summary<br/>[claims.py]"]
end

subgraph group_management["Accounts and events"]
  node_auth["Sign-in<br/>[auth.py]"]
  node_admin_ops["User and event admin<br/>[admin.py]"]
  node_profile["Profile settings<br/>[profile.py]"]
end

subgraph group_shared["Shared services"]
  node_notifications["Email notifications<br/>[notifications.py]"]
  node_audit["Audit records<br/>[audit.py]"]
  node_models["Domain models<br/>[models.py]"]
  node_database[("SQLAlchemy database<br/>[database.py]")]
  node_app["Flask application<br/>[app.py]"]
end

node_member(("Member"))
node_treasurer(("Treasurer"))
node_admin(("Administrator"))
node_brevo["Brevo email API"]

node_member -->|"signs in"| node_auth
node_treasurer -->|"signs in"| node_auth
node_admin -->|"signs in"| node_auth
node_member -->|"submits and tracks"| node_claims
node_treasurer -->|"reviews claims"| node_claims
node_claims -->|"saves uploads"| node_receipt_storage
node_claims -->|"records timeline"| node_claim_history
node_claims -->|"checks budget"| node_budgets
node_treasurer -->|"records payment"| node_payments
node_member -->|"views proof"| node_payments
node_treasurer -->|"sets budgets"| node_budgets
node_treasurer -->|"views expenses"| node_reports
node_reports -.->|"filters claims"| node_claim_listing
node_member -->|"requests analysis"| node_ai_receipts
node_claims -.->|"requests analysis"| node_ai_receipts
node_treasurer -->|"requests assistance"| node_ai_review
node_claims -.->|"provides claim review"| node_ai_review
node_claims -->|"sends status emails"| node_notifications
node_app -->|"runs reminders"| node_notifications
node_notifications -->|"delivers email"| node_brevo
node_admin -->|"manages accounts"| node_admin_ops
node_admin -->|"manages events"| node_admin_ops
node_member -->|"updates profile"| node_profile
node_admin_ops -->|"records actions"| node_audit
node_profile -->|"records actions"| node_audit
node_claims -->|"records actions"| node_audit
node_auth -->|"reads accounts"| node_models
node_claims -->|"reads and writes"| node_models
node_admin_ops -->|"reads and writes"| node_models
node_profile -->|"reads and writes"| node_models
node_audit -->|"creates entries"| node_models
node_budgets -->|"queries records"| node_models
node_dashboard -->|"queries records"| node_models
node_claim_listing -->|"filters records"| node_models
node_claim_history -->|"reads history"| node_models
node_models -->|"declares tables"| node_database
node_app -->|"binds database"| node_database
node_app -->|"registers routes"| node_auth
node_app -->|"registers routes"| node_claims
node_app -.->|"registers routes"| node_admin_ops
node_app -.->|"registers routes"| node_profile

click node_auth "https://github.com/sleeplesslh/airost_finance_hub/blob/main/routes/auth.py"
click node_claims "https://github.com/sleeplesslh/airost_finance_hub/blob/main/routes/claims.py"
click node_receipt_storage "https://github.com/sleeplesslh/airost_finance_hub/blob/main/utils/file_upload.py"
click node_claim_history "https://github.com/sleeplesslh/airost_finance_hub/blob/main/utils/timeline.py"
click node_payments "https://github.com/sleeplesslh/airost_finance_hub/blob/main/routes/claims.py"
click node_budgets "https://github.com/sleeplesslh/airost_finance_hub/blob/main/utils/budget.py"
click node_dashboard "https://github.com/sleeplesslh/airost_finance_hub/blob/main/utils/dashboard.py"
click node_reports "https://github.com/sleeplesslh/airost_finance_hub/blob/main/routes/claims.py"
click node_claim_listing "https://github.com/sleeplesslh/airost_finance_hub/blob/main/utils/listing.py"
click node_ai_receipts "https://github.com/sleeplesslh/airost_finance_hub/blob/main/utils/receipt_ai.py"
click node_ai_review "https://github.com/sleeplesslh/airost_finance_hub/blob/main/routes/claims.py"
click node_notifications "https://github.com/sleeplesslh/airost_finance_hub/blob/main/utils/notifications.py"
click node_admin_ops "https://github.com/sleeplesslh/airost_finance_hub/blob/main/routes/admin.py"
click node_profile "https://github.com/sleeplesslh/airost_finance_hub/blob/main/routes/profile.py"
click node_audit "https://github.com/sleeplesslh/airost_finance_hub/blob/main/utils/audit.py"
click node_models "https://github.com/sleeplesslh/airost_finance_hub/blob/main/models.py"
click node_database "https://github.com/sleeplesslh/airost_finance_hub/blob/main/database.py"
click node_app "https://github.com/sleeplesslh/airost_finance_hub/blob/main/app.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_claims,node_receipt_storage,node_claim_history,node_payments,node_ai_receipts toneBlue
class node_budgets,node_dashboard,node_reports,node_claim_listing,node_ai_review toneAmber
class node_auth,node_admin_ops,node_profile,node_brevo toneMint
class node_notifications,node_audit,node_models,node_database,node_app toneRose
class node_member,node_treasurer,node_admin toneIndigo
```

## Components

### Claims and payments

- [Claim workflow](https://github.com/sleeplesslh/airost_finance_hub/blob/main/routes/claims.py): `routes/claims.py`
- [Receipt storage](https://github.com/sleeplesslh/airost_finance_hub/blob/main/utils/file_upload.py): `utils/file_upload.py`
- [Claim history](https://github.com/sleeplesslh/airost_finance_hub/blob/main/utils/timeline.py): `utils/timeline.py`
- [Payment records](https://github.com/sleeplesslh/airost_finance_hub/blob/main/routes/claims.py): `routes/claims.py`
- [AI receipt analysis](https://github.com/sleeplesslh/airost_finance_hub/blob/main/utils/receipt_ai.py): `utils/receipt_ai.py`

### Budgets and reports

- [Event budgets](https://github.com/sleeplesslh/airost_finance_hub/blob/main/utils/budget.py): `utils/budget.py`
- [Dashboards](https://github.com/sleeplesslh/airost_finance_hub/blob/main/utils/dashboard.py): `utils/dashboard.py`
- [Event reports](https://github.com/sleeplesslh/airost_finance_hub/blob/main/routes/claims.py): `routes/claims.py`
- [Claim search](https://github.com/sleeplesslh/airost_finance_hub/blob/main/utils/listing.py): `utils/listing.py`
- [AI review and summary](https://github.com/sleeplesslh/airost_finance_hub/blob/main/routes/claims.py): `routes/claims.py`

### Accounts and events

- [Sign-in](https://github.com/sleeplesslh/airost_finance_hub/blob/main/routes/auth.py): `routes/auth.py`
- [User and event admin](https://github.com/sleeplesslh/airost_finance_hub/blob/main/routes/admin.py): `routes/admin.py`
- [Profile settings](https://github.com/sleeplesslh/airost_finance_hub/blob/main/routes/profile.py): `routes/profile.py`

### Shared services

- [Email notifications](https://github.com/sleeplesslh/airost_finance_hub/blob/main/utils/notifications.py): `utils/notifications.py`
- [Audit records](https://github.com/sleeplesslh/airost_finance_hub/blob/main/utils/audit.py): `utils/audit.py`
- [Domain models](https://github.com/sleeplesslh/airost_finance_hub/blob/main/models.py): `models.py`
- [SQLAlchemy database](https://github.com/sleeplesslh/airost_finance_hub/blob/main/database.py): `database.py`
- [Flask application](https://github.com/sleeplesslh/airost_finance_hub/blob/main/app.py): `app.py`

### Other components

- **Member**
- **Treasurer**
- **Administrator**
- **Brevo email API**

## Connections

- Member → Sign-in: signs in (evidence: `README.md`)
- Treasurer → Sign-in: signs in (evidence: `README.md`)
- Administrator → Sign-in: signs in (evidence: `README.md`)
- Member → Claim workflow: submits and tracks (evidence: `README.md`)
- Treasurer → Claim workflow: reviews claims (evidence: `README.md`)
- Claim workflow → Receipt storage: saves uploads (evidence: `routes/claims.py`)
- Claim workflow → Claim history: records timeline (evidence: `routes/claims.py`)
- Claim workflow → Event budgets: checks budget (evidence: `routes/claims.py`)
- Treasurer → Payment records: records payment (evidence: `README.md`)
- Member → Payment records: views proof (evidence: `README.md`)
- Treasurer → Event budgets: sets budgets (evidence: `README.md`)
- Treasurer → Event reports: views expenses (evidence: `README.md`)
- Event reports → Claim search: filters claims (evidence: `routes/claims.py`)
- Member → AI receipt analysis: requests analysis (evidence: `README.md`)
- Claim workflow → AI receipt analysis: requests analysis (evidence: `routes/claims.py`)
- Treasurer → AI review and summary: requests assistance (evidence: `README.md`)
- Claim workflow → AI review and summary: provides claim review (evidence: `routes/claims.py`)
- Claim workflow → Email notifications: sends status emails (evidence: `routes/claims.py`)
- Flask application → Email notifications: runs reminders (evidence: `app.py`)
- Email notifications → Brevo email API: delivers email (evidence: `utils/notifications.py`)
- Administrator → User and event admin: manages accounts (evidence: `README.md`)
- Administrator → User and event admin: manages events (evidence: `README.md`)
- Member → Profile settings: updates profile (evidence: `README.md`)
- User and event admin → Audit records: records actions (evidence: `routes/admin.py`)
- Profile settings → Audit records: records actions (evidence: `routes/profile.py`)
- Claim workflow → Audit records: records actions (evidence: `routes/claims.py`)
- Sign-in → Domain models: reads accounts (evidence: `routes/auth.py`)
- Claim workflow → Domain models: reads and writes (evidence: `routes/claims.py`)
- User and event admin → Domain models: reads and writes (evidence: `routes/admin.py`)
- Profile settings → Domain models: reads and writes (evidence: `routes/profile.py`)
- Audit records → Domain models: creates entries (evidence: `utils/audit.py`)
- Event budgets → Domain models: queries records (evidence: `utils/budget.py`)
- Dashboards → Domain models: queries records (evidence: `utils/dashboard.py`)
- Claim search → Domain models: filters records (evidence: `utils/listing.py`)
- Claim history → Domain models: reads history (evidence: `utils/timeline.py`)
- Domain models → SQLAlchemy database: declares tables (evidence: `models.py`)
- Flask application → SQLAlchemy database: binds database (evidence: `app.py`)
- Flask application → Sign-in: registers routes (evidence: `app.py`)
- Flask application → Claim workflow: registers routes (evidence: `app.py`)
- Flask application → User and event admin: registers routes (evidence: `app.py`)
- Flask application → Profile settings: registers routes (evidence: `app.py`)
