# nosignals/openwrt-neko architecture

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

- Interactive diagram: https://gitdiagram.com/nosignals/openwrt-neko
- Repository: https://github.com/nosignals/openwrt-neko

## Overview

Neko is an OpenWrt/LuCI proxy-management application supporting Mihomo and sing-box. Users open its web interface to inspect device and proxy status, manage configuration files and proxy/rule data, and reach the selected core’s dashboard; settings and URL conversion support administration. The map retains documented editing and conversion capabilities, but source excerpts do not establish all runtime links between UI, PHP handlers, and core processes, so uncertain connections are omitted. The README documents the product and core choices; detailed implementation paths are shown where supported by the tree and excerpts.

Main entry points: [`luci-app-neko/htdocs/nekoclash/dashboard.php`](https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/dashboard.php) (Core dashboards), [`luci-app-neko/htdocs/nekoclash/index.php`](https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/index.php) (Home status), [`luci-app-neko/htdocs/nekoclash/configs.php`](https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/configs.php) (Config editor), [`luci-app-neko/htdocs/nekoclash/settings.php`](https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/settings.php) (Core settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interfaces"]
  node_luci["LuCI views<br/>[neko.js]"]
  node_home["Home status<br/>[index.php]"]
  node_dashboard["Core dashboards<br/>[dashboard.php]"]
  node_device_info["Device information<br/>[devinfo.php]"]
  node_page_shell["Shared page shell<br/>[navbar.php]"]
end

subgraph group_admin["Management features"]
  node_config_editor["Config editor<br/>[configs.php]"]
  node_file_manager["File and backup manager<br/>[manager.php]"]
  node_settings["Core settings<br/>[settings.php]"]
  node_converter["Config converter<br/>[yamlconv.php]"]
  node_logs["Logs and versions<br/>[log.php]"]
end

subgraph group_runtime["Proxy runtime"]
  node_core_service["Neko service<br/>[neko]"]
  node_mihomo["Mihomo core"]
  node_singbox["sing-box core"]
  node_dashboard_ui["Bundled dashboard UIs"]
end

subgraph group_state["Configuration and state"]
  node_shared_config["Config access<br/>[cfg.php]"]
  node_uci[("OpenWrt UCI")]
  node_proxy_data["Configs and rules"]
end

node_operator(("OpenWrt operator"))

node_operator -->|"opens LuCI"| node_luci
node_operator -->|"uses web UI"| node_home
node_home -->|"shows device data"| node_device_info
node_home -->|"reads settings"| node_shared_config
node_config_editor -->|"requests file actions"| node_file_manager
node_operator -->|"edits configs"| node_config_editor
node_operator -->|"converts configs"| node_converter
node_operator -->|"sets core mode"| node_settings
node_settings -->|"commits options"| node_uci
node_shared_config -->|"reads options"| node_uci
node_config_editor -.->|"edits proxy data"| node_proxy_data
node_operator -->|"opens dashboard"| node_dashboard
node_dashboard -->|"links dashboard UI"| node_dashboard_ui
node_dashboard -.->|"reads core config"| node_mihomo
node_dashboard -.->|"reads core config"| node_singbox
node_operator -->|"requests logs"| node_logs
node_core_service -.->|"selects core"| node_mihomo
node_core_service -.->|"selects core"| node_singbox
node_config_editor -.->|"uses shared config"| node_shared_config
node_home -->|"includes navigation"| node_page_shell
node_dashboard -->|"includes navigation"| node_page_shell
node_settings -->|"includes navigation"| node_page_shell

click node_luci "https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/luci-static/resources/view/neko/neko.js"
click node_home "https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/index.php"
click node_dashboard "https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/dashboard.php"
click node_config_editor "https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/configs.php"
click node_file_manager "https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/manager.php"
click node_settings "https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/settings.php"
click node_converter "https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/yamlconv.php"
click node_device_info "https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/devinfo.php"
click node_logs "https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/lib/log.php"
click node_shared_config "https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/cfg.php"
click node_uci "https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/root/etc/config/neko"
click node_core_service "https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/root/etc/init.d/neko"
click node_mihomo "https://github.com/nosignals/openwrt-neko/blob/main/mihomo/Makefile"
click node_singbox "https://github.com/nosignals/openwrt-neko/blob/main/sing-box/Makefile"
click node_proxy_data "https://github.com/nosignals/openwrt-neko/tree/main/luci-app-neko/root/etc/neko/config"
click node_dashboard_ui "https://github.com/nosignals/openwrt-neko/tree/main/luci-app-neko/root/etc/neko/ui"
click node_page_shell "https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/navbar.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_luci,node_home,node_dashboard,node_device_info,node_page_shell toneBlue
class node_config_editor,node_file_manager,node_settings,node_converter,node_logs toneAmber
class node_core_service,node_mihomo,node_singbox,node_dashboard_ui toneMint
class node_shared_config,node_uci,node_proxy_data toneRose
class node_operator toneIndigo
```

## Components

### User interfaces

- [LuCI views](https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/luci-static/resources/view/neko/neko.js): `luci-app-neko/htdocs/luci-static/resources/view/neko/neko.js`
- [Home status](https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/index.php): `luci-app-neko/htdocs/nekoclash/index.php`
- [Core dashboards](https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/dashboard.php): `luci-app-neko/htdocs/nekoclash/dashboard.php`
- [Device information](https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/devinfo.php): `luci-app-neko/htdocs/nekoclash/devinfo.php`
- [Shared page shell](https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/navbar.php): `luci-app-neko/htdocs/nekoclash/navbar.php`

### Management features

- [Config editor](https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/configs.php): `luci-app-neko/htdocs/nekoclash/configs.php`
- [File and backup manager](https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/manager.php): `luci-app-neko/htdocs/nekoclash/manager.php`
- [Core settings](https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/settings.php): `luci-app-neko/htdocs/nekoclash/settings.php`
- [Config converter](https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/yamlconv.php): `luci-app-neko/htdocs/nekoclash/yamlconv.php`
- [Logs and versions](https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/lib/log.php): `luci-app-neko/htdocs/nekoclash/lib/log.php`

### Proxy runtime

- [Neko service](https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/root/etc/init.d/neko): `luci-app-neko/root/etc/init.d/neko`
- [Mihomo core](https://github.com/nosignals/openwrt-neko/blob/main/mihomo/Makefile): `mihomo/Makefile`
- [sing-box core](https://github.com/nosignals/openwrt-neko/blob/main/sing-box/Makefile): `sing-box/Makefile`
- [Bundled dashboard UIs](https://github.com/nosignals/openwrt-neko/tree/main/luci-app-neko/root/etc/neko/ui): `luci-app-neko/root/etc/neko/ui`

### Configuration and state

- [Config access](https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/htdocs/nekoclash/cfg.php): `luci-app-neko/htdocs/nekoclash/cfg.php`
- [OpenWrt UCI](https://github.com/nosignals/openwrt-neko/blob/main/luci-app-neko/root/etc/config/neko): `luci-app-neko/root/etc/config/neko`
- [Configs and rules](https://github.com/nosignals/openwrt-neko/tree/main/luci-app-neko/root/etc/neko/config): `luci-app-neko/root/etc/neko/config`

### Other components

- **OpenWrt operator**

## Connections

- OpenWrt operator → LuCI views: opens LuCI (evidence: `README.md`)
- OpenWrt operator → Home status: uses web UI (evidence: `README.md`)
- Home status → Device information: shows device data (evidence: `luci-app-neko/htdocs/nekoclash/index.php`)
- Home status → Config access: reads settings (evidence: `luci-app-neko/htdocs/nekoclash/index.php`)
- Config editor → File and backup manager: requests file actions (evidence: `luci-app-neko/htdocs/nekoclash/configs.php`)
- OpenWrt operator → Config editor: edits configs (evidence: `README.md`)
- OpenWrt operator → Config converter: converts configs (evidence: `README.md`)
- OpenWrt operator → Core settings: sets core mode (evidence: `luci-app-neko/htdocs/nekoclash/settings.php`)
- Core settings → OpenWrt UCI: commits options (evidence: `luci-app-neko/htdocs/nekoclash/settings.php`)
- Config access → OpenWrt UCI: reads options (evidence: `luci-app-neko/htdocs/nekoclash/cfg.php`)
- Config editor → Configs and rules: edits proxy data (evidence: `README.md`)
- OpenWrt operator → Core dashboards: opens dashboard (evidence: `luci-app-neko/htdocs/nekoclash/dashboard.php`)
- Core dashboards → Bundled dashboard UIs: links dashboard UI (evidence: `luci-app-neko/htdocs/nekoclash/dashboard.php`)
- Core dashboards → Mihomo core: reads core config
- Core dashboards → sing-box core: reads core config
- OpenWrt operator → Logs and versions: requests logs (evidence: `luci-app-neko/htdocs/nekoclash/lib/log.php`)
- Neko service → Mihomo core: selects core
- Neko service → sing-box core: selects core
- Config editor → Config access: uses shared config (evidence: `luci-app-neko/htdocs/nekoclash/configs.php`)
- Home status → Shared page shell: includes navigation (evidence: `luci-app-neko/htdocs/nekoclash/index.php`)
- Core dashboards → Shared page shell: includes navigation (evidence: `luci-app-neko/htdocs/nekoclash/dashboard.php`)
- Core settings → Shared page shell: includes navigation (evidence: `luci-app-neko/htdocs/nekoclash/settings.php`)
