# egorandrik/budgetplanner_webapplication architecture

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

- Interactive diagram: https://gitdiagram.com/egorandrik/budgetplanner_webapplication
- Repository: https://github.com/egorandrik/budgetplanner_webapplication

## Overview

BudgetPlanner is a Flask financial-accounting web app with income/expense tracking, currency conversion, data import/export, charts, and short-term forecasts. The main workflow is a user signing in or registering, then viewing and updating financial records; the server persists records and prepares dashboard data. The README documents forecasting for the next day, week, and month. Some templates and server sections were not sampled, so only directly evidenced interactions are connected; the chart script is shown as a capability, not wired to an unverified data source.

Main entry points: [`server.py`](https://github.com/egorandrik/budgetplanner_webapplication/blob/main/server.py) (Flask application), [`static/scrits/login.js`](https://github.com/egorandrik/budgetplanner_webapplication/blob/main/static/scrits/login.js) (Login form), [`static/scrits/registration.js`](https://github.com/egorandrik/budgetplanner_webapplication/blob/main/static/scrits/registration.js) (Registration form), [`Bank.py`](https://github.com/egorandrik/budgetplanner_webapplication/blob/main/Bank.py) (Currency rates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_login["Login form<br/>[login.js]"]
  node_registration["Registration form<br/>[registration.js]"]
  node_charts["Financial charts<br/>[userScrits.js]"]
  node_templates["Page templates"]
end

subgraph group_app["Application services"]
  node_server["Flask application<br/>[server.py]"]
  node_forecast["Forecast model"]
  node_currency["Currency rates<br/>[Bank.py]"]
end

subgraph group_data["Financial data"]
  node_accounts[("Accounts and records<br/>[UsersData.json]")]
  node_datafiles[("Import/export files")]
end

node_visitor(("Visitor"))
node_rate_service{{"Exchange-rate provider"}}

node_visitor -->|"submits login"| node_login
node_visitor -->|"submits registration"| node_registration
node_login -->|"posts credentials"| node_server
node_registration -->|"posts details"| node_server
node_visitor -->|"requests pages"| node_server
node_server -->|"renders pages"| node_templates
node_server -->|"reads and writes"| node_accounts
node_server -->|"imports model"| node_forecast
node_server -->|"requests rates"| node_currency
node_currency -->|"fetches rates"| node_rate_service
node_server -->|"imports and exports"| node_datafiles

click node_login "https://github.com/egorandrik/budgetplanner_webapplication/blob/main/static/scrits/login.js"
click node_registration "https://github.com/egorandrik/budgetplanner_webapplication/blob/main/static/scrits/registration.js"
click node_charts "https://github.com/egorandrik/budgetplanner_webapplication/blob/main/static/scrits/userScrits.js"
click node_templates "https://github.com/egorandrik/budgetplanner_webapplication/tree/main/templates"
click node_server "https://github.com/egorandrik/budgetplanner_webapplication/blob/main/server.py"
click node_forecast "https://github.com/egorandrik/budgetplanner_webapplication/blob/main/PredictMonyeModel.py"
click node_currency "https://github.com/egorandrik/budgetplanner_webapplication/blob/main/Bank.py"
click node_accounts "https://github.com/egorandrik/budgetplanner_webapplication/blob/main/Users/UsersData.json"
click node_datafiles "https://github.com/egorandrik/budgetplanner_webapplication/tree/main/Users/Datas"

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_login,node_registration,node_charts,node_templates toneBlue
class node_server,node_forecast,node_currency toneAmber
class node_accounts,node_datafiles toneMint
class node_visitor,node_rate_service toneIndigo
```

## Components

### Web experience

- [Login form](https://github.com/egorandrik/budgetplanner_webapplication/blob/main/static/scrits/login.js): `static/scrits/login.js`
- [Registration form](https://github.com/egorandrik/budgetplanner_webapplication/blob/main/static/scrits/registration.js): `static/scrits/registration.js`
- [Financial charts](https://github.com/egorandrik/budgetplanner_webapplication/blob/main/static/scrits/userScrits.js): `static/scrits/userScrits.js`
- [Page templates](https://github.com/egorandrik/budgetplanner_webapplication/tree/main/templates): `templates`

### Application services

- [Flask application](https://github.com/egorandrik/budgetplanner_webapplication/blob/main/server.py): `server.py`
- [Forecast model](https://github.com/egorandrik/budgetplanner_webapplication/blob/main/PredictMonyeModel.py): `PredictMonyeModel.py`
- [Currency rates](https://github.com/egorandrik/budgetplanner_webapplication/blob/main/Bank.py): `Bank.py`

### Financial data

- [Accounts and records](https://github.com/egorandrik/budgetplanner_webapplication/blob/main/Users/UsersData.json): `Users/UsersData.json`
- [Import/export files](https://github.com/egorandrik/budgetplanner_webapplication/tree/main/Users/Datas): `Users/Datas`

### Other components

- **Visitor**
- **Exchange-rate provider**

## Connections

- Visitor → Login form: submits login (evidence: `static/scrits/login.js`)
- Visitor → Registration form: submits registration (evidence: `static/scrits/registration.js`)
- Login form → Flask application: posts credentials (evidence: `static/scrits/login.js`)
- Registration form → Flask application: posts details (evidence: `static/scrits/registration.js`)
- Visitor → Flask application: requests pages (evidence: `server.py`)
- Flask application → Page templates: renders pages (evidence: `server.py`)
- Flask application → Accounts and records: reads and writes (evidence: `server.py`)
- Flask application → Forecast model: imports model (evidence: `server.py`)
- Flask application → Currency rates: requests rates (evidence: `server.py`)
- Currency rates → Exchange-rate provider: fetches rates (evidence: `Bank.py`)
- Flask application → Import/export files: imports and exports (evidence: `server.py`)
