# prabugandhi1977/expense360 architecture

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

## Overview

Expense360 is a browser-based expense and budget demo implemented entirely in `index.html`. Users sign in, work with expenses or per-diem recommendations, and Finance users review actions, alerts, and approvals; decisions are audited. The README documents receipt OCR and translation, currency conversion, forecasting, anomaly detection, and policy lookups as additional capabilities. Relationships below are based on README statements only: no source excerpts were provided, so implementation details beyond those statements are omitted.

Main entry points: [`index.html`](https://github.com/prabugandhi1977/expense360/blob/main/index.html) (Expense360 console)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_app["Expense360 console<br/>[index.html]"]
  node_signin["Sign-in and roles<br/>[index.html]"]
  node_navigation["Navigation and theme<br/>[index.html]"]
  node_digest["Action Digest<br/>[index.html]"]
end

subgraph group_expense["Expense workflow"]
  node_expenseform["Expense forms<br/>[index.html]"]
  node_receipt["Receipt scanning<br/>[index.html]"]
  node_transactions["Transactions<br/>[index.html]"]
  node_fx["FX rates<br/>[index.html]"]
end

subgraph group_insights["Recommendations and monitoring"]
  node_recommendations["Per-diem recommendations<br/>[index.html]"]
  node_budgetalerts["Budget alerts<br/>[index.html]"]
  node_anomalies["Anomaly detection<br/>[index.html]"]
  node_forecast["Spend forecast<br/>[index.html]"]
  node_policy["Policy Assistant<br/>[index.html]"]
end

subgraph group_admin["Administration and records"]
  node_projects["Project Master<br/>[index.html]"]
  node_loginaettings["Login Settings<br/>[index.html]"]
  node_audit["Audit log<br/>[index.html]"]
  node_state[("Browser localStorage")]
end

node_employee(("Employee"))
node_finance(("Finance user"))
node_ocr["Tesseract OCR"]
node_translation["MyMemory API"]
node_fxservice["Exchange rates API"]

node_employee -->|"signs in"| node_signin
node_finance -->|"signs in"| node_signin
node_signin -->|"opens console"| node_app
node_app -->|"provides navigation"| node_navigation
node_app -->|"provides tab"| node_digest
node_employee -->|"submits expenses"| node_expenseform
node_expenseform -->|"scans receipts"| node_receipt
node_receipt -.->|"loads on demand"| node_ocr
node_receipt -.->|"translates bill text"| node_translation
node_expenseform -->|"adds expenses"| node_transactions
node_transactions -->|"converts spend"| node_fx
node_fx -.->|"fetches rates"| node_fxservice
node_transactions -->|"refreshes on new expense"| node_recommendations
node_recommendations -->|"re-scans business units"| node_budgetalerts
node_transactions -->|"checks anomalies"| node_anomalies
node_transactions -->|"compares spend to budget"| node_forecast
node_employee -->|"asks policy questions"| node_policy
node_policy -->|"looks up current state"| node_app
node_finance -->|"reviews decisions"| node_recommendations
node_finance -->|"acknowledges alerts"| node_budgetalerts
node_finance -->|"acts on pending items"| node_digest
node_finance -->|"confirms approvals"| node_transactions
node_recommendations -->|"records decisions"| node_audit
node_budgetalerts -->|"records acknowledgements"| node_audit
node_app -->|"tracks project budgets"| node_projects
node_app -->|"configures sign-in"| node_loginaettings
node_app -->|"persists browser state"| node_state

click node_app "https://github.com/prabugandhi1977/expense360/blob/main/index.html"
click node_signin "https://github.com/prabugandhi1977/expense360/blob/main/index.html"
click node_navigation "https://github.com/prabugandhi1977/expense360/blob/main/index.html"
click node_digest "https://github.com/prabugandhi1977/expense360/blob/main/index.html"
click node_expenseform "https://github.com/prabugandhi1977/expense360/blob/main/index.html"
click node_receipt "https://github.com/prabugandhi1977/expense360/blob/main/index.html"
click node_transactions "https://github.com/prabugandhi1977/expense360/blob/main/index.html"
click node_fx "https://github.com/prabugandhi1977/expense360/blob/main/index.html"
click node_recommendations "https://github.com/prabugandhi1977/expense360/blob/main/index.html"
click node_budgetalerts "https://github.com/prabugandhi1977/expense360/blob/main/index.html"
click node_anomalies "https://github.com/prabugandhi1977/expense360/blob/main/index.html"
click node_forecast "https://github.com/prabugandhi1977/expense360/blob/main/index.html"
click node_policy "https://github.com/prabugandhi1977/expense360/blob/main/index.html"
click node_projects "https://github.com/prabugandhi1977/expense360/blob/main/index.html"
click node_loginaettings "https://github.com/prabugandhi1977/expense360/blob/main/index.html"
click node_audit "https://github.com/prabugandhi1977/expense360/blob/main/index.html"

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_signin,node_navigation,node_digest,node_finance toneBlue
class node_expenseform,node_receipt,node_transactions,node_fx toneAmber
class node_recommendations,node_budgetalerts,node_anomalies,node_forecast,node_policy,node_translation,node_fxservice toneMint
class node_projects,node_loginaettings,node_audit,node_state toneRose
class node_employee,node_ocr toneIndigo
```

## Components

### User interface

- [Expense360 console](https://github.com/prabugandhi1977/expense360/blob/main/index.html): `index.html`
- [Sign-in and roles](https://github.com/prabugandhi1977/expense360/blob/main/index.html): `index.html`
- [Navigation and theme](https://github.com/prabugandhi1977/expense360/blob/main/index.html): `index.html`
- [Action Digest](https://github.com/prabugandhi1977/expense360/blob/main/index.html): `index.html`

### Expense workflow

- [Expense forms](https://github.com/prabugandhi1977/expense360/blob/main/index.html): `index.html`
- [Receipt scanning](https://github.com/prabugandhi1977/expense360/blob/main/index.html): `index.html`
- [Transactions](https://github.com/prabugandhi1977/expense360/blob/main/index.html): `index.html`
- [FX rates](https://github.com/prabugandhi1977/expense360/blob/main/index.html): `index.html`

### Recommendations and monitoring

- [Per-diem recommendations](https://github.com/prabugandhi1977/expense360/blob/main/index.html): `index.html`
- [Budget alerts](https://github.com/prabugandhi1977/expense360/blob/main/index.html): `index.html`
- [Anomaly detection](https://github.com/prabugandhi1977/expense360/blob/main/index.html): `index.html`
- [Spend forecast](https://github.com/prabugandhi1977/expense360/blob/main/index.html): `index.html`
- [Policy Assistant](https://github.com/prabugandhi1977/expense360/blob/main/index.html): `index.html`

### Administration and records

- [Project Master](https://github.com/prabugandhi1977/expense360/blob/main/index.html): `index.html`
- [Login Settings](https://github.com/prabugandhi1977/expense360/blob/main/index.html): `index.html`
- [Audit log](https://github.com/prabugandhi1977/expense360/blob/main/index.html): `index.html`
- **Browser localStorage**

### Other components

- **Employee**
- **Finance user**
- **Tesseract OCR**
- **MyMemory API**
- **Exchange rates API**

## Connections

- Employee → Sign-in and roles: signs in (evidence: `README.md`)
- Finance user → Sign-in and roles: signs in (evidence: `README.md`)
- Sign-in and roles → Expense360 console: opens console (evidence: `README.md`)
- Expense360 console → Navigation and theme: provides navigation (evidence: `README.md`)
- Expense360 console → Action Digest: provides tab (evidence: `README.md`)
- Employee → Expense forms: submits expenses (evidence: `README.md`)
- Expense forms → Receipt scanning: scans receipts (evidence: `README.md`)
- Receipt scanning → Tesseract OCR: loads on demand (evidence: `README.md`)
- Receipt scanning → MyMemory API: translates bill text (evidence: `README.md`)
- Expense forms → Transactions: adds expenses (evidence: `README.md`)
- Transactions → FX rates: converts spend (evidence: `README.md`)
- FX rates → Exchange rates API: fetches rates (evidence: `README.md`)
- Transactions → Per-diem recommendations: refreshes on new expense (evidence: `README.md`)
- Per-diem recommendations → Budget alerts: re-scans business units (evidence: `README.md`)
- Transactions → Anomaly detection: checks anomalies (evidence: `README.md`)
- Transactions → Spend forecast: compares spend to budget (evidence: `README.md`)
- Employee → Policy Assistant: asks policy questions (evidence: `README.md`)
- Policy Assistant → Expense360 console: looks up current state (evidence: `README.md`)
- Finance user → Per-diem recommendations: reviews decisions (evidence: `README.md`)
- Finance user → Budget alerts: acknowledges alerts (evidence: `README.md`)
- Finance user → Action Digest: acts on pending items (evidence: `README.md`)
- Finance user → Transactions: confirms approvals (evidence: `README.md`)
- Per-diem recommendations → Audit log: records decisions (evidence: `README.md`)
- Budget alerts → Audit log: records acknowledgements (evidence: `README.md`)
- Expense360 console → Project Master: tracks project budgets (evidence: `README.md`)
- Expense360 console → Login Settings: configures sign-in (evidence: `README.md`)
- Expense360 console → Browser localStorage: persists browser state (evidence: `README.md`)
