# insaniaquon/luci-app-podkop-tweaker architecture

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

- Interactive diagram: https://gitdiagram.com/insaniaquon/luci-app-podkop-tweaker
- Repository: https://github.com/insaniaquon/luci-app-podkop-tweaker

## Overview

Podkop Tweaker is an OpenWrt LuCI application for configuring and operating the Podkop proxy client and related services. The user-facing workflow is to open the web interface, inspect or edit a feature’s settings, review changes where available, and apply them; other workflows cover diagnostics, subscription maintenance, backups, and updates. The README documents these capabilities, but sampled source is limited to shared browser helpers, so detailed controller-to-module wiring is not verified.

Main entry points: [`usr/lib/lua/luci/view/podkop-tweaker`](https://github.com/insaniaquon/luci-app-podkop-tweaker/tree/main/usr/lib/lua/luci/view/podkop-tweaker) (Feature views), [`usr/lib/lua/podkop-tweaker/api_singbox.lua`](https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_singbox.lua) (Sing-box editor), [`usr/lib/lua/podkop-tweaker/api_diag.lua`](https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_diag.lua) (Diagnostics), [`usr/lib/lua/podkop-tweaker/api_subs.lua`](https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_subs.lua) (Subscription manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["LuCI Interface"]
  node_luci["LuCI controller<br/>[podkop-tweaker.lua]"]
  node_views["Feature views"]
  node_browser["Shared browser helpers<br/>[common.js]"]
end

subgraph group_configuration["Configuration"]
  node_podkop["Podkop editor<br/>[api_podkop.lua]"]
  node_stubby["Stubby editor<br/>[api_stubby.lua]"]
  node_singbox["Sing-box editor<br/>[api_singbox.lua]"]
  node_fragment["Fragment patch"]
  node_argon["Argon settings<br/>[api_argon.lua]"]
end

subgraph group_operations["Operations"]
  node_diagnostics["Diagnostics<br/>[api_diag.lua]"]
  node_subscriptions["Subscription manager<br/>[api_subs.lua]"]
  node_schedule["Subscription scheduling<br/>[subsched.lua]"]
end

subgraph group_maintenance["Maintenance"]
  node_bundle["Import and export<br/>[api_bundle.lua]"]
  node_updates["Update handlers<br/>[api_update.lua]"]
  node_system["System information<br/>[api_diag.lua]"]
end

node_user(("Router administrator"))
node_router_config[("Router configuration")]
node_proxy_services["Proxy and DNS services"]
node_external_network["External network"]

node_user -->|"opens interface"| node_luci
node_luci -.->|"serves views"| node_views
node_views -.->|"uses helpers"| node_browser
node_views -.->|"configures"| node_podkop
node_views -.->|"configures"| node_stubby
node_views -.->|"configures"| node_singbox
node_views -.->|"configures"| node_argon
node_views -.->|"requests tests"| node_diagnostics
node_views -.->|"manages"| node_subscriptions
node_views -.->|"backs up"| node_bundle
node_views -.->|"requests updates"| node_updates
node_podkop -->|"edits"| node_router_config
node_stubby -->|"edits"| node_router_config
node_singbox -->|"edits"| node_router_config
node_argon -->|"stores settings"| node_router_config
node_singbox -->|"offers patching"| node_fragment
node_fragment -->|"patches wrapper"| node_proxy_services
node_diagnostics -->|"tests connectivity"| node_proxy_services
node_diagnostics -->|"tests resolution"| node_external_network
node_subscriptions -->|"fetches updates"| node_external_network
node_subscriptions -->|"schedules updates"| node_schedule
node_bundle -->|"backs up settings"| node_router_config
node_updates -->|"fetches releases"| node_external_network
node_system -->|"reports versions"| node_proxy_services

click node_luci "https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/luci/controller/podkop-tweaker.lua"
click node_views "https://github.com/insaniaquon/luci-app-podkop-tweaker/tree/main/usr/lib/lua/luci/view/podkop-tweaker"
click node_browser "https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/www/luci-static/resources/podkop-tweaker/common.js"
click node_podkop "https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_podkop.lua"
click node_stubby "https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_stubby.lua"
click node_singbox "https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_singbox.lua"
click node_fragment "https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/bin/podkop-fragment-patch.sh"
click node_argon "https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_argon.lua"
click node_diagnostics "https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_diag.lua"
click node_subscriptions "https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_subs.lua"
click node_schedule "https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/subsched.lua"
click node_bundle "https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_bundle.lua"
click node_updates "https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_update.lua"
click node_system "https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_diag.lua"

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_views,node_browser toneBlue
class node_podkop,node_stubby,node_singbox,node_fragment,node_argon,node_router_config toneAmber
class node_diagnostics,node_subscriptions,node_schedule,node_user toneMint
class node_bundle,node_updates,node_system toneRose
class node_proxy_services,node_external_network toneIndigo
```

## Components

### LuCI Interface

- [LuCI controller](https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/luci/controller/podkop-tweaker.lua): `usr/lib/lua/luci/controller/podkop-tweaker.lua`
- [Feature views](https://github.com/insaniaquon/luci-app-podkop-tweaker/tree/main/usr/lib/lua/luci/view/podkop-tweaker): `usr/lib/lua/luci/view/podkop-tweaker`
- [Shared browser helpers](https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/www/luci-static/resources/podkop-tweaker/common.js): `www/luci-static/resources/podkop-tweaker/common.js`

### Configuration

- [Podkop editor](https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_podkop.lua): `usr/lib/lua/podkop-tweaker/api_podkop.lua`
- [Stubby editor](https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_stubby.lua): `usr/lib/lua/podkop-tweaker/api_stubby.lua`
- [Sing-box editor](https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_singbox.lua): `usr/lib/lua/podkop-tweaker/api_singbox.lua`
- [Fragment patch](https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/bin/podkop-fragment-patch.sh): `usr/bin/podkop-fragment-patch.sh`
- [Argon settings](https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_argon.lua): `usr/lib/lua/podkop-tweaker/api_argon.lua`

### Operations

- [Diagnostics](https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_diag.lua): `usr/lib/lua/podkop-tweaker/api_diag.lua`
- [Subscription manager](https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_subs.lua): `usr/lib/lua/podkop-tweaker/api_subs.lua`
- [Subscription scheduling](https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/subsched.lua): `usr/lib/lua/podkop-tweaker/subsched.lua`

### Maintenance

- [Import and export](https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_bundle.lua): `usr/lib/lua/podkop-tweaker/api_bundle.lua`
- [Update handlers](https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_update.lua): `usr/lib/lua/podkop-tweaker/api_update.lua`
- [System information](https://github.com/insaniaquon/luci-app-podkop-tweaker/blob/main/usr/lib/lua/podkop-tweaker/api_diag.lua): `usr/lib/lua/podkop-tweaker/api_diag.lua`

### Other components

- **Router administrator**
- **Router configuration**
- **Proxy and DNS services**
- **External network**

## Connections

- Router administrator → LuCI controller: opens interface (evidence: `README.md`)
- LuCI controller → Feature views: serves views
- Feature views → Shared browser helpers: uses helpers
- Feature views → Podkop editor: configures
- Feature views → Stubby editor: configures
- Feature views → Sing-box editor: configures
- Feature views → Argon settings: configures
- Feature views → Diagnostics: requests tests
- Feature views → Subscription manager: manages
- Feature views → Import and export: backs up
- Feature views → Update handlers: requests updates
- Podkop editor → Router configuration: edits (evidence: `README.md`)
- Stubby editor → Router configuration: edits (evidence: `README.md`)
- Sing-box editor → Router configuration: edits (evidence: `README.md`)
- Argon settings → Router configuration: stores settings (evidence: `README.md`)
- Sing-box editor → Fragment patch: offers patching (evidence: `README.md`)
- Fragment patch → Proxy and DNS services: patches wrapper (evidence: `README.md`)
- Diagnostics → Proxy and DNS services: tests connectivity (evidence: `README.md`)
- Diagnostics → External network: tests resolution (evidence: `README.md`)
- Subscription manager → External network: fetches updates (evidence: `README.md`)
- Subscription manager → Subscription scheduling: schedules updates (evidence: `README.md`)
- Import and export → Router configuration: backs up settings (evidence: `README.md`)
- Update handlers → External network: fetches releases (evidence: `README.md`)
- System information → Proxy and DNS services: reports versions (evidence: `README.md`)
