# chillibasket/walle-replica architecture

> Architecture diagram of the GitHub repository chillibasket/walle-replica, 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/chillibasket/walle-replica
- Repository: https://github.com/chillibasket/walle-replica

## Overview

Wall-E is a robot replica controlled by Arduino firmware and a Flask web interface hosted on a Raspberry Pi. Users log in through the browser, issue joystick, gamepad, servo, animation, sound, or Blockly actions, and the backend communicates with the Arduino over USB serial; camera streaming is a separate capability. The Arduino handles movement and battery monitoring, with an optional OLED display. The README documents capabilities whose implementation was not sampled; those are represented at their existing directory paths, and the graph avoids inferring unshown internal calls.

Main entry points: [`wall-e/wall-e.ino`](https://github.com/chillibasket/walle-replica/blob/master/wall-e/wall-e.ino) (Robot controller), [`web_interface/app.py`](https://github.com/chillibasket/walle-replica/blob/master/web_interface/app.py) (Flask backend), [`web_interface/static/js/automation.js`](https://github.com/chillibasket/walle-replica/blob/master/web_interface/static/js/automation.js) (Blockly editor), [`web_interface/picamera2_stream.py`](https://github.com/chillibasket/walle-replica/blob/master/web_interface/picamera2_stream.py) (Camera streaming)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web control"]
  node_flask["Flask backend<br/>[app.py]"]
  node_settings["Web settings<br/>[config.py]"]
  node_joystick["Joystick controls<br/>[joystick.js]"]
  node_dashboard["Dashboard controls<br/>[main.js]"]
  node_camera["Camera streaming"]
  node_serial["USB serial link"]
end

subgraph group_automation["Automation"]
  node_automation_ui["Blockly editor<br/>[automation.js]"]
  node_blockly_core["Blockly runtime"]
  node_blockly_blocks["Blockly blocks"]
  node_blockly_generator["JavaScript generator"]
  node_interpreter["Code interpreter"]
end

subgraph group_robot["Robot firmware"]
  node_firmware["Robot controller<br/>[wall-e.ino]"]
  node_animation_queue["Animation queue<br/>[animations.ino]"]
  node_queue_impl["Queue implementation<br/>[Queue.hpp]"]
  node_motor_control["Motor control"]
  node_display["OLED display<br/>[display.ino]"]
end

subgraph group_hardware["Hardware and setup"]
  node_calibration["Servo calibration"]
  node_robot_hardware["Robot motors and servos"]
end

node_operator(("Robot operator"))
node_browser(("Control browser"))
node_camera_device["Pi camera"]

node_operator -->|"uses"| node_browser
node_browser -->|"sends controls"| node_flask
node_joystick -->|"posts joystick"| node_flask
node_flask -->|"queues commands"| node_serial
node_serial -->|"sends serial"| node_firmware
node_firmware -->|"controls servos"| node_robot_hardware
node_firmware -->|"runs animations"| node_animation_queue
node_animation_queue -.->|"uses queue"| node_queue_impl
node_firmware -.->|"controls motors"| node_motor_control
node_firmware -->|"updates display"| node_display
node_calibration -->|"calibrates servos"| node_robot_hardware
node_camera -->|"streams video"| node_camera_device
node_browser -->|"requests stream"| node_camera
node_browser -->|"programs actions"| node_automation_ui
node_automation_ui -.->|"creates workspace"| node_blockly_core
node_automation_ui -->|"executes generated code"| node_interpreter
node_automation_ui -->|"posts robot actions"| node_flask
node_settings -.->|"configures"| node_flask

click node_flask "https://github.com/chillibasket/walle-replica/blob/master/web_interface/app.py"
click node_settings "https://github.com/chillibasket/walle-replica/blob/master/web_interface/config.py"
click node_joystick "https://github.com/chillibasket/walle-replica/blob/master/web_interface/static/js/joystick.js"
click node_dashboard "https://github.com/chillibasket/walle-replica/blob/master/web_interface/static/js/main.js"
click node_camera "https://github.com/chillibasket/walle-replica/blob/master/web_interface/picamera2_stream.py"
click node_automation_ui "https://github.com/chillibasket/walle-replica/blob/master/web_interface/static/js/automation.js"
click node_blockly_core "https://github.com/chillibasket/walle-replica/blob/master/web_interface/static/js/blockly/blockly_compressed.js"
click node_blockly_blocks "https://github.com/chillibasket/walle-replica/blob/master/web_interface/static/js/blockly/blocks_compressed.js"
click node_blockly_generator "https://github.com/chillibasket/walle-replica/blob/master/web_interface/static/js/blockly/javascript_compressed.js"
click node_interpreter "https://github.com/chillibasket/walle-replica/blob/master/web_interface/static/js/blockly/acorn_interpreter.js"
click node_firmware "https://github.com/chillibasket/walle-replica/blob/master/wall-e/wall-e.ino"
click node_animation_queue "https://github.com/chillibasket/walle-replica/blob/master/wall-e/animations.ino"
click node_queue_impl "https://github.com/chillibasket/walle-replica/blob/master/wall-e/Queue.hpp"
click node_motor_control "https://github.com/chillibasket/walle-replica/blob/master/wall-e/MotorController.hpp"
click node_display "https://github.com/chillibasket/walle-replica/blob/master/wall-e/display.ino"
click node_calibration "https://github.com/chillibasket/walle-replica/blob/master/wall-e_calibration/wall-e_calibration.ino"

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_flask,node_settings,node_joystick,node_dashboard,node_camera,node_serial,node_browser toneBlue
class node_automation_ui,node_blockly_core,node_blockly_blocks,node_blockly_generator,node_interpreter toneAmber
class node_firmware,node_animation_queue,node_queue_impl,node_motor_control,node_display toneMint
class node_calibration,node_robot_hardware toneRose
class node_operator,node_camera_device toneIndigo
```

## Components

### Web control

- [Flask backend](https://github.com/chillibasket/walle-replica/blob/master/web_interface/app.py): `web_interface/app.py`
- [Web settings](https://github.com/chillibasket/walle-replica/blob/master/web_interface/config.py): `web_interface/config.py`
- [Joystick controls](https://github.com/chillibasket/walle-replica/blob/master/web_interface/static/js/joystick.js): `web_interface/static/js/joystick.js`
- [Dashboard controls](https://github.com/chillibasket/walle-replica/blob/master/web_interface/static/js/main.js): `web_interface/static/js/main.js`
- [Camera streaming](https://github.com/chillibasket/walle-replica/blob/master/web_interface/picamera2_stream.py): `web_interface/picamera2_stream.py`
- **USB serial link**

### Automation

- [Blockly editor](https://github.com/chillibasket/walle-replica/blob/master/web_interface/static/js/automation.js): `web_interface/static/js/automation.js`
- [Blockly runtime](https://github.com/chillibasket/walle-replica/blob/master/web_interface/static/js/blockly/blockly_compressed.js): `web_interface/static/js/blockly/blockly_compressed.js`
- [Blockly blocks](https://github.com/chillibasket/walle-replica/blob/master/web_interface/static/js/blockly/blocks_compressed.js): `web_interface/static/js/blockly/blocks_compressed.js`
- [JavaScript generator](https://github.com/chillibasket/walle-replica/blob/master/web_interface/static/js/blockly/javascript_compressed.js): `web_interface/static/js/blockly/javascript_compressed.js`
- [Code interpreter](https://github.com/chillibasket/walle-replica/blob/master/web_interface/static/js/blockly/acorn_interpreter.js): `web_interface/static/js/blockly/acorn_interpreter.js`

### Robot firmware

- [Robot controller](https://github.com/chillibasket/walle-replica/blob/master/wall-e/wall-e.ino): `wall-e/wall-e.ino`
- [Animation queue](https://github.com/chillibasket/walle-replica/blob/master/wall-e/animations.ino): `wall-e/animations.ino`
- [Queue implementation](https://github.com/chillibasket/walle-replica/blob/master/wall-e/Queue.hpp): `wall-e/Queue.hpp`
- [Motor control](https://github.com/chillibasket/walle-replica/blob/master/wall-e/MotorController.hpp): `wall-e/MotorController.hpp`
- [OLED display](https://github.com/chillibasket/walle-replica/blob/master/wall-e/display.ino): `wall-e/display.ino`

### Hardware and setup

- [Servo calibration](https://github.com/chillibasket/walle-replica/blob/master/wall-e_calibration/wall-e_calibration.ino): `wall-e_calibration/wall-e_calibration.ino`
- **Robot motors and servos**

### Other components

- **Robot operator**
- **Control browser**
- **Pi camera**

## Connections

- Robot operator → Control browser: uses (evidence: `README.md`)
- Control browser → Flask backend: sends controls (evidence: `README.md`)
- Joystick controls → Flask backend: posts joystick (evidence: `web_interface/static/js/joystick.js`)
- Flask backend → USB serial link: queues commands (evidence: `web_interface/app.py`)
- USB serial link → Robot controller: sends serial (evidence: `README.md`)
- Robot controller → Robot motors and servos: controls servos (evidence: `README.md`)
- Robot controller → Animation queue: runs animations (evidence: `README.md`)
- Animation queue → Queue implementation: uses queue
- Robot controller → Motor control: controls motors
- Robot controller → OLED display: updates display (evidence: `README.md`)
- Servo calibration → Robot motors and servos: calibrates servos (evidence: `README.md`)
- Camera streaming → Pi camera: streams video (evidence: `web_interface/picamera2_stream.py`)
- Control browser → Camera streaming: requests stream
- Control browser → Blockly editor: programs actions (evidence: `README.md`)
- Blockly editor → Blockly runtime: creates workspace
- Blockly editor → Code interpreter: executes generated code (evidence: `web_interface/static/js/automation.js`)
- Blockly editor → Flask backend: posts robot actions (evidence: `web_interface/static/js/automation.js`)
- Web settings → Flask backend: configures
