# ham3d-s/timehover architecture

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

- Interactive diagram: https://gitdiagram.com/ham3d-s/timehover
- Repository: https://github.com/ham3d-s/timehover

## Overview

TimeHover is a desktop clock-hover assistant: the user hovers over the taskbar clock, the app gathers calendar and live service data, and presents it in a glass popup with configurable alerts and settings. The Windows C# app is the primary implementation; the repository also includes a separate Linux Python version. Edges reflect shown orchestration, calls, or README-documented capabilities; unsampled implementation details are not inferred.

Main entry points: [`src/CalendarPopupWindow.cs`](https://github.com/ham3d-s/timehover/blob/main/src/CalendarPopupWindow.cs) (Glass popup), [`src/Program.cs`](https://github.com/ham3d-s/timehover/blob/main/src/Program.cs) (Windows app), [`src/NetworkClientFactory.cs`](https://github.com/ham3d-s/timehover/blob/main/src/NetworkClientFactory.cs) (Network routing), [`src/BargheManService.cs`](https://github.com/ham3d-s/timehover/blob/main/src/BargheManService.cs) (Power outage service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["App Runtime"]
  node_winentry["Windows app<br/>[Program.cs]"]
  node_hoverwatch["Clock hover watcher"]
  node_tray["Tray controls<br/>[TrayIconManager.cs]"]
  node_linux["Linux desktop app<br/>[timehover.py]"]
end

subgraph group_calendar["Calendar Features"]
  node_calendarengine["Calendar calculations<br/>[CalendarEngine.cs]"]
  node_timeir["Iran time and events<br/>[TimeIrService.cs]"]
  node_holidays["Holiday planner"]
end

subgraph group_live["Live Services"]
  node_net["Network routing"]
  node_weather["Weather and air quality"]
  node_usdt["USDT pricing"]
  node_barghe["Power outage service"]
  node_alerts["Outage alerts"]
end

subgraph group_ui["Interface And Settings"]
  node_popup["Glass popup"]
  node_settings[("Local settings<br/>[AppSettings.cs]")]
  node_themes["Theme palette<br/>[ThemePalette.cs]"]
  node_blur["Window effects"]
  node_about["About card"]
end

node_user(("Desktop user"))
node_internet{{"Remote data services"}}

node_user -->|"hovers clock"| node_hoverwatch
node_hoverwatch -->|"shows popup"| node_popup
node_winentry -->|"starts watcher"| node_hoverwatch
node_winentry -->|"creates window"| node_popup
node_winentry -->|"creates tray"| node_tray
node_winentry -->|"refreshes data"| node_timeir
node_winentry -->|"refreshes data"| node_usdt
node_winentry -->|"refreshes data"| node_weather
node_winentry -->|"refreshes data"| node_barghe
node_winentry -->|"starts alerts"| node_alerts
node_winentry -->|"loads settings"| node_settings
node_popup -->|"sets mode"| node_blur
node_tray -->|"formats date"| node_calendarengine
node_holidays -->|"converts dates"| node_calendarengine
node_weather -->|"fetches data"| node_net
node_usdt -->|"fetches prices"| node_net
node_timeir -->|"fetches time"| node_net
node_barghe -->|"routes requests"| node_net
node_alerts -->|"checks outages"| node_barghe
node_alerts -->|"hibernates system"| node_internet
node_net -->|"requests services"| node_internet
node_linux -.->|"shows desktop info"| node_user
node_popup -->|"applies themes"| node_themes
node_popup -->|"shows profile"| node_about
node_popup -->|"shows opportunities"| node_holidays
node_popup -->|"shows conditions"| node_weather
node_popup -->|"shows prices"| node_usdt
node_popup -->|"shows outages"| node_barghe
node_popup -->|"shows events"| node_timeir

click node_winentry "https://github.com/ham3d-s/timehover/blob/main/src/Program.cs"
click node_hoverwatch "https://github.com/ham3d-s/timehover/blob/main/src/TaskbarClockWatcher.cs"
click node_tray "https://github.com/ham3d-s/timehover/blob/main/src/TrayIconManager.cs"
click node_popup "https://github.com/ham3d-s/timehover/blob/main/src/CalendarPopupWindow.cs"
click node_settings "https://github.com/ham3d-s/timehover/blob/main/src/AppSettings.cs"
click node_themes "https://github.com/ham3d-s/timehover/blob/main/src/ThemePalette.cs"
click node_blur "https://github.com/ham3d-s/timehover/blob/main/src/WindowBlurHelper.cs"
click node_about "https://github.com/ham3d-s/timehover/blob/main/src/AboutCreatorBuilder.cs"
click node_calendarengine "https://github.com/ham3d-s/timehover/blob/main/src/CalendarEngine.cs"
click node_timeir "https://github.com/ham3d-s/timehover/blob/main/src/TimeIrService.cs"
click node_holidays "https://github.com/ham3d-s/timehover/blob/main/src/HolidayPlannerService.cs"
click node_net "https://github.com/ham3d-s/timehover/blob/main/src/NetworkClientFactory.cs"
click node_weather "https://github.com/ham3d-s/timehover/blob/main/src/WeatherAqiService.cs"
click node_usdt "https://github.com/ham3d-s/timehover/blob/main/src/UsdtPriceService.cs"
click node_barghe "https://github.com/ham3d-s/timehover/blob/main/src/BargheManService.cs"
click node_alerts "https://github.com/ham3d-s/timehover/blob/main/src/OutageAlertManager.cs"
click node_linux "https://github.com/ham3d-s/timehover/blob/main/linux/timehover.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_winentry,node_hoverwatch,node_tray,node_linux,node_user toneBlue
class node_calendarengine,node_timeir,node_holidays toneAmber
class node_net,node_weather,node_usdt,node_barghe,node_alerts toneMint
class node_popup,node_settings,node_themes,node_blur,node_about toneRose
class node_internet toneIndigo
```

## Components

### App Runtime

- [Windows app](https://github.com/ham3d-s/timehover/blob/main/src/Program.cs): `src/Program.cs`
- [Clock hover watcher](https://github.com/ham3d-s/timehover/blob/main/src/TaskbarClockWatcher.cs): `src/TaskbarClockWatcher.cs`
- [Tray controls](https://github.com/ham3d-s/timehover/blob/main/src/TrayIconManager.cs): `src/TrayIconManager.cs`
- [Linux desktop app](https://github.com/ham3d-s/timehover/blob/main/linux/timehover.py): `linux/timehover.py`

### Calendar Features

- [Calendar calculations](https://github.com/ham3d-s/timehover/blob/main/src/CalendarEngine.cs): `src/CalendarEngine.cs`
- [Iran time and events](https://github.com/ham3d-s/timehover/blob/main/src/TimeIrService.cs): `src/TimeIrService.cs`
- [Holiday planner](https://github.com/ham3d-s/timehover/blob/main/src/HolidayPlannerService.cs): `src/HolidayPlannerService.cs`

### Live Services

- [Network routing](https://github.com/ham3d-s/timehover/blob/main/src/NetworkClientFactory.cs): `src/NetworkClientFactory.cs`
- [Weather and air quality](https://github.com/ham3d-s/timehover/blob/main/src/WeatherAqiService.cs): `src/WeatherAqiService.cs`
- [USDT pricing](https://github.com/ham3d-s/timehover/blob/main/src/UsdtPriceService.cs): `src/UsdtPriceService.cs`
- [Power outage service](https://github.com/ham3d-s/timehover/blob/main/src/BargheManService.cs): `src/BargheManService.cs`
- [Outage alerts](https://github.com/ham3d-s/timehover/blob/main/src/OutageAlertManager.cs): `src/OutageAlertManager.cs`

### Interface And Settings

- [Glass popup](https://github.com/ham3d-s/timehover/blob/main/src/CalendarPopupWindow.cs): `src/CalendarPopupWindow.cs`
- [Local settings](https://github.com/ham3d-s/timehover/blob/main/src/AppSettings.cs): `src/AppSettings.cs`
- [Theme palette](https://github.com/ham3d-s/timehover/blob/main/src/ThemePalette.cs): `src/ThemePalette.cs`
- [Window effects](https://github.com/ham3d-s/timehover/blob/main/src/WindowBlurHelper.cs): `src/WindowBlurHelper.cs`
- [About card](https://github.com/ham3d-s/timehover/blob/main/src/AboutCreatorBuilder.cs): `src/AboutCreatorBuilder.cs`

### Other components

- **Desktop user**
- **Remote data services**

## Connections

- Desktop user → Clock hover watcher: hovers clock (evidence: `README.md`)
- Clock hover watcher → Glass popup: shows popup (evidence: `README.md`)
- Windows app → Clock hover watcher: starts watcher (evidence: `src/Program.cs`)
- Windows app → Glass popup: creates window (evidence: `src/Program.cs`)
- Windows app → Tray controls: creates tray (evidence: `src/Program.cs`)
- Windows app → Iran time and events: refreshes data (evidence: `src/Program.cs`)
- Windows app → USDT pricing: refreshes data (evidence: `src/Program.cs`)
- Windows app → Weather and air quality: refreshes data (evidence: `src/Program.cs`)
- Windows app → Power outage service: refreshes data (evidence: `src/Program.cs`)
- Windows app → Outage alerts: starts alerts (evidence: `src/Program.cs`)
- Windows app → Local settings: loads settings (evidence: `README.md`)
- Glass popup → Window effects: sets mode (evidence: `src/CalendarPopupWindow.cs`)
- Tray controls → Calendar calculations: formats date (evidence: `src/TrayIconManager.cs`)
- Holiday planner → Calendar calculations: converts dates (evidence: `src/HolidayPlannerService.cs`)
- Weather and air quality → Network routing: fetches data (evidence: `src/WeatherAqiService.cs`)
- USDT pricing → Network routing: fetches prices (evidence: `src/UsdtPriceService.cs`)
- Iran time and events → Network routing: fetches time (evidence: `src/TimeIrService.cs`)
- Power outage service → Network routing: routes requests (evidence: `src/BargheManService.cs`)
- Outage alerts → Power outage service: checks outages (evidence: `README.md`)
- Outage alerts → Remote data services: hibernates system (evidence: `README.md`)
- Network routing → Remote data services: requests services (evidence: `README.md`)
- Linux desktop app → Desktop user: shows desktop info (evidence: `README.md`)
- Glass popup → Theme palette: applies themes (evidence: `README.md`)
- Glass popup → About card: shows profile (evidence: `README.md`)
- Glass popup → Holiday planner: shows opportunities (evidence: `README.md`)
- Glass popup → Weather and air quality: shows conditions (evidence: `README.md`)
- Glass popup → USDT pricing: shows prices (evidence: `README.md`)
- Glass popup → Power outage service: shows outages (evidence: `README.md`)
- Glass popup → Iran time and events: shows events (evidence: `README.md`)
