# jayanthmalipeddy/uae-loan-analyzer architecture

> Architecture diagram of the GitHub repository jayanthmalipeddy/uae-loan-analyzer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jayanthmalipeddy/uae-loan-analyzer
- Repository: https://github.com/jayanthmalipeddy/uae-loan-analyzer

## Overview

This Streamlit app turns a borrower’s Excel/CSV loan data into portfolio analysis and repayment scenarios, then connects a selected loan to an EMI what-if calculator. The graph separates the analyzer’s data-processing stages from its dashboard views and the calculator’s planning views. Several feature-level nodes share page or engine files because their implementations live together; those finer relationships rely on README descriptions where excerpts do not show the full rendering code.

Main entry points: [`src/emi_calculator/analyzer.py`](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer.py) (Loan analysis), [`src/emi_calculator/core.py`](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/core.py) (EMI and amortization), [`app.py`](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/app.py) (App router), [`src/emi_calculator/calculator_page.py`](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/calculator_page.py) (Scenario inputs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App shell"]
  node_app["App router<br/>[app.py]"]
end

subgraph group_analysis["Loan analysis"]
  node_upload["File upload<br/>[analyzer_page.py]"]
  node_clean["Clean and validate<br/>[analyzer.py]"]
  node_loan_engine["Loan analysis<br/>[analyzer.py]"]
  node_summary["Portfolio overview<br/>[analyzer_page.py]"]
  node_projection["Balance projections<br/>[analyzer_page.py]"]
  node_insights["Portfolio insights<br/>[analyzer_page.py]"]
  node_breakdown["Loan breakdown<br/>[analyzer_page.py]"]
  node_repayment_analysis["Repayment analysis<br/>[analyzer_page.py]"]
  node_scenario["Scenario planner<br/>[analyzer_page.py]"]
  node_export["Analysis export<br/>[analyzer_page.py]"]
  node_handoff["Calculator hand-off<br/>[analyzer_page.py]"]
end

subgraph group_planning["EMI planning"]
  node_calc_inputs["Scenario inputs<br/>[calculator_page.py]"]
  node_estimate["Repayment estimate<br/>[calculator_page.py]"]
  node_journey["Repayment journey<br/>[calculator_page.py]"]
  node_schedule["Monthly schedule<br/>[calculator_page.py]"]
  node_comparison["Loan comparison<br/>[calculator_page.py]"]
  node_schedule_export["Schedule export<br/>[calculator_page.py]"]
end

subgraph group_shared["Shared presentation and math"]
  node_math["EMI and amortization<br/>[core.py]"]
  node_styles["App styling<br/>[styles.py]"]
end

node_borrower(("Borrower"))

node_borrower -->|"opens app"| node_app
node_app -->|"routes by default"| node_upload
node_app -->|"routes on selection"| node_calc_inputs
node_app -->|"applies styles"| node_styles
node_borrower -->|"provides loan file"| node_upload
node_upload -->|"reads and cleans"| node_clean
node_clean -->|"normalizes loans"| node_loan_engine
node_loan_engine -->|"calculates schedules"| node_math
node_loan_engine -->|"supplies analysis"| node_summary
node_loan_engine -->|"supplies projections"| node_projection
node_loan_engine -->|"supplies metrics"| node_insights
node_loan_engine -->|"supplies loan details"| node_breakdown
node_loan_engine -->|"supplies yearly data"| node_repayment_analysis
node_loan_engine -->|"supplies loan schedule"| node_scenario
node_loan_engine -->|"supplies analysis data"| node_export
node_scenario -->|"prefills scenario"| node_handoff
node_handoff -->|"loads loan terms"| node_calc_inputs
node_calc_inputs -->|"calculates EMI"| node_math
node_math -->|"returns estimate"| node_estimate
node_math -->|"provides schedule"| node_journey
node_math -->|"provides schedule"| node_schedule
node_calc_inputs -->|"compares products"| node_comparison
node_schedule -->|"exports schedule"| node_schedule_export

click node_app "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/app.py"
click node_upload "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py"
click node_clean "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer.py"
click node_loan_engine "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer.py"
click node_summary "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py"
click node_projection "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py"
click node_insights "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py"
click node_breakdown "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py"
click node_repayment_analysis "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py"
click node_scenario "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py"
click node_export "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py"
click node_handoff "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py"
click node_calc_inputs "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/calculator_page.py"
click node_estimate "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/calculator_page.py"
click node_journey "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/calculator_page.py"
click node_schedule "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/calculator_page.py"
click node_comparison "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/calculator_page.py"
click node_schedule_export "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/calculator_page.py"
click node_math "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/core.py"
click node_styles "https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/styles.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_app toneBlue
class node_upload,node_clean,node_loan_engine,node_summary,node_projection,node_insights,node_breakdown,node_repayment_analysis,node_scenario,node_export,node_handoff toneAmber
class node_calc_inputs,node_estimate,node_journey,node_schedule,node_comparison,node_schedule_export toneMint
class node_math,node_styles toneRose
class node_borrower toneIndigo
```

## Components

### App shell

- [App router](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/app.py): `app.py`

### Loan analysis

- [File upload](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py): `src/emi_calculator/analyzer_page.py`
- [Clean and validate](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer.py): `src/emi_calculator/analyzer.py`
- [Loan analysis](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer.py): `src/emi_calculator/analyzer.py`
- [Portfolio overview](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py): `src/emi_calculator/analyzer_page.py`
- [Balance projections](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py): `src/emi_calculator/analyzer_page.py`
- [Portfolio insights](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py): `src/emi_calculator/analyzer_page.py`
- [Loan breakdown](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py): `src/emi_calculator/analyzer_page.py`
- [Repayment analysis](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py): `src/emi_calculator/analyzer_page.py`
- [Scenario planner](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py): `src/emi_calculator/analyzer_page.py`
- [Analysis export](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py): `src/emi_calculator/analyzer_page.py`
- [Calculator hand-off](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/analyzer_page.py): `src/emi_calculator/analyzer_page.py`

### EMI planning

- [Scenario inputs](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/calculator_page.py): `src/emi_calculator/calculator_page.py`
- [Repayment estimate](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/calculator_page.py): `src/emi_calculator/calculator_page.py`
- [Repayment journey](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/calculator_page.py): `src/emi_calculator/calculator_page.py`
- [Monthly schedule](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/calculator_page.py): `src/emi_calculator/calculator_page.py`
- [Loan comparison](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/calculator_page.py): `src/emi_calculator/calculator_page.py`
- [Schedule export](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/calculator_page.py): `src/emi_calculator/calculator_page.py`

### Shared presentation and math

- [EMI and amortization](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/core.py): `src/emi_calculator/core.py`
- [App styling](https://github.com/jayanthmalipeddy/uae-loan-analyzer/blob/main/src/emi_calculator/styles.py): `src/emi_calculator/styles.py`

### Other components

- **Borrower**

## Connections

- Borrower → App router: opens app (evidence: `README.md`)
- App router → File upload: routes by default (evidence: `app.py`)
- App router → Scenario inputs: routes on selection (evidence: `app.py`)
- App router → App styling: applies styles (evidence: `app.py`)
- Borrower → File upload: provides loan file (evidence: `README.md`)
- File upload → Clean and validate: reads and cleans (evidence: `src/emi_calculator/analyzer_page.py`)
- Clean and validate → Loan analysis: normalizes loans (evidence: `README.md`)
- Loan analysis → EMI and amortization: calculates schedules (evidence: `src/emi_calculator/analyzer.py`)
- Loan analysis → Portfolio overview: supplies analysis (evidence: `README.md`)
- Loan analysis → Balance projections: supplies projections (evidence: `README.md`)
- Loan analysis → Portfolio insights: supplies metrics (evidence: `README.md`)
- Loan analysis → Loan breakdown: supplies loan details (evidence: `README.md`)
- Loan analysis → Repayment analysis: supplies yearly data (evidence: `README.md`)
- Loan analysis → Scenario planner: supplies loan schedule (evidence: `README.md`)
- Loan analysis → Analysis export: supplies analysis data (evidence: `README.md`)
- Scenario planner → Calculator hand-off: prefills scenario (evidence: `README.md`)
- Calculator hand-off → Scenario inputs: loads loan terms (evidence: `src/emi_calculator/analyzer_page.py`)
- Scenario inputs → EMI and amortization: calculates EMI (evidence: `src/emi_calculator/calculator_page.py`)
- EMI and amortization → Repayment estimate: returns estimate (evidence: `README.md`)
- EMI and amortization → Repayment journey: provides schedule (evidence: `README.md`)
- EMI and amortization → Monthly schedule: provides schedule (evidence: `README.md`)
- Scenario inputs → Loan comparison: compares products (evidence: `README.md`)
- Monthly schedule → Schedule export: exports schedule (evidence: `README.md`)
