# wrouwet/wallabmc architecture

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

- Interactive diagram: https://gitdiagram.com/wrouwet/wallabmc
- Repository: https://github.com/wrouwet/wallabmc

## Overview

WallaBMC is embedded BMC firmware. At boot, its main routine initializes hardware and services; administrators then manage the BMC through Redfish, the web UI, or shell/console access. Redfish exposes management resources backed by configuration, power, time, sensor, and identity services. The README documents additional UI and console capabilities whose internal routing is not fully shown; those links are included only where documented or evidenced.

Main entry points: [`src/main.c`](https://github.com/wrouwet/wallabmc/blob/main/src/main.c) (Startup coordinator), [`src/redfish.c`](https://github.com/wrouwet/wallabmc/blob/main/src/redfish.c) (Redfish API), [`src/console_bridge.c`](https://github.com/wrouwet/wallabmc/blob/main/src/console_bridge.c) (BMC shell), [`src/console_bridge_ws.c`](https://github.com/wrouwet/wallabmc/blob/main/src/console_bridge_ws.c) (WebSocket console)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot["Boot and platform"]
  node_main["Startup coordinator<br/>[main.c]"]
  node_button["Status button<br/>[button.c]"]
  node_power["Host power control<br/>[power.c]"]
  node_jtag["JTAG control<br/>[jtag.c]"]
  node_sensors["Sensors<br/>[sensors.c]"]
end

subgraph group_net["Network services"]
  node_network["Network management<br/>[net.c]"]
  node_dhcp["DHCP<br/>[dhcp.c]"]
  node_ntp["NTP time sync<br/>[ntp.c]"]
end

subgraph group_management["Management interfaces"]
  node_http["HTTP server<br/>[http.c]"]
  node_redfish["Redfish API<br/>[redfish.c]"]
  node_webui["Web administration UI<br/>[web.c]"]
end

subgraph group_state["Configuration and state"]
  node_rtc["RTC<br/>[rtc.c]"]
  node_vpd["Vital product data<br/>[vpd.c]"]
  node_config["Persistent configuration<br/>[config.c]"]
  node_filesystem[("Key-value storage<br/>[fs.c]")]
end

subgraph group_console["Console access"]
  node_shell["BMC shell<br/>[console_bridge.c]"]
  node_hostconsole["Host serial console<br/>[console_logger.c]"]
  node_websocket["WebSocket console"]
  node_synch["Console synchronization<br/>[synch.c]"]
end

node_operator(("Administrator"))

node_main -->|"initializes"| node_rtc
node_main -->|"initializes"| node_vpd
node_main -->|"initializes"| node_filesystem
node_main -->|"initializes"| node_config
node_main -->|"initializes"| node_button
node_main -->|"initializes"| node_network
node_main -->|"initializes"| node_power
node_main -->|"initializes"| node_sensors
node_main -->|"initializes"| node_jtag
node_main -->|"initializes"| node_http
node_main -->|"initializes"| node_shell
node_main -->|"initializes"| node_websocket
node_config -->|"reads and writes"| node_filesystem
node_network -->|"uses"| node_dhcp
node_network -->|"starts and stops"| node_ntp
node_ntp -->|"sets time"| node_rtc
node_operator -->|"makes requests"| node_http
node_http -->|"serves API"| node_redfish
node_operator -->|"administers through"| node_webui
node_operator -->|"uses"| node_shell
node_operator -->|"opens console"| node_websocket
node_websocket -->|"reads and writes"| node_hostconsole
node_shell -->|"bridges console"| node_hostconsole
node_websocket -->|"signals events"| node_synch
node_shell -->|"uses events"| node_synch
node_redfish -->|"reads and updates"| node_config
node_redfish -->|"controls"| node_power
node_redfish -->|"uses time"| node_rtc
node_redfish -->|"reads telemetry"| node_sensors
node_redfish -->|"reads identity"| node_vpd

click node_main "https://github.com/wrouwet/wallabmc/blob/main/src/main.c"
click node_button "https://github.com/wrouwet/wallabmc/blob/main/src/button.c"
click node_power "https://github.com/wrouwet/wallabmc/blob/main/src/power.c"
click node_jtag "https://github.com/wrouwet/wallabmc/blob/main/src/jtag.c"
click node_sensors "https://github.com/wrouwet/wallabmc/blob/main/src/sensors.c"
click node_rtc "https://github.com/wrouwet/wallabmc/blob/main/src/rtc.c"
click node_vpd "https://github.com/wrouwet/wallabmc/blob/main/src/vpd.c"
click node_config "https://github.com/wrouwet/wallabmc/blob/main/src/config.c"
click node_filesystem "https://github.com/wrouwet/wallabmc/blob/main/src/fs.c"
click node_network "https://github.com/wrouwet/wallabmc/blob/main/src/net.c"
click node_dhcp "https://github.com/wrouwet/wallabmc/blob/main/src/dhcp.c"
click node_ntp "https://github.com/wrouwet/wallabmc/blob/main/src/ntp.c"
click node_http "https://github.com/wrouwet/wallabmc/blob/main/src/http.c"
click node_redfish "https://github.com/wrouwet/wallabmc/blob/main/src/redfish.c"
click node_webui "https://github.com/wrouwet/wallabmc/blob/main/src/web.c"
click node_shell "https://github.com/wrouwet/wallabmc/blob/main/src/console_bridge.c"
click node_hostconsole "https://github.com/wrouwet/wallabmc/blob/main/src/console_logger.c"
click node_websocket "https://github.com/wrouwet/wallabmc/blob/main/src/console_bridge_ws.c"
click node_synch "https://github.com/wrouwet/wallabmc/blob/main/src/synch.c"

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_button,node_power,node_jtag,node_sensors toneBlue
class node_network,node_dhcp,node_ntp toneAmber
class node_http,node_redfish,node_webui toneMint
class node_rtc,node_vpd,node_config,node_filesystem toneRose
class node_shell,node_hostconsole,node_websocket,node_synch,node_operator toneIndigo
```

## Components

### Boot and platform

- [Startup coordinator](https://github.com/wrouwet/wallabmc/blob/main/src/main.c): `src/main.c`
- [Status button](https://github.com/wrouwet/wallabmc/blob/main/src/button.c): `src/button.c`
- [Host power control](https://github.com/wrouwet/wallabmc/blob/main/src/power.c): `src/power.c`
- [JTAG control](https://github.com/wrouwet/wallabmc/blob/main/src/jtag.c): `src/jtag.c`
- [Sensors](https://github.com/wrouwet/wallabmc/blob/main/src/sensors.c): `src/sensors.c`

### Network services

- [Network management](https://github.com/wrouwet/wallabmc/blob/main/src/net.c): `src/net.c`
- [DHCP](https://github.com/wrouwet/wallabmc/blob/main/src/dhcp.c): `src/dhcp.c`
- [NTP time sync](https://github.com/wrouwet/wallabmc/blob/main/src/ntp.c): `src/ntp.c`

### Management interfaces

- [HTTP server](https://github.com/wrouwet/wallabmc/blob/main/src/http.c): `src/http.c`
- [Redfish API](https://github.com/wrouwet/wallabmc/blob/main/src/redfish.c): `src/redfish.c`
- [Web administration UI](https://github.com/wrouwet/wallabmc/blob/main/src/web.c): `src/web.c`

### Configuration and state

- [RTC](https://github.com/wrouwet/wallabmc/blob/main/src/rtc.c): `src/rtc.c`
- [Vital product data](https://github.com/wrouwet/wallabmc/blob/main/src/vpd.c): `src/vpd.c`
- [Persistent configuration](https://github.com/wrouwet/wallabmc/blob/main/src/config.c): `src/config.c`
- [Key-value storage](https://github.com/wrouwet/wallabmc/blob/main/src/fs.c): `src/fs.c`

### Console access

- [BMC shell](https://github.com/wrouwet/wallabmc/blob/main/src/console_bridge.c): `src/console_bridge.c`
- [Host serial console](https://github.com/wrouwet/wallabmc/blob/main/src/console_logger.c): `src/console_logger.c`
- [WebSocket console](https://github.com/wrouwet/wallabmc/blob/main/src/console_bridge_ws.c): `src/console_bridge_ws.c`
- [Console synchronization](https://github.com/wrouwet/wallabmc/blob/main/src/synch.c): `src/synch.c`

### Other components

- **Administrator**

## Connections

- Startup coordinator → RTC: initializes (evidence: `src/main.c`)
- Startup coordinator → Vital product data: initializes (evidence: `src/main.c`)
- Startup coordinator → Key-value storage: initializes (evidence: `src/main.c`)
- Startup coordinator → Persistent configuration: initializes (evidence: `src/main.c`)
- Startup coordinator → Status button: initializes (evidence: `src/main.c`)
- Startup coordinator → Network management: initializes (evidence: `src/main.c`)
- Startup coordinator → Host power control: initializes (evidence: `src/main.c`)
- Startup coordinator → Sensors: initializes (evidence: `src/main.c`)
- Startup coordinator → JTAG control: initializes (evidence: `src/main.c`)
- Startup coordinator → HTTP server: initializes (evidence: `src/main.c`)
- Startup coordinator → BMC shell: initializes (evidence: `src/main.c`)
- Startup coordinator → WebSocket console: initializes (evidence: `src/main.c`)
- Persistent configuration → Key-value storage: reads and writes (evidence: `src/config.c`)
- Network management → DHCP: uses (evidence: `src/net.c`)
- Network management → NTP time sync: starts and stops (evidence: `src/net.c`)
- NTP time sync → RTC: sets time (evidence: `src/ntp.c`)
- Administrator → HTTP server: makes requests (evidence: `README.md`)
- HTTP server → Redfish API: serves API (evidence: `README.md`)
- Administrator → Web administration UI: administers through (evidence: `README.md`)
- Administrator → BMC shell: uses (evidence: `README.md`)
- Administrator → WebSocket console: opens console (evidence: `README.md`)
- WebSocket console → Host serial console: reads and writes (evidence: `src/console_bridge_ws.c`)
- BMC shell → Host serial console: bridges console (evidence: `src/console_bridge.c`)
- WebSocket console → Console synchronization: signals events (evidence: `src/console_bridge_ws.c`)
- BMC shell → Console synchronization: uses events (evidence: `src/console_bridge.c`)
- Redfish API → Persistent configuration: reads and updates (evidence: `src/redfish.c`)
- Redfish API → Host power control: controls (evidence: `src/redfish.c`)
- Redfish API → RTC: uses time (evidence: `src/redfish.c`)
- Redfish API → Sensors: reads telemetry (evidence: `src/redfish.c`)
- Redfish API → Vital product data: reads identity (evidence: `src/redfish.c`)
