File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments