# imprprpr/vpsentinel architecture

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

- Interactive diagram: https://gitdiagram.com/imprprpr/vpsentinel
- Repository: https://github.com/imprprpr/vpsentinel

## Overview

VPSentinel is a VPS operations console combining recovery monitoring, proxy-subscription generation, node and transit aggregation, security controls, and service management. The main user workflow enters through the web console, configures the VPS and integrations, then uses monitoring and subscription endpoints to recover network access and obtain client-ready configurations. The graph preserves the README’s major product branches; source evidence is partial, so some documented capability links cite the README rather than sampled implementation. Bundled frontend assets are represented as a UI subsystem, not a build map.

Main entry points: [`app.py`](https://github.com/imprprpr/vpsentinel/blob/main/app.py) (API and web entry), [`sub_engine.py`](https://github.com/imprprpr/vpsentinel/blob/main/sub_engine.py) (Subscription generation), [`static/metacubexd/_nuxt/CsoAJYCJ.js`](https://github.com/imprprpr/vpsentinel/blob/main/static/metacubexd/_nuxt/CsoAJYCJ.js) (Dashboard application), [`edt_optimizer.py`](https://github.com/imprprpr/vpsentinel/blob/main/edt_optimizer.py) (EdgeTunnel optimizer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_console["Web Console"]
  node_webapp["API and web entry<br/>[app.py]"]
  node_auth["Admin authentication<br/>[auth_mgr.py]"]
end

subgraph group_recovery["Recovery and Security"]
  node_core["Cloud and monitor core<br/>[sentinel_core.py]"]
  node_cleanip["IP recovery<br/>[clean_ip_mgr.py]"]
  node_netpolicy["Safe outbound access<br/>[net_policy.py]"]
  node_files["Secure config writes<br/>[secure_files.py]"]
  node_ip_audit["IP reputation audit<br/>[ip_audit.py]"]
end

subgraph group_subscriptions["Subscription and Nodes"]
  node_subscription["Subscription generation<br/>[sub_engine.py]"]
  node_provision["Proxy node provisioning"]
  node_customnodes["Custom nodes<br/>[custom_node_mgr.py]"]
  node_transit["Transit nodes<br/>[transit_mgr.py]"]
  node_edgeselect["EdgeTunnel optimizer<br/>[edt_optimizer.py]"]
  node_meshnodes["Mesh monitoring<br/>[mesh_mgr.py]"]
  node_nodesources["Candidate sources<br/>[node_sources.py]"]
  node_validation["Input validation<br/>[validation.py]"]
end

subgraph group_operations["Operations and Integrations"]
  node_speedtest["Network speed tests<br/>[speedtest_mgr.py]"]
  node_traffic["Traffic reporting<br/>[traffic_mgr.py]"]
  node_notifications["Alert delivery<br/>[notification.py]"]
  node_certsync["Certificate synchronization<br/>[cert_sync_mgr.py]"]
  node_services["Service management<br/>[service_mgr.py]"]
  node_privileged["Restricted helper"]
  node_bot["Bot controls<br/>[bot_mgr.py]"]
end

subgraph group_frontend["Bundled Dashboard"]
  node_frontend_shell["Dashboard application<br/>[CsoAJYCJ.js]"]
  node_frontend_modules["Dashboard feature modules<br/>[C9XSDi89.js]"]
  node_frontend_routes["Dashboard route modules<br/>[Rrl1Mf6E.js]"]
  node_frontend_api["Dashboard API modules<br/>[D_AIrrR1.js]"]
  node_frontend_shared["Dashboard shared module<br/>[4qo_TJow.js]"]
end

node_operator(("VPS operator"))

node_operator -->|"uses console"| node_webapp
node_webapp -->|"checks access"| node_auth
node_webapp -->|"handles operations"| node_core
node_webapp -->|"serves subscriptions"| node_subscription
node_webapp -->|"manages nodes"| node_customnodes
node_webapp -->|"manages transits"| node_transit
node_webapp -->|"exposes optimizer"| node_edgeselect
node_webapp -->|"exposes mesh"| node_meshnodes
node_webapp -->|"exposes IP audit"| node_ip_audit
node_webapp -->|"exposes speed tests"| node_speedtest
node_webapp -->|"exposes traffic"| node_traffic
node_webapp -->|"configures alerts"| node_notifications
node_webapp -->|"exposes bot controls"| node_bot
node_core -->|"supports recovery"| node_cleanip
node_core -->|"persists configuration"| node_files
node_edgeselect -->|"fetches candidates"| node_netpolicy
node_edgeselect -->|"validates inputs"| node_validation
node_customnodes -->|"validates nodes"| node_validation
node_transit -->|"validates transit"| node_validation
node_subscription -->|"includes nodes"| node_customnodes
node_subscription -->|"includes transit"| node_transit
node_subscription -->|"adds tested nodes"| node_edgeselect
node_subscription -->|"uses probe results"| node_meshnodes
node_subscription -->|"uses source lists"| node_nodesources
node_operator -->|"provisions proxy nodes"| node_provision
node_certsync -->|"reloads services"| node_services
node_services -->|"requests privileged action"| node_privileged
node_webapp -.->|"manages certificates"| node_certsync
node_webapp -.->|"manages services"| node_services
node_webapp -.->|"serves dashboard"| node_frontend_shell
node_frontend_shell -->|"loads modules"| node_frontend_modules
node_frontend_shell -->|"loads routes"| node_frontend_routes
node_frontend_shell -->|"loads API modules"| node_frontend_api
node_frontend_shell -->|"loads shared code"| node_frontend_shared

click node_webapp "https://github.com/imprprpr/vpsentinel/blob/main/app.py"
click node_auth "https://github.com/imprprpr/vpsentinel/blob/main/auth_mgr.py"
click node_core "https://github.com/imprprpr/vpsentinel/blob/main/sentinel_core.py"
click node_cleanip "https://github.com/imprprpr/vpsentinel/blob/main/clean_ip_mgr.py"
click node_netpolicy "https://github.com/imprprpr/vpsentinel/blob/main/net_policy.py"
click node_files "https://github.com/imprprpr/vpsentinel/blob/main/secure_files.py"
click node_ip_audit "https://github.com/imprprpr/vpsentinel/blob/main/ip_audit.py"
click node_subscription "https://github.com/imprprpr/vpsentinel/blob/main/sub_engine.py"
click node_provision "https://github.com/imprprpr/vpsentinel/blob/main/scripts/node_provisioner.py"
click node_customnodes "https://github.com/imprprpr/vpsentinel/blob/main/custom_node_mgr.py"
click node_transit "https://github.com/imprprpr/vpsentinel/blob/main/transit_mgr.py"
click node_edgeselect "https://github.com/imprprpr/vpsentinel/blob/main/edt_optimizer.py"
click node_meshnodes "https://github.com/imprprpr/vpsentinel/blob/main/mesh_mgr.py"
click node_nodesources "https://github.com/imprprpr/vpsentinel/blob/main/node_sources.py"
click node_validation "https://github.com/imprprpr/vpsentinel/blob/main/validation.py"
click node_speedtest "https://github.com/imprprpr/vpsentinel/blob/main/speedtest_mgr.py"
click node_traffic "https://github.com/imprprpr/vpsentinel/blob/main/traffic_mgr.py"
click node_notifications "https://github.com/imprprpr/vpsentinel/blob/main/notification.py"
click node_certsync "https://github.com/imprprpr/vpsentinel/blob/main/cert_sync_mgr.py"
click node_services "https://github.com/imprprpr/vpsentinel/blob/main/service_mgr.py"
click node_privileged "https://github.com/imprprpr/vpsentinel/blob/main/privileged_helper.py"
click node_bot "https://github.com/imprprpr/vpsentinel/blob/main/bot_mgr.py"
click node_frontend_shell "https://github.com/imprprpr/vpsentinel/blob/main/static/metacubexd/_nuxt/CsoAJYCJ.js"
click node_frontend_modules "https://github.com/imprprpr/vpsentinel/blob/main/static/metacubexd/_nuxt/C9XSDi89.js"
click node_frontend_routes "https://github.com/imprprpr/vpsentinel/blob/main/static/metacubexd/_nuxt/Rrl1Mf6E.js"
click node_frontend_api "https://github.com/imprprpr/vpsentinel/blob/main/static/metacubexd/_nuxt/D_AIrrR1.js"
click node_frontend_shared "https://github.com/imprprpr/vpsentinel/blob/main/static/metacubexd/_nuxt/4qo_TJow.js"

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_webapp,node_auth toneBlue
class node_core,node_cleanip,node_netpolicy,node_files,node_ip_audit toneAmber
class node_subscription,node_provision,node_customnodes,node_transit,node_edgeselect,node_meshnodes,node_nodesources,node_validation toneMint
class node_speedtest,node_traffic,node_notifications,node_certsync,node_services,node_privileged,node_bot toneRose
class node_frontend_shell,node_frontend_modules,node_frontend_routes,node_frontend_api,node_frontend_shared,node_operator toneIndigo
```

## Components

### Web Console

- [API and web entry](https://github.com/imprprpr/vpsentinel/blob/main/app.py): `app.py`
- [Admin authentication](https://github.com/imprprpr/vpsentinel/blob/main/auth_mgr.py): `auth_mgr.py`

### Recovery and Security

- [Cloud and monitor core](https://github.com/imprprpr/vpsentinel/blob/main/sentinel_core.py): `sentinel_core.py`
- [IP recovery](https://github.com/imprprpr/vpsentinel/blob/main/clean_ip_mgr.py): `clean_ip_mgr.py`
- [Safe outbound access](https://github.com/imprprpr/vpsentinel/blob/main/net_policy.py): `net_policy.py`
- [Secure config writes](https://github.com/imprprpr/vpsentinel/blob/main/secure_files.py): `secure_files.py`
- [IP reputation audit](https://github.com/imprprpr/vpsentinel/blob/main/ip_audit.py): `ip_audit.py`

### Subscription and Nodes

- [Subscription generation](https://github.com/imprprpr/vpsentinel/blob/main/sub_engine.py): `sub_engine.py`
- [Proxy node provisioning](https://github.com/imprprpr/vpsentinel/blob/main/scripts/node_provisioner.py): `scripts/node_provisioner.py`
- [Custom nodes](https://github.com/imprprpr/vpsentinel/blob/main/custom_node_mgr.py): `custom_node_mgr.py`
- [Transit nodes](https://github.com/imprprpr/vpsentinel/blob/main/transit_mgr.py): `transit_mgr.py`
- [EdgeTunnel optimizer](https://github.com/imprprpr/vpsentinel/blob/main/edt_optimizer.py): `edt_optimizer.py`
- [Mesh monitoring](https://github.com/imprprpr/vpsentinel/blob/main/mesh_mgr.py): `mesh_mgr.py`
- [Candidate sources](https://github.com/imprprpr/vpsentinel/blob/main/node_sources.py): `node_sources.py`
- [Input validation](https://github.com/imprprpr/vpsentinel/blob/main/validation.py): `validation.py`

### Operations and Integrations

- [Network speed tests](https://github.com/imprprpr/vpsentinel/blob/main/speedtest_mgr.py): `speedtest_mgr.py`
- [Traffic reporting](https://github.com/imprprpr/vpsentinel/blob/main/traffic_mgr.py): `traffic_mgr.py`
- [Alert delivery](https://github.com/imprprpr/vpsentinel/blob/main/notification.py): `notification.py`
- [Certificate synchronization](https://github.com/imprprpr/vpsentinel/blob/main/cert_sync_mgr.py): `cert_sync_mgr.py`
- [Service management](https://github.com/imprprpr/vpsentinel/blob/main/service_mgr.py): `service_mgr.py`
- [Restricted helper](https://github.com/imprprpr/vpsentinel/blob/main/privileged_helper.py): `privileged_helper.py`
- [Bot controls](https://github.com/imprprpr/vpsentinel/blob/main/bot_mgr.py): `bot_mgr.py`

### Bundled Dashboard

- [Dashboard application](https://github.com/imprprpr/vpsentinel/blob/main/static/metacubexd/_nuxt/CsoAJYCJ.js): `static/metacubexd/_nuxt/CsoAJYCJ.js`
- [Dashboard feature modules](https://github.com/imprprpr/vpsentinel/blob/main/static/metacubexd/_nuxt/C9XSDi89.js): `static/metacubexd/_nuxt/C9XSDi89.js`
- [Dashboard route modules](https://github.com/imprprpr/vpsentinel/blob/main/static/metacubexd/_nuxt/Rrl1Mf6E.js): `static/metacubexd/_nuxt/Rrl1Mf6E.js`
- [Dashboard API modules](https://github.com/imprprpr/vpsentinel/blob/main/static/metacubexd/_nuxt/D_AIrrR1.js): `static/metacubexd/_nuxt/D_AIrrR1.js`
- [Dashboard shared module](https://github.com/imprprpr/vpsentinel/blob/main/static/metacubexd/_nuxt/4qo_TJow.js): `static/metacubexd/_nuxt/4qo_TJow.js`

### Other components

- **VPS operator**

## Connections

- VPS operator → API and web entry: uses console (evidence: `README.md`)
- API and web entry → Admin authentication: checks access (evidence: `app.py`)
- API and web entry → Cloud and monitor core: handles operations (evidence: `app.py`)
- API and web entry → Subscription generation: serves subscriptions (evidence: `app.py`)
- API and web entry → Custom nodes: manages nodes (evidence: `app.py`)
- API and web entry → Transit nodes: manages transits (evidence: `app.py`)
- API and web entry → EdgeTunnel optimizer: exposes optimizer (evidence: `app.py`)
- API and web entry → Mesh monitoring: exposes mesh (evidence: `app.py`)
- API and web entry → IP reputation audit: exposes IP audit (evidence: `app.py`)
- API and web entry → Network speed tests: exposes speed tests (evidence: `app.py`)
- API and web entry → Traffic reporting: exposes traffic (evidence: `app.py`)
- API and web entry → Alert delivery: configures alerts (evidence: `app.py`)
- API and web entry → Bot controls: exposes bot controls (evidence: `app.py`)
- Cloud and monitor core → IP recovery: supports recovery (evidence: `clean_ip_mgr.py`)
- Cloud and monitor core → Secure config writes: persists configuration (evidence: `sentinel_core.py`)
- EdgeTunnel optimizer → Safe outbound access: fetches candidates (evidence: `edt_optimizer.py`)
- EdgeTunnel optimizer → Input validation: validates inputs (evidence: `edt_optimizer.py`)
- Custom nodes → Input validation: validates nodes (evidence: `custom_node_mgr.py`)
- Transit nodes → Input validation: validates transit (evidence: `transit_mgr.py`)
- Subscription generation → Custom nodes: includes nodes (evidence: `README.md`)
- Subscription generation → Transit nodes: includes transit (evidence: `README.md`)
- Subscription generation → EdgeTunnel optimizer: adds tested nodes (evidence: `README.md`)
- Subscription generation → Mesh monitoring: uses probe results (evidence: `README.md`)
- Subscription generation → Candidate sources: uses source lists (evidence: `sub_engine.py`)
- VPS operator → Proxy node provisioning: provisions proxy nodes (evidence: `README.md`)
- Certificate synchronization → Service management: reloads services (evidence: `cert_sync_mgr.py`)
- Service management → Restricted helper: requests privileged action (evidence: `service_mgr.py`)
- API and web entry → Certificate synchronization: manages certificates (evidence: `app.py`)
- API and web entry → Service management: manages services
- API and web entry → Dashboard application: serves dashboard
- Dashboard application → Dashboard feature modules: loads modules (evidence: `static/metacubexd/_nuxt/CsoAJYCJ.js`)
- Dashboard application → Dashboard route modules: loads routes (evidence: `static/metacubexd/_nuxt/CsoAJYCJ.js`)
- Dashboard application → Dashboard API modules: loads API modules (evidence: `static/metacubexd/_nuxt/CsoAJYCJ.js`)
- Dashboard application → Dashboard shared module: loads shared code (evidence: `static/metacubexd/_nuxt/CsoAJYCJ.js`)
