# rovixane/rovixane-ir architecture

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

- Interactive diagram: https://gitdiagram.com/rovixane/rovixane-ir
- Repository: https://github.com/rovixane/rovixane-ir

## Overview

ROVIXANE IR is an offline-first ESP8266 universal infrared remote. A phone browser connects to the device-hosted dashboard, configures or selects a remote profile, then sends mapped signals or learns codes from an existing remote; profiles and settings persist locally. The graph preserves the documented setup/security, custom remotes, backup, OTA, diagnostics, and bilingual UI capabilities. Firmware request routing is concentrated in the Arduino sketch, but its source was not excerpted; those relationships are included only where the README documents them. The Android WebView wrapper is not part of the primary device workflow.

Main entry points: [`rovixane-ir.ino`](https://github.com/rovixane/rovixane-ir/blob/main/rovixane-ir.ino) (HTTP and device runtime), [`data/app.js`](https://github.com/rovixane/rovixane-ir/blob/main/data/app.js) (Remote dashboard), [`SignalStore.cpp`](https://github.com/rovixane/rovixane-ir/blob/main/SignalStore.cpp) (Profiles and signal database), [`OtaService.h`](https://github.com/rovixane/rovixane-ir/blob/main/OtaService.h) (Firmware OTA upload)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Dashboard client"]
  node_dashboard["Remote dashboard<br/>[app.js]"]
end

subgraph group_firmware["Device firmware"]
  node_webassets["Embedded web assets<br/>[WebAssets.h]"]
  node_firmware_entry["HTTP and device runtime<br/>[rovixane-ir.ino]"]
  node_wifi["Wi-Fi and setup AP<br/>[rovixane-ir.ino]"]
  node_security["Setup and API security<br/>[rovixane-ir.ino]"]
  node_config["Device configuration<br/>[AppConfig.cpp]"]
  node_signals["Profiles and signal database<br/>[SignalStore.cpp]"]
  node_learning["Signal learning<br/>[rovixane-ir.ino]"]
  node_ota["Firmware OTA upload<br/>[OtaService.h]"]
  node_diagnostics["Device diagnostics<br/>[rovixane-ir.ino]"]
end

subgraph group_persistence["Local persistence"]
  node_storage[("Crash-safe file storage<br/>[Storage.cpp]")]
end

subgraph group_hardware["Hardware services"]
  node_ir_engine["IR encode and transmit<br/>[IrEngine.h]"]
  node_littlefs[("LittleFS")]
  node_ir_receiver["IR receiver<br/>[Compatibility.h]"]
  node_ir_transmitter["IR transmitter<br/>[Compatibility.h]"]
  node_flash_updater["ESP flash updater"]
end

node_phone(("Phone browser"))
node_ir_remote(("Existing IR remote"))

node_phone -->|"uses"| node_dashboard
node_dashboard -->|"requests device APIs"| node_firmware_entry
node_firmware_entry -->|"serves dashboard assets"| node_webassets
node_firmware_entry -->|"provides device access"| node_wifi
node_firmware_entry -->|"protects API actions"| node_security
node_firmware_entry -.->|"loads and saves settings"| node_config
node_firmware_entry -->|"reads and updates profiles"| node_signals
node_dashboard -->|"saves profiles and mappings"| node_signals
node_firmware_entry -->|"handles learn requests"| node_learning
node_ir_remote -->|"emits codes"| node_ir_receiver
node_learning -.->|"captures signal"| node_ir_receiver
node_learning -->|"stores learned mapping"| node_signals
node_dashboard -->|"requests mapped send"| node_ir_engine
node_firmware_entry -.->|"dispatches signal send"| node_ir_engine
node_ir_engine -->|"transmits IR frames"| node_ir_transmitter
node_signals -->|"loads and persists database"| node_storage
node_config -->|"loads and persists config"| node_storage
node_storage -->|"reads and writes files"| node_littlefs
node_dashboard -->|"uploads firmware"| node_ota
node_firmware_entry -.->|"handles upload lifecycle"| node_ota
node_ota -->|"writes firmware image"| node_flash_updater
node_dashboard -->|"requests device status"| node_diagnostics

click node_dashboard "https://github.com/rovixane/rovixane-ir/blob/main/data/app.js"
click node_webassets "https://github.com/rovixane/rovixane-ir/blob/main/WebAssets.h"
click node_firmware_entry "https://github.com/rovixane/rovixane-ir/blob/main/rovixane-ir.ino"
click node_wifi "https://github.com/rovixane/rovixane-ir/blob/main/rovixane-ir.ino"
click node_security "https://github.com/rovixane/rovixane-ir/blob/main/rovixane-ir.ino"
click node_config "https://github.com/rovixane/rovixane-ir/blob/main/AppConfig.cpp"
click node_signals "https://github.com/rovixane/rovixane-ir/blob/main/SignalStore.cpp"
click node_learning "https://github.com/rovixane/rovixane-ir/blob/main/rovixane-ir.ino"
click node_ir_engine "https://github.com/rovixane/rovixane-ir/blob/main/IrEngine.h"
click node_ota "https://github.com/rovixane/rovixane-ir/blob/main/OtaService.h"
click node_diagnostics "https://github.com/rovixane/rovixane-ir/blob/main/rovixane-ir.ino"
click node_storage "https://github.com/rovixane/rovixane-ir/blob/main/Storage.cpp"
click node_ir_receiver "https://github.com/rovixane/rovixane-ir/blob/main/Compatibility.h"
click node_ir_transmitter "https://github.com/rovixane/rovixane-ir/blob/main/Compatibility.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_dashboard,node_phone toneBlue
class node_webassets,node_firmware_entry,node_wifi,node_security,node_config,node_signals,node_learning,node_ota,node_diagnostics toneAmber
class node_storage toneMint
class node_ir_engine,node_littlefs,node_ir_receiver,node_ir_transmitter,node_flash_updater toneRose
class node_ir_remote toneIndigo
```

## Components

### Dashboard client

- [Remote dashboard](https://github.com/rovixane/rovixane-ir/blob/main/data/app.js): `data/app.js`

### Device firmware

- [Embedded web assets](https://github.com/rovixane/rovixane-ir/blob/main/WebAssets.h): `WebAssets.h`
- [HTTP and device runtime](https://github.com/rovixane/rovixane-ir/blob/main/rovixane-ir.ino): `rovixane-ir.ino`
- [Wi-Fi and setup AP](https://github.com/rovixane/rovixane-ir/blob/main/rovixane-ir.ino): `rovixane-ir.ino`
- [Setup and API security](https://github.com/rovixane/rovixane-ir/blob/main/rovixane-ir.ino): `rovixane-ir.ino`
- [Device configuration](https://github.com/rovixane/rovixane-ir/blob/main/AppConfig.cpp): `AppConfig.cpp`
- [Profiles and signal database](https://github.com/rovixane/rovixane-ir/blob/main/SignalStore.cpp): `SignalStore.cpp`
- [Signal learning](https://github.com/rovixane/rovixane-ir/blob/main/rovixane-ir.ino): `rovixane-ir.ino`
- [Firmware OTA upload](https://github.com/rovixane/rovixane-ir/blob/main/OtaService.h): `OtaService.h`
- [Device diagnostics](https://github.com/rovixane/rovixane-ir/blob/main/rovixane-ir.ino): `rovixane-ir.ino`

### Local persistence

- [Crash-safe file storage](https://github.com/rovixane/rovixane-ir/blob/main/Storage.cpp): `Storage.cpp`

### Hardware services

- [IR encode and transmit](https://github.com/rovixane/rovixane-ir/blob/main/IrEngine.h): `IrEngine.h`
- **LittleFS**
- [IR receiver](https://github.com/rovixane/rovixane-ir/blob/main/Compatibility.h): `Compatibility.h`
- [IR transmitter](https://github.com/rovixane/rovixane-ir/blob/main/Compatibility.h): `Compatibility.h`
- **ESP flash updater**

### Other components

- **Phone browser**
- **Existing IR remote**

## Connections

- Phone browser → Remote dashboard: uses (evidence: `README.md`)
- Remote dashboard → HTTP and device runtime: requests device APIs (evidence: `data/app.js`)
- HTTP and device runtime → Embedded web assets: serves dashboard assets (evidence: `README.md`)
- HTTP and device runtime → Wi-Fi and setup AP: provides device access (evidence: `README.md`)
- HTTP and device runtime → Setup and API security: protects API actions (evidence: `README.md`)
- HTTP and device runtime → Device configuration: loads and saves settings
- HTTP and device runtime → Profiles and signal database: reads and updates profiles (evidence: `README.md`)
- Remote dashboard → Profiles and signal database: saves profiles and mappings (evidence: `data/app.js`)
- HTTP and device runtime → Signal learning: handles learn requests (evidence: `README.md`)
- Existing IR remote → IR receiver: emits codes (evidence: `README.md`)
- Signal learning → IR receiver: captures signal
- Signal learning → Profiles and signal database: stores learned mapping (evidence: `README.md`)
- Remote dashboard → IR encode and transmit: requests mapped send (evidence: `data/app.js`)
- HTTP and device runtime → IR encode and transmit: dispatches signal send
- IR encode and transmit → IR transmitter: transmits IR frames (evidence: `IrEngine.h`)
- Profiles and signal database → Crash-safe file storage: loads and persists database (evidence: `SignalStore.cpp`)
- Device configuration → Crash-safe file storage: loads and persists config (evidence: `AppConfig.cpp`)
- Crash-safe file storage → LittleFS: reads and writes files (evidence: `Storage.cpp`)
- Remote dashboard → Firmware OTA upload: uploads firmware (evidence: `README.md`)
- HTTP and device runtime → Firmware OTA upload: handles upload lifecycle
- Firmware OTA upload → ESP flash updater: writes firmware image (evidence: `OtaService.h`)
- Remote dashboard → Device diagnostics: requests device status (evidence: `README.md`)
