# coluxhu/zectrix-daily-focus architecture

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

- Interactive diagram: https://gitdiagram.com/coluxhu/zectrix-daily-focus
- Repository: https://github.com/coluxhu/zectrix-daily-focus

## Overview

Zectrix Daily Focus assembles dashboard manifests from reusable templates, renders the resulting blueprint as an e-ink image, and pushes it to a Zectrix device. Its service runtime exposes manifest, render, push, run, schedule, and history APIs, with SQLite-backed run state. Provider modules add calendar, weather, solar, and Zectrix todo data to layouts. The graph reflects README-documented capabilities and shown source relationships; some service internals and unsampled provider wiring are not fully visible, so those links are omitted or marked unverified.

Main entry points: [`renderer.py`](https://github.com/coluxhu/zectrix-daily-focus/blob/main/renderer.py) (Renderer), [`service.py`](https://github.com/coluxhu/zectrix-daily-focus/blob/main/service.py) (Service API), [`composer.py`](https://github.com/coluxhu/zectrix-daily-focus/blob/main/composer.py) (Composer), [`pusher.py`](https://github.com/coluxhu/zectrix-daily-focus/blob/main/pusher.py) (Image pusher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_assembly["Dashboard assembly"]
  node_manifest_files["Manifests"]
  node_template_files["Templates"]
  node_blueprint_files["Blueprints"]
  node_composer["Composer<br/>[composer.py]"]
end

subgraph group_rendering["Rendering and data"]
  node_renderer["Renderer<br/>[renderer.py]"]
  node_calendar_provider["Calendar data<br/>[calendar.py]"]
  node_weather_provider["Weather data<br/>[qweather.py]"]
  node_solar_provider["Solar data<br/>[hamqsl.py]"]
  node_todo_provider["Todo data<br/>[zectrix.py]"]
  node_image_output["Rendered images"]
end

subgraph group_delivery["Device delivery"]
  node_pusher["Image pusher<br/>[pusher.py]"]
  node_zectrix_client["Zectrix client<br/>[zectrix_client.py]"]
end

subgraph group_runtime["Service runtime"]
  node_service["Service API<br/>[service.py]"]
  node_scheduler["Cron scheduler<br/>[service.py]"]
  node_service_db[("Run-state database<br/>[service.py]")]
end

node_operator(("Operator"))
node_service_client(("API client"))
node_device(("Zectrix device"))
node_qweather_api(("QWeather API"))
node_hamqsl_api(("HAMQSL feed"))

node_operator -->|"runs assembly"| node_composer
node_composer -->|"reads layout"| node_manifest_files
node_composer -->|"loads templates"| node_template_files
node_composer -->|"writes blueprint"| node_blueprint_files
node_operator -->|"runs rendering"| node_renderer
node_blueprint_files -->|"provides layout"| node_renderer
node_renderer -->|"loads provider"| node_calendar_provider
node_renderer -->|"loads provider"| node_weather_provider
node_renderer -->|"loads provider"| node_solar_provider
node_renderer -->|"loads provider"| node_todo_provider
node_weather_provider -->|"requests forecasts"| node_qweather_api
node_solar_provider -->|"fetches solar data"| node_hamqsl_api
node_todo_provider -->|"queries todos"| node_zectrix_client
node_renderer -->|"writes image"| node_image_output
node_operator -->|"runs push"| node_pusher
node_pusher -->|"selects image"| node_image_output
node_pusher -->|"calls client"| node_zectrix_client
node_zectrix_client -.->|"uploads image"| node_device
node_service_client -->|"calls endpoints"| node_service
node_service -->|"reuses assembly"| node_composer
node_service -->|"reuses rendering"| node_renderer
node_service -->|"reuses pushing"| node_pusher
node_service -.->|"manages schedules"| node_scheduler
node_service -->|"reads and writes"| node_service_db

click node_manifest_files "https://github.com/coluxhu/zectrix-daily-focus/tree/main/manifests"
click node_template_files "https://github.com/coluxhu/zectrix-daily-focus/tree/main/templates"
click node_blueprint_files "https://github.com/coluxhu/zectrix-daily-focus/tree/main/blueprints"
click node_composer "https://github.com/coluxhu/zectrix-daily-focus/blob/main/composer.py"
click node_renderer "https://github.com/coluxhu/zectrix-daily-focus/blob/main/renderer.py"
click node_calendar_provider "https://github.com/coluxhu/zectrix-daily-focus/blob/main/templates_requirements/calendar.py"
click node_weather_provider "https://github.com/coluxhu/zectrix-daily-focus/blob/main/templates_requirements/qweather.py"
click node_solar_provider "https://github.com/coluxhu/zectrix-daily-focus/blob/main/templates_requirements/hamqsl.py"
click node_todo_provider "https://github.com/coluxhu/zectrix-daily-focus/blob/main/templates_requirements/zectrix.py"
click node_image_output "https://github.com/coluxhu/zectrix-daily-focus/tree/main/display_pictures"
click node_pusher "https://github.com/coluxhu/zectrix-daily-focus/blob/main/pusher.py"
click node_zectrix_client "https://github.com/coluxhu/zectrix-daily-focus/blob/main/zectrix_client.py"
click node_service "https://github.com/coluxhu/zectrix-daily-focus/blob/main/service.py"
click node_scheduler "https://github.com/coluxhu/zectrix-daily-focus/blob/main/service.py"
click node_service_db "https://github.com/coluxhu/zectrix-daily-focus/blob/main/service.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_manifest_files,node_template_files,node_blueprint_files,node_composer,node_service_client toneBlue
class node_renderer,node_calendar_provider,node_weather_provider,node_solar_provider,node_todo_provider,node_image_output toneAmber
class node_pusher,node_zectrix_client,node_qweather_api toneMint
class node_service,node_scheduler,node_service_db toneRose
class node_operator,node_device,node_hamqsl_api toneIndigo
```

## Components

### Dashboard assembly

- [Manifests](https://github.com/coluxhu/zectrix-daily-focus/tree/main/manifests): `manifests`
- [Templates](https://github.com/coluxhu/zectrix-daily-focus/tree/main/templates): `templates`
- [Blueprints](https://github.com/coluxhu/zectrix-daily-focus/tree/main/blueprints): `blueprints`
- [Composer](https://github.com/coluxhu/zectrix-daily-focus/blob/main/composer.py): `composer.py`

### Rendering and data

- [Renderer](https://github.com/coluxhu/zectrix-daily-focus/blob/main/renderer.py): `renderer.py`
- [Calendar data](https://github.com/coluxhu/zectrix-daily-focus/blob/main/templates_requirements/calendar.py): `templates_requirements/calendar.py`
- [Weather data](https://github.com/coluxhu/zectrix-daily-focus/blob/main/templates_requirements/qweather.py): `templates_requirements/qweather.py`
- [Solar data](https://github.com/coluxhu/zectrix-daily-focus/blob/main/templates_requirements/hamqsl.py): `templates_requirements/hamqsl.py`
- [Todo data](https://github.com/coluxhu/zectrix-daily-focus/blob/main/templates_requirements/zectrix.py): `templates_requirements/zectrix.py`
- [Rendered images](https://github.com/coluxhu/zectrix-daily-focus/tree/main/display_pictures): `display_pictures`

### Device delivery

- [Image pusher](https://github.com/coluxhu/zectrix-daily-focus/blob/main/pusher.py): `pusher.py`
- [Zectrix client](https://github.com/coluxhu/zectrix-daily-focus/blob/main/zectrix_client.py): `zectrix_client.py`

### Service runtime

- [Service API](https://github.com/coluxhu/zectrix-daily-focus/blob/main/service.py): `service.py`
- [Cron scheduler](https://github.com/coluxhu/zectrix-daily-focus/blob/main/service.py): `service.py`
- [Run-state database](https://github.com/coluxhu/zectrix-daily-focus/blob/main/service.py): `service.py`

### Other components

- **Operator**
- **API client**
- **Zectrix device**
- **QWeather API**
- **HAMQSL feed**

## Connections

- Operator → Composer: runs assembly (evidence: `README.md`)
- Composer → Manifests: reads layout (evidence: `composer.py`)
- Composer → Templates: loads templates (evidence: `composer.py`)
- Composer → Blueprints: writes blueprint (evidence: `composer.py`)
- Operator → Renderer: runs rendering (evidence: `README.md`)
- Blueprints → Renderer: provides layout (evidence: `README.md`)
- Renderer → Calendar data: loads provider (evidence: `renderer.py`)
- Renderer → Weather data: loads provider (evidence: `renderer.py`)
- Renderer → Solar data: loads provider (evidence: `renderer.py`)
- Renderer → Todo data: loads provider (evidence: `renderer.py`)
- Weather data → QWeather API: requests forecasts (evidence: `templates_requirements/qweather.py`)
- Solar data → HAMQSL feed: fetches solar data (evidence: `templates_requirements/hamqsl.py`)
- Todo data → Zectrix client: queries todos (evidence: `templates_requirements/zectrix.py`)
- Renderer → Rendered images: writes image (evidence: `README.md`)
- Operator → Image pusher: runs push (evidence: `README.md`)
- Image pusher → Rendered images: selects image (evidence: `pusher.py`)
- Image pusher → Zectrix client: calls client (evidence: `pusher.py`)
- Zectrix client → Zectrix device: uploads image
- API client → Service API: calls endpoints (evidence: `README.md`)
- Service API → Composer: reuses assembly (evidence: `service.py`)
- Service API → Renderer: reuses rendering (evidence: `service.py`)
- Service API → Image pusher: reuses pushing (evidence: `service.py`)
- Service API → Cron scheduler: manages schedules (evidence: `service.py`)
- Service API → Run-state database: reads and writes (evidence: `service.py`)
