# greyrrat/project-www architecture

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

- Interactive diagram: https://gitdiagram.com/greyrrat/project-www
- Repository: https://github.com/greyrrat/project-www

## Overview

This is STM32L476 firmware for a “Worldwide Weather Watcher.” Its main loop initializes the board and application, then coordinates weather readings, timekeeping, display, and storage; the sampled code also shows UART output and I2C LCD setup. The application header exposes reading, configuration, button, and event state. The README is empty, and excerpts omit most runtime code, so the graph keeps unshown subsystem links unverified rather than inferring a detailed pipeline.

Main entry points: [`Core/Src/main.c`](https://github.com/greyrrat/project-www/blob/main/Core/Src/main.c) (Firmware entry), [`FATFS/App/fatfs.c`](https://github.com/greyrrat/project-www/blob/main/FATFS/App/fatfs.c) (FAT filesystem setup), [`FATFS/App/fatfs.h`](https://github.com/greyrrat/project-www/blob/main/FATFS/App/fatfs.h) (Filesystem objects), [`Core/Inc/app.h`](https://github.com/greyrrat/project-www/blob/main/Core/Inc/app.h) (App state and events)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_firmware["Firmware"]
  node_main["Firmware entry<br/>[main.c]"]
  node_app["App state and events<br/>[app.h]"]
end

subgraph group_features["Weather features"]
  node_weather["Weather readings<br/>[main.c]"]
  node_clock["RTC timekeeping<br/>[main.c]"]
  node_display["LCD display<br/>[main.c]"]
  node_controls["Buttons and settings<br/>[app.h]"]
  node_gps["GPS tracking<br/>[app.h]"]
end

subgraph group_hardware["Board hardware"]
  node_uart["UART output<br/>[main.c]"]
  node_i2c["I2C interface"]
  node_board["STM32 board support"]
end

subgraph group_storage["SD storage"]
  node_fatfs["FAT filesystem setup<br/>[fatfs.c]"]
  node_diskio["SD disk interface<br/>[user_diskio.c]"]
  node_fatfs_api["Filesystem objects<br/>[fatfs.h]"]
end

node_actor(("Device startup"))

node_actor -->|"starts"| node_main
node_main -->|"initializes"| node_app
node_main -->|"initializes"| node_fatfs
node_main -->|"transmits via"| node_uart
node_main -->|"sends LCD data"| node_i2c
node_main -.->|"coordinates"| node_weather
node_main -->|"configures"| node_clock
node_main -.->|"refreshes"| node_display
node_main -.->|"handles"| node_controls
node_main -.->|"updates"| node_gps
node_fatfs -->|"exposes"| node_fatfs_api
node_fatfs_api -->|"uses driver"| node_diskio

click node_main "https://github.com/greyrrat/project-www/blob/main/Core/Src/main.c"
click node_app "https://github.com/greyrrat/project-www/blob/main/Core/Inc/app.h"
click node_weather "https://github.com/greyrrat/project-www/blob/main/Core/Src/main.c"
click node_clock "https://github.com/greyrrat/project-www/blob/main/Core/Src/main.c"
click node_display "https://github.com/greyrrat/project-www/blob/main/Core/Src/main.c"
click node_controls "https://github.com/greyrrat/project-www/blob/main/Core/Inc/app.h"
click node_gps "https://github.com/greyrrat/project-www/blob/main/Core/Inc/app.h"
click node_uart "https://github.com/greyrrat/project-www/blob/main/Core/Src/main.c"
click node_i2c "https://github.com/greyrrat/project-www/blob/main/Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c"
click node_board "https://github.com/greyrrat/project-www/blob/main/Core/Src/stm32l4xx_hal_msp.c"
click node_fatfs "https://github.com/greyrrat/project-www/blob/main/FATFS/App/fatfs.c"
click node_diskio "https://github.com/greyrrat/project-www/blob/main/FATFS/Target/user_diskio.c"
click node_fatfs_api "https://github.com/greyrrat/project-www/blob/main/FATFS/App/fatfs.h"

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_main,node_app toneBlue
class node_weather,node_clock,node_display,node_controls,node_gps toneAmber
class node_uart,node_i2c,node_board toneMint
class node_fatfs,node_diskio,node_fatfs_api toneRose
class node_actor toneIndigo
```

## Components

### Firmware

- [Firmware entry](https://github.com/greyrrat/project-www/blob/main/Core/Src/main.c): `Core/Src/main.c`
- [App state and events](https://github.com/greyrrat/project-www/blob/main/Core/Inc/app.h): `Core/Inc/app.h`

### Weather features

- [Weather readings](https://github.com/greyrrat/project-www/blob/main/Core/Src/main.c): `Core/Src/main.c`
- [RTC timekeeping](https://github.com/greyrrat/project-www/blob/main/Core/Src/main.c): `Core/Src/main.c`
- [LCD display](https://github.com/greyrrat/project-www/blob/main/Core/Src/main.c): `Core/Src/main.c`
- [Buttons and settings](https://github.com/greyrrat/project-www/blob/main/Core/Inc/app.h): `Core/Inc/app.h`
- [GPS tracking](https://github.com/greyrrat/project-www/blob/main/Core/Inc/app.h): `Core/Inc/app.h`

### Board hardware

- [UART output](https://github.com/greyrrat/project-www/blob/main/Core/Src/main.c): `Core/Src/main.c`
- [I2C interface](https://github.com/greyrrat/project-www/blob/main/Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c): `Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_i2c.c`
- [STM32 board support](https://github.com/greyrrat/project-www/blob/main/Core/Src/stm32l4xx_hal_msp.c): `Core/Src/stm32l4xx_hal_msp.c`

### SD storage

- [FAT filesystem setup](https://github.com/greyrrat/project-www/blob/main/FATFS/App/fatfs.c): `FATFS/App/fatfs.c`
- [SD disk interface](https://github.com/greyrrat/project-www/blob/main/FATFS/Target/user_diskio.c): `FATFS/Target/user_diskio.c`
- [Filesystem objects](https://github.com/greyrrat/project-www/blob/main/FATFS/App/fatfs.h): `FATFS/App/fatfs.h`

### Other components

- **Device startup**

## Connections

- Device startup → Firmware entry: starts (evidence: `Core/Src/main.c`)
- Firmware entry → App state and events: initializes (evidence: `Core/Src/main.c`)
- Firmware entry → FAT filesystem setup: initializes (evidence: `Core/Src/main.c`)
- Firmware entry → UART output: transmits via (evidence: `Core/Src/main.c`)
- Firmware entry → I2C interface: sends LCD data (evidence: `Core/Src/main.c`)
- Firmware entry → Weather readings: coordinates (evidence: `Core/Src/main.c`)
- Firmware entry → RTC timekeeping: configures (evidence: `Core/Src/main.c`)
- Firmware entry → LCD display: refreshes (evidence: `Core/Src/main.c`)
- Firmware entry → Buttons and settings: handles
- Firmware entry → GPS tracking: updates
- FAT filesystem setup → Filesystem objects: exposes (evidence: `FATFS/App/fatfs.c`)
- Filesystem objects → SD disk interface: uses driver (evidence: `FATFS/App/fatfs.h`)
