# kenzok8/openwrt-daede architecture

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

- Interactive diagram: https://gitdiagram.com/kenzok8/openwrt-daede
- Repository: https://github.com/kenzok8/openwrt-daede

## Overview

This repository packages an OpenWrt transparent-proxy stack: the dae and daed backends plus a shared LuCI management app. The main user workflow is selecting a backend, configuring or importing proxy subscriptions, applying settings, and then controlling services or inspecting logs and updates. The README documents the backends’ broader capabilities; this tree primarily supplies packaging and the LuCI app rather than the dae/daed core implementations. Connections involving unsampled views and scripts are omitted unless documented.

Main entry points: [`luci-app-daede/htdocs/luci-static/resources/view/daede`](https://github.com/kenzok8/openwrt-daede/tree/main/luci-app-daede/htdocs/luci-static/resources/view/daede) (LuCI app), [`luci-app-daede/htdocs/luci-static/resources/view/daede/converter.js`](https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/converter.js) (Subscription import), [`luci-app-daede/htdocs/luci-static/resources/view/daede/backend.js`](https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/backend.js) (Backend detection), [`luci-app-daede/htdocs/luci-static/resources/view/daede/daed.js`](https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/daed.js) (daed settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_management["LuCI management"]
  node_luci["LuCI app"]
  node_backend["Backend detection<br/>[backend.js]"]
  node_styles["Shared styling<br/>[styles.js]"]
end

subgraph group_config["Configuration and imports"]
  node_dae_config["dae editor<br/>[dae.js]"]
  node_daed_config["daed settings<br/>[daed.js]"]
  node_subscription_import["Subscription import<br/>[converter.js]"]
  node_clash_convert["Clash conversion<br/>[clash-converter.js]"]
  node_airport_sync["Airport sync<br/>[airport-sync.js]"]
  node_session["daed session<br/>[daed-session.js]"]
  node_uci[("UCI settings")]
end

subgraph group_operations["Service operations"]
  node_widgets["Service widgets<br/>[widgets.js]"]
  node_logs["Log viewer<br/>[log.js]"]
  node_updates["Updates and health<br/>[updates.js]"]
  node_subscription_script["Subscription updater<br/>[daed-sub-update.sh]"]
end

subgraph group_packages["Proxy backends"]
  node_dae["dae proxy engine"]
  node_daed["daed dashboard backend"]
  node_web_api["daed Web API"]
end

node_operator(("OpenWrt operator"))

node_operator -->|"manages through"| node_luci
node_luci -.->|"selects backend"| node_backend
node_luci -.->|"configures"| node_dae_config
node_luci -.->|"configures"| node_daed_config
node_luci -.->|"imports subscriptions"| node_subscription_import
node_subscription_import -->|"uses helpers"| node_airport_sync
node_subscription_import -.->|"converts nodes"| node_clash_convert
node_subscription_import -->|"updates settings"| node_uci
node_subscription_import -->|"synchronizes nodes"| node_web_api
node_daed_config -->|"runs updater"| node_subscription_script
node_daed_config -->|"saves settings"| node_uci
node_widgets -->|"queries service state"| node_backend
node_logs -->|"gets backend details"| node_backend
node_logs -->|"uses styles"| node_styles
node_updates -.->|"runs update tasks"| node_subscription_script
node_backend -->|"detects and controls"| node_dae
node_backend -->|"detects and controls"| node_daed
node_daed -->|"provides API"| node_web_api
node_operator -.->|"checks status"| node_updates
node_operator -.->|"views logs"| node_logs

click node_luci "https://github.com/kenzok8/openwrt-daede/tree/main/luci-app-daede/htdocs/luci-static/resources/view/daede"
click node_backend "https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/backend.js"
click node_dae_config "https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/dae.js"
click node_daed_config "https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/daed.js"
click node_subscription_import "https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/converter.js"
click node_clash_convert "https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/clash-converter.js"
click node_airport_sync "https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/airport-sync.js"
click node_session "https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/daed-session.js"
click node_uci "https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/root/etc/config/daede"
click node_widgets "https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/widgets.js"
click node_logs "https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/log.js"
click node_updates "https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/updates.js"
click node_styles "https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/styles.js"
click node_subscription_script "https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/root/usr/share/luci-app-daede/daed-sub-update.sh"
click node_dae "https://github.com/kenzok8/openwrt-daede/tree/main/dae"
click node_daed "https://github.com/kenzok8/openwrt-daede/tree/main/daed"

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_luci,node_backend,node_styles toneBlue
class node_dae_config,node_daed_config,node_subscription_import,node_clash_convert,node_airport_sync,node_session,node_uci toneAmber
class node_widgets,node_logs,node_updates,node_subscription_script toneMint
class node_dae,node_daed,node_web_api toneRose
class node_operator toneIndigo
```

## Components

### LuCI management

- [LuCI app](https://github.com/kenzok8/openwrt-daede/tree/main/luci-app-daede/htdocs/luci-static/resources/view/daede): `luci-app-daede/htdocs/luci-static/resources/view/daede`
- [Backend detection](https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/backend.js): `luci-app-daede/htdocs/luci-static/resources/view/daede/backend.js`
- [Shared styling](https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/styles.js): `luci-app-daede/htdocs/luci-static/resources/view/daede/styles.js`

### Configuration and imports

- [dae editor](https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/dae.js): `luci-app-daede/htdocs/luci-static/resources/view/daede/dae.js`
- [daed settings](https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/daed.js): `luci-app-daede/htdocs/luci-static/resources/view/daede/daed.js`
- [Subscription import](https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/converter.js): `luci-app-daede/htdocs/luci-static/resources/view/daede/converter.js`
- [Clash conversion](https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/clash-converter.js): `luci-app-daede/htdocs/luci-static/resources/view/daede/clash-converter.js`
- [Airport sync](https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/airport-sync.js): `luci-app-daede/htdocs/luci-static/resources/view/daede/airport-sync.js`
- [daed session](https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/daed-session.js): `luci-app-daede/htdocs/luci-static/resources/view/daede/daed-session.js`
- [UCI settings](https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/root/etc/config/daede): `luci-app-daede/root/etc/config/daede`

### Service operations

- [Service widgets](https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/widgets.js): `luci-app-daede/htdocs/luci-static/resources/view/daede/widgets.js`
- [Log viewer](https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/log.js): `luci-app-daede/htdocs/luci-static/resources/view/daede/log.js`
- [Updates and health](https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/htdocs/luci-static/resources/view/daede/updates.js): `luci-app-daede/htdocs/luci-static/resources/view/daede/updates.js`
- [Subscription updater](https://github.com/kenzok8/openwrt-daede/blob/main/luci-app-daede/root/usr/share/luci-app-daede/daed-sub-update.sh): `luci-app-daede/root/usr/share/luci-app-daede/daed-sub-update.sh`

### Proxy backends

- [dae proxy engine](https://github.com/kenzok8/openwrt-daede/tree/main/dae): `dae`
- [daed dashboard backend](https://github.com/kenzok8/openwrt-daede/tree/main/daed): `daed`
- **daed Web API**

### Other components

- **OpenWrt operator**

## Connections

- OpenWrt operator → LuCI app: manages through (evidence: `README.md`)
- LuCI app → Backend detection: selects backend
- LuCI app → dae editor: configures
- LuCI app → daed settings: configures
- LuCI app → Subscription import: imports subscriptions
- Subscription import → Airport sync: uses helpers (evidence: `luci-app-daede/htdocs/luci-static/resources/view/daede/converter.js`)
- Subscription import → Clash conversion: converts nodes
- Subscription import → UCI settings: updates settings (evidence: `luci-app-daede/htdocs/luci-static/resources/view/daede/converter.js`)
- Subscription import → daed Web API: synchronizes nodes (evidence: `luci-app-daede/htdocs/luci-static/resources/view/daede/converter.js`)
- daed settings → Subscription updater: runs updater (evidence: `luci-app-daede/htdocs/luci-static/resources/view/daede/daed.js`)
- daed settings → UCI settings: saves settings (evidence: `luci-app-daede/htdocs/luci-static/resources/view/daede/daed.js`)
- Service widgets → Backend detection: queries service state (evidence: `luci-app-daede/htdocs/luci-static/resources/view/daede/widgets.js`)
- Log viewer → Backend detection: gets backend details (evidence: `luci-app-daede/htdocs/luci-static/resources/view/daede/log.js`)
- Log viewer → Shared styling: uses styles (evidence: `luci-app-daede/htdocs/luci-static/resources/view/daede/log.js`)
- Updates and health → Subscription updater: runs update tasks
- Backend detection → dae proxy engine: detects and controls (evidence: `luci-app-daede/htdocs/luci-static/resources/view/daede/backend.js`)
- Backend detection → daed dashboard backend: detects and controls (evidence: `luci-app-daede/htdocs/luci-static/resources/view/daede/backend.js`)
- daed dashboard backend → daed Web API: provides API (evidence: `README.md`)
- OpenWrt operator → Updates and health: checks status
- OpenWrt operator → Log viewer: views logs
