# adaamn/pi-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/adaamn/pi-dashboard
- Repository: https://github.com/adaamn/pi-dashboard

## Overview

This is a small Flask personal dashboard that combines local system monitoring with calendar, weather, news, investment, and AI-assistant features. The excerpt shows the AI assistant gathering several external data feeds and sending a prompt to Anthropic, and shows a system-metrics response with bounded history. Route-to-template wiring and some route details are in unsampled portions of app.py, so those links are left unverified rather than presented as established calls.

Main entry points: [`app.py`](https://github.com/adaamn/pi-dashboard/blob/main/app.py) (Assistant Prompt), [`templates/index.html`](https://github.com/adaamn/pi-dashboard/blob/main/templates/index.html) (Dashboard UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Dashboard"]
  node_flask["Flask App<br/>[app.py]"]
  node_ui["Dashboard UI<br/>[index.html]"]
  node_monitor["System Metrics<br/>[app.py]"]
end

subgraph group_feeds["Data Feeds"]
  node_weather["Weather Fetcher<br/>[app.py]"]
  node_news["News Fetcher<br/>[app.py]"]
  node_stock_news["Market News Fetcher<br/>[app.py]"]
  node_calendar["Calendar Fetcher<br/>[app.py]"]
end

subgraph group_assistant["AI Assistant"]
  node_assistant_builder["Assistant Prompt<br/>[app.py]"]
end

node_visitor(("Dashboard User"))
node_weather_api["Open-Meteo"]
node_news_feed["Seznam RSS"]
node_market_feed["Kurzy RSS"]
node_calendar_service["ICS Calendar"]
node_anthropic["Anthropic API"]
node_trading["Trading212 API"]

node_visitor -->|"uses"| node_flask
node_flask -.->|"renders"| node_ui
node_assistant_builder -->|"calls"| node_weather
node_assistant_builder -->|"calls"| node_stock_news
node_assistant_builder -->|"calls"| node_news
node_assistant_builder -->|"calls"| node_calendar
node_weather -->|"requests"| node_weather_api
node_news -->|"requests"| node_news_feed
node_stock_news -->|"requests"| node_market_feed
node_calendar -->|"requests"| node_calendar_service
node_assistant_builder -->|"sends prompt"| node_anthropic
node_flask -.->|"exposes metrics"| node_monitor
node_flask -->|"fetches account data"| node_trading

click node_flask "https://github.com/adaamn/pi-dashboard/blob/main/app.py"
click node_ui "https://github.com/adaamn/pi-dashboard/blob/main/templates/index.html"
click node_monitor "https://github.com/adaamn/pi-dashboard/blob/main/app.py"
click node_weather "https://github.com/adaamn/pi-dashboard/blob/main/app.py"
click node_news "https://github.com/adaamn/pi-dashboard/blob/main/app.py"
click node_stock_news "https://github.com/adaamn/pi-dashboard/blob/main/app.py"
click node_calendar "https://github.com/adaamn/pi-dashboard/blob/main/app.py"
click node_assistant_builder "https://github.com/adaamn/pi-dashboard/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_flask,node_ui,node_monitor,node_visitor toneBlue
class node_weather,node_news,node_stock_news,node_calendar toneAmber
class node_assistant_builder,node_anthropic,node_trading toneMint
class node_weather_api,node_news_feed,node_market_feed,node_calendar_service toneIndigo
```

## Components

### Dashboard

- [Flask App](https://github.com/adaamn/pi-dashboard/blob/main/app.py): `app.py`
- [Dashboard UI](https://github.com/adaamn/pi-dashboard/blob/main/templates/index.html): `templates/index.html`
- [System Metrics](https://github.com/adaamn/pi-dashboard/blob/main/app.py): `app.py`

### Data Feeds

- [Weather Fetcher](https://github.com/adaamn/pi-dashboard/blob/main/app.py): `app.py`
- [News Fetcher](https://github.com/adaamn/pi-dashboard/blob/main/app.py): `app.py`
- [Market News Fetcher](https://github.com/adaamn/pi-dashboard/blob/main/app.py): `app.py`
- [Calendar Fetcher](https://github.com/adaamn/pi-dashboard/blob/main/app.py): `app.py`

### AI Assistant

- [Assistant Prompt](https://github.com/adaamn/pi-dashboard/blob/main/app.py): `app.py`

### Other components

- **Dashboard User**
- **Open-Meteo**
- **Seznam RSS**
- **Kurzy RSS**
- **ICS Calendar**
- **Anthropic API**
- **Trading212 API**

## Connections

- Dashboard User → Flask App: uses
- Flask App → Dashboard UI: renders
- Assistant Prompt → Weather Fetcher: calls (evidence: `app.py`)
- Assistant Prompt → Market News Fetcher: calls (evidence: `app.py`)
- Assistant Prompt → News Fetcher: calls (evidence: `app.py`)
- Assistant Prompt → Calendar Fetcher: calls (evidence: `app.py`)
- Weather Fetcher → Open-Meteo: requests (evidence: `app.py`)
- News Fetcher → Seznam RSS: requests (evidence: `app.py`)
- Market News Fetcher → Kurzy RSS: requests (evidence: `app.py`)
- Calendar Fetcher → ICS Calendar: requests (evidence: `app.py`)
- Assistant Prompt → Anthropic API: sends prompt (evidence: `app.py`)
- Flask App → System Metrics: exposes metrics (evidence: `app.py`)
- Flask App → Trading212 API: fetches account data (evidence: `app.py`)
