# edison-science-corner/bunnybuddy architecture

> Architecture diagram of the GitHub repository edison-science-corner/bunnybuddy, 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/edison-science-corner/bunnybuddy
- Repository: https://github.com/edison-science-corner/bunnybuddy

## Overview

Bunny Buddy is an ESP32-C3 desk companion. A user’s button or serial input selects face, timer, stopwatch, clock, or colour behavior; firmware presents the result on the round display. Clock and weather use network services, while settings are remembered across power-off. The repository also includes printable front and back case parts. The only source file is `bunny.ino`, but no source excerpt was provided, so runtime relationships below are limited to those documented in the README.

Main entry points: [`bunny.ino`](https://github.com/edison-science-corner/bunnybuddy/blob/main/bunny.ino) (Mode control), [`rabbit_v2.stl`](https://github.com/edison-science-corner/bunnybuddy/blob/main/rabbit_v2.stl) (Front frame), [`rabbit_lid_deep.stl`](https://github.com/edison-science-corner/bunnybuddy/blob/main/rabbit_lid_deep.stl) (Deep back lid)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_firmware["Firmware features"]
  node_controls["Button and serial<br/>[bunny.ino]"]
  node_firmware_core["Mode control<br/>[bunny.ino]"]
  node_faces["Animated faces<br/>[bunny.ino]"]
  node_timer["Countdown timer<br/>[bunny.ino]"]
  node_stopwatch["Stopwatch<br/>[bunny.ino]"]
  node_clock["Clock<br/>[bunny.ino]"]
  node_themes["Colour themes<br/>[bunny.ino]"]
  node_settings["Remembered settings<br/>[bunny.ino]"]
end

subgraph group_network["Network services"]
  node_ntp["Internet time"]
  node_weather["OpenWeatherMap"]
end

subgraph group_hardware["Physical design"]
  node_display["Round TFT display"]
  node_front_case["Front frame<br/>[rabbit_v2.stl]"]
  node_back_case["Deep back lid"]
end

node_user(("User"))

node_user -->|"operates"| node_controls
node_controls -->|"selects modes"| node_firmware_core
node_firmware_core -->|"selects"| node_faces
node_firmware_core -->|"selects"| node_timer
node_firmware_core -->|"selects"| node_stopwatch
node_firmware_core -->|"selects"| node_clock
node_firmware_core -->|"selects"| node_themes
node_firmware_core -.->|"remembers"| node_settings
node_faces -->|"renders"| node_display
node_timer -->|"renders"| node_display
node_stopwatch -->|"renders"| node_display
node_clock -->|"renders"| node_display
node_themes -->|"sets colours"| node_display
node_clock -->|"gets time"| node_ntp
node_clock -->|"gets weather"| node_weather
node_front_case -->|"clips together"| node_back_case

click node_controls "https://github.com/edison-science-corner/bunnybuddy/blob/main/bunny.ino"
click node_firmware_core "https://github.com/edison-science-corner/bunnybuddy/blob/main/bunny.ino"
click node_faces "https://github.com/edison-science-corner/bunnybuddy/blob/main/bunny.ino"
click node_timer "https://github.com/edison-science-corner/bunnybuddy/blob/main/bunny.ino"
click node_stopwatch "https://github.com/edison-science-corner/bunnybuddy/blob/main/bunny.ino"
click node_clock "https://github.com/edison-science-corner/bunnybuddy/blob/main/bunny.ino"
click node_themes "https://github.com/edison-science-corner/bunnybuddy/blob/main/bunny.ino"
click node_settings "https://github.com/edison-science-corner/bunnybuddy/blob/main/bunny.ino"
click node_front_case "https://github.com/edison-science-corner/bunnybuddy/blob/main/rabbit_v2.stl"
click node_back_case "https://github.com/edison-science-corner/bunnybuddy/blob/main/rabbit_lid_deep.stl"

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_controls,node_firmware_core,node_faces,node_timer,node_stopwatch,node_clock,node_themes,node_settings,node_user toneBlue
class node_ntp,node_weather toneAmber
class node_display,node_front_case,node_back_case toneMint
```

## Components

### Firmware features

- [Button and serial](https://github.com/edison-science-corner/bunnybuddy/blob/main/bunny.ino): `bunny.ino`
- [Mode control](https://github.com/edison-science-corner/bunnybuddy/blob/main/bunny.ino): `bunny.ino`
- [Animated faces](https://github.com/edison-science-corner/bunnybuddy/blob/main/bunny.ino): `bunny.ino`
- [Countdown timer](https://github.com/edison-science-corner/bunnybuddy/blob/main/bunny.ino): `bunny.ino`
- [Stopwatch](https://github.com/edison-science-corner/bunnybuddy/blob/main/bunny.ino): `bunny.ino`
- [Clock](https://github.com/edison-science-corner/bunnybuddy/blob/main/bunny.ino): `bunny.ino`
- [Colour themes](https://github.com/edison-science-corner/bunnybuddy/blob/main/bunny.ino): `bunny.ino`
- [Remembered settings](https://github.com/edison-science-corner/bunnybuddy/blob/main/bunny.ino): `bunny.ino`

### Network services

- **Internet time**
- **OpenWeatherMap**

### Physical design

- **Round TFT display**
- [Front frame](https://github.com/edison-science-corner/bunnybuddy/blob/main/rabbit_v2.stl): `rabbit_v2.stl`
- [Deep back lid](https://github.com/edison-science-corner/bunnybuddy/blob/main/rabbit_lid_deep.stl): `rabbit_lid_deep.stl`

### Other components

- **User**

## Connections

- User → Button and serial: operates (evidence: `README.md`)
- Button and serial → Mode control: selects modes (evidence: `README.md`)
- Mode control → Animated faces: selects (evidence: `README.md`)
- Mode control → Countdown timer: selects (evidence: `README.md`)
- Mode control → Stopwatch: selects (evidence: `README.md`)
- Mode control → Clock: selects (evidence: `README.md`)
- Mode control → Colour themes: selects (evidence: `README.md`)
- Mode control → Remembered settings: remembers
- Animated faces → Round TFT display: renders (evidence: `README.md`)
- Countdown timer → Round TFT display: renders (evidence: `README.md`)
- Stopwatch → Round TFT display: renders (evidence: `README.md`)
- Clock → Round TFT display: renders (evidence: `README.md`)
- Colour themes → Round TFT display: sets colours (evidence: `README.md`)
- Clock → Internet time: gets time (evidence: `README.md`)
- Clock → OpenWeatherMap: gets weather (evidence: `README.md`)
- Front frame → Deep back lid: clips together (evidence: `README.md`)
