# patakrishna2006-a11y/financial-calculator architecture

> Architecture diagram of the GitHub repository patakrishna2006-a11y/financial-calculator, 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/patakrishna2006-a11y/financial-calculator
- Repository: https://github.com/patakrishna2006-a11y/financial-calculator

## Overview

FinCalc Pro is a Flask financial-planning web app. Users enter values in the dashboard, submit calculator requests, and receive formatted results; signed-in users can also manage accounts and review saved calculation history. The main calculation engine is separate from the Flask application, while authentication, persistence, market-rate endpoints, and assistant handling are documented or implemented within app.py. The README describes additional calculator, account, and Finny capabilities; source excerpts are partial, so some subsystem links rely on that documentation rather than sampled route code.

Main entry points: [`templates/index.html`](https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/templates/index.html) (Calculator dashboard), [`app.py`](https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/app.py) (Calculator handling), [`templates/login.html`](https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/templates/login.html) (Account pages), [`static/finny.js`](https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/static/finny.js) (Finny assistant widget)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_dashboard["Calculator dashboard<br/>[index.html]"]
  node_auth_pages["Account pages<br/>[login.html]"]
  node_landing["Public landing page<br/>[landing.html]"]
end

subgraph group_finance["Financial tools"]
  node_calc_api["Calculator handling<br/>[app.py]"]
  node_calc_engine["Calculation formulas<br/>[calculator.py]"]
end

subgraph group_accounts["Accounts and data"]
  node_flask["Flask routes and security<br/>[app.py]"]
  node_history["Calculation history<br/>[app.py]"]
  node_account_ops["Account management<br/>[app.py]"]
  node_user_store[("User and history database<br/>[app.py]")]
  node_email["Email delivery"]
end

subgraph group_assist["Market and assistance"]
  node_crypto_api["Crypto price endpoint<br/>[app.py]"]
  node_market_provider["CoinGecko rates"]
  node_finny_ui["Finny assistant widget<br/>[finny.js]"]
  node_finny_api["Finny chat endpoint<br/>[app.py]"]
  node_web_search["DuckDuckGo search"]
end

node_visitor(("Visitor or user"))

node_visitor -->|"opens"| node_landing
node_visitor -->|"signs in"| node_auth_pages
node_visitor -->|"uses"| node_dashboard
node_dashboard -->|"submits calculations"| node_calc_api
node_calc_api -->|"calls formulas"| node_calc_engine
node_calc_api -->|"returns results"| node_dashboard
node_auth_pages -->|"submits forms"| node_flask
node_flask -->|"reads and writes"| node_user_store
node_history -->|"reads and writes"| node_user_store
node_account_ops -->|"updates accounts"| node_user_store
node_account_ops -->|"sends verification"| node_email
node_dashboard -->|"requests rates"| node_crypto_api
node_crypto_api -->|"fetches prices"| node_market_provider
node_dashboard -->|"opens assistant"| node_finny_ui
node_finny_ui -->|"sends chat"| node_finny_api
node_finny_api -->|"searches web"| node_web_search

click node_dashboard "https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/templates/index.html"
click node_auth_pages "https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/templates/login.html"
click node_landing "https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/templates/landing.html"
click node_flask "https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/app.py"
click node_calc_api "https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/app.py"
click node_calc_engine "https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/calculator.py"
click node_history "https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/app.py"
click node_account_ops "https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/app.py"
click node_user_store "https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/app.py"
click node_crypto_api "https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/app.py"
click node_finny_ui "https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/static/finny.js"
click node_finny_api "https://github.com/patakrishna2006-a11y/financial-calculator/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_dashboard,node_auth_pages,node_landing,node_visitor toneBlue
class node_calc_api,node_calc_engine toneAmber
class node_flask,node_history,node_account_ops,node_user_store,node_email toneMint
class node_crypto_api,node_market_provider,node_finny_ui,node_finny_api,node_web_search toneRose
```

## Components

### Web experience

- [Calculator dashboard](https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/templates/index.html): `templates/index.html`
- [Account pages](https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/templates/login.html): `templates/login.html`
- [Public landing page](https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/templates/landing.html): `templates/landing.html`

### Financial tools

- [Calculator handling](https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/app.py): `app.py`
- [Calculation formulas](https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/calculator.py): `calculator.py`

### Accounts and data

- [Flask routes and security](https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/app.py): `app.py`
- [Calculation history](https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/app.py): `app.py`
- [Account management](https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/app.py): `app.py`
- [User and history database](https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/app.py): `app.py`
- **Email delivery**

### Market and assistance

- [Crypto price endpoint](https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/app.py): `app.py`
- **CoinGecko rates**
- [Finny assistant widget](https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/static/finny.js): `static/finny.js`
- [Finny chat endpoint](https://github.com/patakrishna2006-a11y/financial-calculator/blob/main/app.py): `app.py`
- **DuckDuckGo search**

### Other components

- **Visitor or user**

## Connections

- Visitor or user → Public landing page: opens (evidence: `README.md`)
- Visitor or user → Account pages: signs in (evidence: `README.md`)
- Visitor or user → Calculator dashboard: uses (evidence: `README.md`)
- Calculator dashboard → Calculator handling: submits calculations (evidence: `README.md`)
- Calculator handling → Calculation formulas: calls formulas (evidence: `app.py`)
- Calculator handling → Calculator dashboard: returns results (evidence: `README.md`)
- Account pages → Flask routes and security: submits forms (evidence: `README.md`)
- Flask routes and security → User and history database: reads and writes (evidence: `app.py`)
- Calculation history → User and history database: reads and writes (evidence: `README.md`)
- Account management → User and history database: updates accounts (evidence: `README.md`)
- Account management → Email delivery: sends verification (evidence: `README.md`)
- Calculator dashboard → Crypto price endpoint: requests rates (evidence: `README.md`)
- Crypto price endpoint → CoinGecko rates: fetches prices (evidence: `app.py`)
- Calculator dashboard → Finny assistant widget: opens assistant (evidence: `README.md`)
- Finny assistant widget → Finny chat endpoint: sends chat (evidence: `README.md`)
- Finny chat endpoint → DuckDuckGo search: searches web (evidence: `README.md`)
