# dh5dan/meshdash architecture

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

- Interactive diagram: https://gitdiagram.com/dh5dan/meshdash
- Repository: https://github.com/dh5dan/meshdash

## Overview

MeshDash-SQL is a PHP web appliance for viewing and managing MeshCom messages and node data. Users view and search incoming messages, organize them with filter groups, and send messages or commands; background receiver and polling processes support live updates, while SQLite stores messages, configuration, and telemetry. The README also documents MHeard maps, sensor alerts, beacons, backup restore, updates, and translation editing. Those unsampled capabilities are represented by their tree paths, but their wiring is omitted; edges below cite only relationships visible in excerpts or the README.

Main entry points: [`index.php`](https://github.com/dh5dan/meshdash/blob/master/index.php) (Dashboard), [`include/func_php_index.php`](https://github.com/dh5dan/meshdash/blob/master/include/func_php_index.php) (Domain databases), [`message.php`](https://github.com/dh5dan/meshdash/blob/master/message.php) (Message view), [`include/func_php_mheard.php`](https://github.com/dh5dan/meshdash/blob/master/include/func_php_mheard.php) (MHeard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_home["Dashboard<br/>[index.php]"]
  node_ui_core["UI core<br/>[func_js_core.php]"]
  node_ui_index["Dashboard UI<br/>[func_js_index.php]"]
  node_groups["Filter groups"]
  node_translation["Translation editor"]
end

subgraph group_messaging["Mesh messaging"]
  node_messages["Message view<br/>[message.php]"]
  node_message_logic["Message handling"]
  node_send["Message sending<br/>[send_msg.php]"]
  node_queue["Send queue<br/>[send_queue.php]"]
  node_command["Node commands"]
  node_udp["UDP receiver<br/>[udp_receiver.php]"]
end

subgraph group_telemetry["Node telemetry"]
  node_mheard["MHeard"]
  node_map["Node maps"]
  node_sensors["Sensor data"]
  node_thresholds["Sensor thresholds"]
  node_beacon["Beacon<br/>[send_beacon.php]"]
end

subgraph group_operations["Appliance operations"]
  node_config["Configuration<br/>[func_php_core.php]"]
  node_restore["Backup restore"]
  node_updates["Web updates"]
  node_diagnostics["Diagnostics"]
  node_scheduler["Background polling<br/>[cron_loop.php]"]
end

subgraph group_storage["SQLite storage"]
  node_paramdb[("Settings database<br/>[param.php]")]
  node_databases[("Domain databases<br/>[func_php_index.php]")]
end

node_user(("Operator"))
node_meshcom{{"MeshCom node"}}
node_sqlite[("SQLite")]

node_user -->|"opens"| node_home
node_home -->|"loads"| node_ui_index
node_home -->|"loads"| node_ui_core
node_home -->|"loads"| node_groups
node_ui_index -->|"refreshes"| node_messages
node_messages -.->|"uses"| node_message_logic
node_user -->|"views and searches"| node_messages
node_user -->|"sends messages"| node_send
node_user -->|"sends commands"| node_command
node_user -->|"views heard nodes"| node_mheard
node_user -->|"views telemetry"| node_sensors
node_user -->|"configures alerts"| node_thresholds
node_user -->|"restores backup"| node_restore
node_user -->|"updates appliance"| node_updates
node_user -->|"edits translations"| node_translation
node_udp -->|"writes received data"| node_databases
node_udp -->|"receives datagrams"| node_meshcom
node_scheduler -.->|"polls node"| node_meshcom
node_scheduler -.->|"collects telemetry"| node_sensors
node_scheduler -.->|"refreshes heard list"| node_mheard
node_mheard -->|"queries heard data"| node_meshcom
node_mheard -->|"stores heard data"| node_databases
node_messages -->|"reads messages"| node_databases
node_databases -->|"persists records"| node_sqlite
node_config -->|"reads settings"| node_paramdb
node_home -->|"initializes"| node_databases
node_thresholds -->|"uses settings"| node_config
node_user -->|"views maps"| node_map
node_user -->|"configures beacons"| node_beacon
node_user -->|"views diagnostics"| node_diagnostics
node_user -->|"queues messages"| node_queue

click node_home "https://github.com/dh5dan/meshdash/blob/master/index.php"
click node_ui_core "https://github.com/dh5dan/meshdash/blob/master/include/func_js_core.php"
click node_ui_index "https://github.com/dh5dan/meshdash/blob/master/include/func_js_index.php"
click node_groups "https://github.com/dh5dan/meshdash/blob/master/include/func_php_grp_definition.php"
click node_translation "https://github.com/dh5dan/meshdash/blob/master/translation_editor.php"
click node_messages "https://github.com/dh5dan/meshdash/blob/master/message.php"
click node_message_logic "https://github.com/dh5dan/meshdash/blob/master/include/func_php_message.php"
click node_send "https://github.com/dh5dan/meshdash/blob/master/send_msg.php"
click node_queue "https://github.com/dh5dan/meshdash/blob/master/send_queue.php"
click node_command "https://github.com/dh5dan/meshdash/blob/master/include/func_php_send_command.php"
click node_udp "https://github.com/dh5dan/meshdash/blob/master/udp_receiver.php"
click node_mheard "https://github.com/dh5dan/meshdash/blob/master/include/func_php_mheard.php"
click node_map "https://github.com/dh5dan/meshdash/blob/master/include/func_php_nodemap_standalone.php"
click node_sensors "https://github.com/dh5dan/meshdash/blob/master/include/func_php_sensor_data.php"
click node_thresholds "https://github.com/dh5dan/meshdash/blob/master/include/func_php_sensor_threshold.php"
click node_beacon "https://github.com/dh5dan/meshdash/blob/master/send_beacon.php"
click node_config "https://github.com/dh5dan/meshdash/blob/master/include/func_php_core.php"
click node_restore "https://github.com/dh5dan/meshdash/blob/master/include/func_php_config_restore.php"
click node_updates "https://github.com/dh5dan/meshdash/blob/master/include/func_php_config_update.php"
click node_diagnostics "https://github.com/dh5dan/meshdash/blob/master/include/func_php_debug_info.php"
click node_scheduler "https://github.com/dh5dan/meshdash/blob/master/cron_loop.php"
click node_paramdb "https://github.com/dh5dan/meshdash/blob/master/dbinc/param.php"
click node_databases "https://github.com/dh5dan/meshdash/blob/master/include/func_php_index.php"

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_home,node_ui_core,node_ui_index,node_groups,node_translation toneBlue
class node_messages,node_message_logic,node_send,node_queue,node_command,node_udp,node_sqlite toneAmber
class node_mheard,node_map,node_sensors,node_thresholds,node_beacon toneMint
class node_config,node_restore,node_updates,node_diagnostics,node_scheduler toneRose
class node_paramdb,node_databases,node_user,node_meshcom toneIndigo
```

## Components

### Web interface

- [Dashboard](https://github.com/dh5dan/meshdash/blob/master/index.php): `index.php`
- [UI core](https://github.com/dh5dan/meshdash/blob/master/include/func_js_core.php): `include/func_js_core.php`
- [Dashboard UI](https://github.com/dh5dan/meshdash/blob/master/include/func_js_index.php): `include/func_js_index.php`
- [Filter groups](https://github.com/dh5dan/meshdash/blob/master/include/func_php_grp_definition.php): `include/func_php_grp_definition.php`
- [Translation editor](https://github.com/dh5dan/meshdash/blob/master/translation_editor.php): `translation_editor.php`

### Mesh messaging

- [Message view](https://github.com/dh5dan/meshdash/blob/master/message.php): `message.php`
- [Message handling](https://github.com/dh5dan/meshdash/blob/master/include/func_php_message.php): `include/func_php_message.php`
- [Message sending](https://github.com/dh5dan/meshdash/blob/master/send_msg.php): `send_msg.php`
- [Send queue](https://github.com/dh5dan/meshdash/blob/master/send_queue.php): `send_queue.php`
- [Node commands](https://github.com/dh5dan/meshdash/blob/master/include/func_php_send_command.php): `include/func_php_send_command.php`
- [UDP receiver](https://github.com/dh5dan/meshdash/blob/master/udp_receiver.php): `udp_receiver.php`

### Node telemetry

- [MHeard](https://github.com/dh5dan/meshdash/blob/master/include/func_php_mheard.php): `include/func_php_mheard.php`
- [Node maps](https://github.com/dh5dan/meshdash/blob/master/include/func_php_nodemap_standalone.php): `include/func_php_nodemap_standalone.php`
- [Sensor data](https://github.com/dh5dan/meshdash/blob/master/include/func_php_sensor_data.php): `include/func_php_sensor_data.php`
- [Sensor thresholds](https://github.com/dh5dan/meshdash/blob/master/include/func_php_sensor_threshold.php): `include/func_php_sensor_threshold.php`
- [Beacon](https://github.com/dh5dan/meshdash/blob/master/send_beacon.php): `send_beacon.php`

### Appliance operations

- [Configuration](https://github.com/dh5dan/meshdash/blob/master/include/func_php_core.php): `include/func_php_core.php`
- [Backup restore](https://github.com/dh5dan/meshdash/blob/master/include/func_php_config_restore.php): `include/func_php_config_restore.php`
- [Web updates](https://github.com/dh5dan/meshdash/blob/master/include/func_php_config_update.php): `include/func_php_config_update.php`
- [Diagnostics](https://github.com/dh5dan/meshdash/blob/master/include/func_php_debug_info.php): `include/func_php_debug_info.php`
- [Background polling](https://github.com/dh5dan/meshdash/blob/master/cron_loop.php): `cron_loop.php`

### SQLite storage

- [Settings database](https://github.com/dh5dan/meshdash/blob/master/dbinc/param.php): `dbinc/param.php`
- [Domain databases](https://github.com/dh5dan/meshdash/blob/master/include/func_php_index.php): `include/func_php_index.php`

### Other components

- **Operator**
- **MeshCom node**
- **SQLite**

## Connections

- Operator → Dashboard: opens (evidence: `README.md`)
- Dashboard → Dashboard UI: loads (evidence: `index.php`)
- Dashboard → UI core: loads (evidence: `index.php`)
- Dashboard → Filter groups: loads (evidence: `index.php`)
- Dashboard UI → Message view: refreshes (evidence: `include/func_js_index.php`)
- Message view → Message handling: uses (evidence: `message.php`)
- Operator → Message view: views and searches (evidence: `README.md`)
- Operator → Message sending: sends messages (evidence: `README.md`)
- Operator → Node commands: sends commands (evidence: `README.md`)
- Operator → MHeard: views heard nodes (evidence: `README.md`)
- Operator → Sensor data: views telemetry (evidence: `README.md`)
- Operator → Sensor thresholds: configures alerts (evidence: `README.md`)
- Operator → Backup restore: restores backup (evidence: `README.md`)
- Operator → Web updates: updates appliance (evidence: `README.md`)
- Operator → Translation editor: edits translations (evidence: `README.md`)
- UDP receiver → Domain databases: writes received data (evidence: `udp_receiver.php`)
- UDP receiver → MeshCom node: receives datagrams (evidence: `udp_receiver.php`)
- Background polling → MeshCom node: polls node
- Background polling → Sensor data: collects telemetry
- Background polling → MHeard: refreshes heard list
- MHeard → MeshCom node: queries heard data (evidence: `include/func_php_mheard.php`)
- MHeard → Domain databases: stores heard data (evidence: `include/func_php_mheard.php`)
- Message view → Domain databases: reads messages (evidence: `message.php`)
- Domain databases → SQLite: persists records (evidence: `include/func_php_index.php`)
- Configuration → Settings database: reads settings (evidence: `include/func_php_core.php`)
- Dashboard → Domain databases: initializes (evidence: `index.php`)
- Sensor thresholds → Configuration: uses settings (evidence: `menu/sensor_threshold.php`)
- Operator → Node maps: views maps (evidence: `README.md`)
- Operator → Beacon: configures beacons (evidence: `README.md`)
- Operator → Diagnostics: views diagnostics (evidence: `README.md`)
- Operator → Send queue: queues messages (evidence: `README.md`)
