Skip to content

Commit a25178d

Browse files
committed
docs: mermaid diagram for app flow
1 parent e37526b commit a25178d

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,24 @@ blueprints.
3838
```
3939
The API will listen on `http://127.0.0.1:5000` by default.
4040

41+
## Architecture Overview
42+
```mermaid
43+
flowchart LR
44+
user([Portfolio user]) --> ui[Frontend SPA (Vite)]
45+
ui --> state[State manager<br/>(frontend/src/state.js)]
46+
state -->|REST calls| api[Flask API<br/>(Flask-Smorest blueprints)]
47+
api --> services[Service layer<br/>(app/services/*)]
48+
services --> db[(SQLite / Postgres)]
49+
services --> orchestrator[FX orchestrator<br/>+ rate store]
50+
orchestrator --> providers[Rate providers<br/>(ExchangeRate.host, ECB, mock)]
51+
orchestrator <-->|scheduled refresh| scheduler[APScheduler jobs]
52+
services --> metrics[Metrics calculators<br/>(portfolio_metrics.py)]
53+
services --> api
54+
api --> state
55+
cli[CLI & scripts<br/>(backfill, seed)] --> services
56+
docs[Docs & Postman] -. reference .-> user
57+
```
58+
4159
## Local Data & Seeding
4260
- Run database migrations before first use: `alembic upgrade head`. The initial
4361
revision seeds the currency registry so validation works out of the box.

0 commit comments

Comments
 (0)