# mazur888/f1-info-display architecture

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

- Interactive diagram: https://gitdiagram.com/mazur888/f1-info-display
- Repository: https://github.com/mazur888/f1-info-display

## Overview

This is an ESP32-based Formula 1 information tracker. The device fetches season and standings data, presents a default set of race and championship details on e-paper, and serves a web dashboard with calendar, qualifying, podium, and standings information. Users can also configure Wi-Fi and update firmware over the network. The excerpts show dashboard data requests and OTA upload handling; README claims cover periodic updates and AP setup, while some route and display wiring is not shown.

Main entry points: [`F1/F1 tracker/src/main.cpp`](https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/main.cpp) (ESP32 runtime), [`F1/F1 tracker/src/Dashboard_Page.h`](https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/Dashboard_Page.h) (Web dashboard), [`F1/F1 tracker/src/OTA_Page.h`](https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/OTA_Page.h) (OTA upload page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_device["Device runtime"]
  node_runtime["ESP32 runtime<br/>[main.cpp]"]
  node_screen["E-paper display<br/>[main.cpp]"]
  node_wifi["Wi-Fi setup<br/>[main.cpp]"]
  node_mdns["mDNS access<br/>[main.cpp]"]
end

subgraph group_f1data["F1 information"]
  node_ergast{{"Ergast API"}}
  node_calendar["Calendar parsing<br/>[main.cpp]"]
  node_screenstats["Screen race stats<br/>[main.cpp]"]
end

subgraph group_web["Web interfaces"]
  node_dashboard["Web dashboard<br/>[Dashboard_Page.h]"]
  node_ota_page["OTA upload page<br/>[OTA_Page.h]"]
  node_webserver["HTTP server<br/>[main.cpp]"]
end

subgraph group_update["Device updates"]
  node_firmware["Firmware updater<br/>[main.cpp]"]
end

node_user(("Device user"))

node_user -.->|"accesses device"| node_webserver
node_runtime -->|"includes handler"| node_dashboard
node_runtime -->|"includes handler"| node_ota_page
node_runtime -.->|"configures Wi-Fi"| node_wifi
node_runtime -.->|"advertises device"| node_mdns
node_runtime -.->|"fetches data"| node_ergast
node_runtime -->|"parses races"| node_calendar
node_runtime -->|"draws statistics"| node_screenstats
node_screenstats -.->|"renders content"| node_screen
node_dashboard -->|"requests F1 data"| node_ergast
node_dashboard -->|"calls calendar fetch"| node_calendar
node_dashboard -->|"sends HTML"| node_webserver
node_ota_page -->|"posts firmware"| node_firmware
node_webserver -->|"handles upload"| node_firmware

click node_runtime "https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/main.cpp"
click node_screen "https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/main.cpp"
click node_wifi "https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/main.cpp"
click node_mdns "https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/main.cpp"
click node_calendar "https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/main.cpp"
click node_screenstats "https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/main.cpp"
click node_dashboard "https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/Dashboard_Page.h"
click node_ota_page "https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/OTA_Page.h"
click node_webserver "https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/main.cpp"
click node_firmware "https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/main.cpp"

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_runtime,node_screen,node_wifi,node_mdns,node_user toneBlue
class node_ergast,node_calendar,node_screenstats toneAmber
class node_dashboard,node_ota_page,node_webserver toneMint
class node_firmware toneRose
```

## Components

### Device runtime

- [ESP32 runtime](https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/main.cpp): `F1/F1 tracker/src/main.cpp`
- [E-paper display](https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/main.cpp): `F1/F1 tracker/src/main.cpp`
- [Wi-Fi setup](https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/main.cpp): `F1/F1 tracker/src/main.cpp`
- [mDNS access](https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/main.cpp): `F1/F1 tracker/src/main.cpp`

### F1 information

- **Ergast API**
- [Calendar parsing](https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/main.cpp): `F1/F1 tracker/src/main.cpp`
- [Screen race stats](https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/main.cpp): `F1/F1 tracker/src/main.cpp`

### Web interfaces

- [Web dashboard](https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/Dashboard_Page.h): `F1/F1 tracker/src/Dashboard_Page.h`
- [OTA upload page](https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/OTA_Page.h): `F1/F1 tracker/src/OTA_Page.h`
- [HTTP server](https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/main.cpp): `F1/F1 tracker/src/main.cpp`

### Device updates

- [Firmware updater](https://github.com/mazur888/f1-info-display/blob/main/F1/F1%20tracker/src/main.cpp): `F1/F1 tracker/src/main.cpp`

### Other components

- **Device user**

## Connections

- Device user → HTTP server: accesses device (evidence: `README.md`)
- ESP32 runtime → Web dashboard: includes handler (evidence: `F1/F1 tracker/src/main.cpp`)
- ESP32 runtime → OTA upload page: includes handler (evidence: `F1/F1 tracker/src/main.cpp`)
- ESP32 runtime → Wi-Fi setup: configures Wi-Fi (evidence: `README.md`)
- ESP32 runtime → mDNS access: advertises device (evidence: `README.md`)
- ESP32 runtime → Ergast API: fetches data (evidence: `README.md`)
- ESP32 runtime → Calendar parsing: parses races (evidence: `F1/F1 tracker/src/main.cpp`)
- ESP32 runtime → Screen race stats: draws statistics (evidence: `F1/F1 tracker/src/main.cpp`)
- Screen race stats → E-paper display: renders content (evidence: `README.md`)
- Web dashboard → Ergast API: requests F1 data (evidence: `F1/F1 tracker/src/Dashboard_Page.h`)
- Web dashboard → Calendar parsing: calls calendar fetch (evidence: `F1/F1 tracker/src/Dashboard_Page.h`)
- Web dashboard → HTTP server: sends HTML (evidence: `F1/F1 tracker/src/Dashboard_Page.h`)
- OTA upload page → Firmware updater: posts firmware (evidence: `F1/F1 tracker/src/OTA_Page.h`)
- HTTP server → Firmware updater: handles upload (evidence: `F1/F1 tracker/src/main.cpp`)
