# jmorrison-juniper/misthelper architecture

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

- Interactive diagram: https://gitdiagram.com/jmorrison-juniper/misthelper
- Repository: https://github.com/jmorrison-juniper/misthelper

## Overview

MistHelper is a menu-driven Juniper Mist Cloud operations tool: an operator selects an operation, MistHelper gathers organization or device data and writes reports to files or databases, or runs a confirmed change such as a firmware upgrade. The repository also contains a separate operations platform and portal, an upgrade-capture portal, SSH tooling, and a Prometheus/SNMP metrics gateway. The graph preserves these documented capabilities; several links are documented in the README because their implementation files were not sampled.

Main entry points: [`MistHelper.py`](https://github.com/jmorrison-juniper/misthelper/blob/main/MistHelper.py) (Operation menu), [`mist-ops-platform/src/api/main.py`](https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/api/main.py) (Platform API), [`src/export/org_inventory_exporter.py`](https://github.com/jmorrison-juniper/misthelper/blob/main/src/export/org_inventory_exporter.py) (Inventory export), [`mist-ops-platform/src/api/routes/audit.py`](https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/api/routes/audit.py) (Audit routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["MistHelper operations"]
  node_menu["Operation menu<br/>[MistHelper.py]"]
  node_dependency["Dependency resolver"]
  node_firmware["Firmware operations"]
  node_maps["Map operations<br/>[maps_manager.py]"]
  node_address_audit["Address audit<br/>[audit_engine.py]"]
  node_profile_migration["Profile migration"]
end

subgraph group_data["Data and reporting"]
  node_collection["Data collection"]
  node_inventory_export["Inventory export"]
  node_processing["Data processing"]
  node_data_store[("Files and databases")]
end

subgraph group_portals["Portals and metrics"]
  node_web_portal["Web portal<br/>[app.py]"]
  node_webhooks["Webhook receiver<br/>[webhooks.py]"]
  node_upgrade_portal["Upgrade capture portal<br/>[routes.py]"]
  node_metrics["Metrics gateway"]
end

subgraph group_platform["Operations platform"]
  node_api["Platform API<br/>[main.py]"]
  node_api_logging["Request logging<br/>[logging.py]"]
  node_audit_routes["Audit routes<br/>[audit.py]"]
  node_platform_settings["Platform settings<br/>[settings.py]"]
  node_config_model["Configuration model<br/>[config.py]"]
  node_governance_model["Governance model<br/>[governance.py]"]
  node_operations_model["Operations model<br/>[operations.py]"]
  node_deploy_tasks["Deployment tasks<br/>[deploy_tasks.py]"]
  node_sync_tasks["Sync tasks<br/>[sync_tasks.py]"]
end

subgraph group_access["Remote access"]
  node_ssh["SSH operations"]
end

node_operator(("Network operator"))
node_mist_cloud{{"Mist Cloud API"}}
node_ssh_remote{{"Managed devices"}}

node_operator -->|"selects operation"| node_menu
node_menu -->|"reads or changes"| node_mist_cloud
node_menu -.->|"runs operation"| node_collection
node_collection -->|"uses exporter"| node_inventory_export
node_inventory_export -->|"uses processing"| node_processing
node_inventory_export -->|"writes output"| node_data_store
node_menu -.->|"dispatches upgrade"| node_firmware
node_firmware -->|"upgrades devices"| node_mist_cloud
node_operator -->|"runs audit"| node_address_audit
node_address_audit -->|"reads inventory"| node_mist_cloud
node_operator -->|"uses maps"| node_maps
node_operator -->|"confirms change"| node_profile_migration
node_profile_migration -.->|"updates profiles"| node_mist_cloud
node_operator -->|"uses portal"| node_web_portal
node_web_portal -->|"registers receiver"| node_webhooks
node_operator -->|"captures upgrades"| node_upgrade_portal
node_operator -->|"scrapes metrics"| node_metrics
node_operator -.->|"uses platform"| node_api
node_api -->|"registers routes"| node_audit_routes
node_api -->|"configures middleware"| node_api_logging
node_api -->|"loads settings"| node_platform_settings
node_audit_routes -->|"uses model"| node_governance_model
node_audit_routes -->|"uses model"| node_operations_model
node_operator -->|"runs commands"| node_ssh
node_ssh -->|"executes remotely"| node_ssh_remote

click node_menu "https://github.com/jmorrison-juniper/misthelper/blob/main/MistHelper.py"
click node_dependency "https://github.com/jmorrison-juniper/misthelper/blob/main/src/config/source_dependency_resolver.py"
click node_firmware "https://github.com/jmorrison-juniper/misthelper/blob/main/src/firmware/firmware_manager.py"
click node_maps "https://github.com/jmorrison-juniper/misthelper/blob/main/src/maps/maps_manager.py"
click node_address_audit "https://github.com/jmorrison-juniper/misthelper/blob/main/src/site/address_audit/audit_engine.py"
click node_profile_migration "https://github.com/jmorrison-juniper/misthelper/blob/main/src/device/ap_profile_migration_manager.py"
click node_collection "https://github.com/jmorrison-juniper/misthelper/blob/main/src/analytics/data_collection_manager.py"
click node_inventory_export "https://github.com/jmorrison-juniper/misthelper/blob/main/src/export/org_inventory_exporter.py"
click node_processing "https://github.com/jmorrison-juniper/misthelper/blob/main/src/data/data_processing_utils.py"
click node_web_portal "https://github.com/jmorrison-juniper/misthelper/blob/main/web_portal/app.py"
click node_webhooks "https://github.com/jmorrison-juniper/misthelper/blob/main/web_portal/routes/webhooks.py"
click node_upgrade_portal "https://github.com/jmorrison-juniper/misthelper/blob/main/src/upgrade_portal/api/run_controls/routes.py"
click node_metrics "https://github.com/jmorrison-juniper/misthelper/tree/main/src/metrics_gateway"
click node_api "https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/api/main.py"
click node_api_logging "https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/api/middleware/logging.py"
click node_audit_routes "https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/api/routes/audit.py"
click node_platform_settings "https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/shared/config/settings.py"
click node_config_model "https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/shared/models/config.py"
click node_governance_model "https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/shared/models/governance.py"
click node_operations_model "https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/shared/models/operations.py"
click node_deploy_tasks "https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/worker/tasks/deploy_tasks.py"
click node_sync_tasks "https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/worker/tasks/sync_tasks.py"
click node_ssh "https://github.com/jmorrison-juniper/misthelper/blob/main/src/ssh/ssh_runner_manager.py"

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_menu,node_dependency,node_firmware,node_maps,node_address_audit,node_profile_migration toneBlue
class node_collection,node_inventory_export,node_processing,node_data_store toneAmber
class node_web_portal,node_webhooks,node_upgrade_portal,node_metrics,node_mist_cloud toneMint
class node_api,node_api_logging,node_audit_routes,node_platform_settings,node_config_model,node_governance_model,node_operations_model,node_deploy_tasks,node_sync_tasks toneRose
class node_ssh,node_operator,node_ssh_remote toneIndigo
```

## Components

### MistHelper operations

- [Operation menu](https://github.com/jmorrison-juniper/misthelper/blob/main/MistHelper.py): `MistHelper.py`
- [Dependency resolver](https://github.com/jmorrison-juniper/misthelper/blob/main/src/config/source_dependency_resolver.py): `src/config/source_dependency_resolver.py`
- [Firmware operations](https://github.com/jmorrison-juniper/misthelper/blob/main/src/firmware/firmware_manager.py): `src/firmware/firmware_manager.py`
- [Map operations](https://github.com/jmorrison-juniper/misthelper/blob/main/src/maps/maps_manager.py): `src/maps/maps_manager.py`
- [Address audit](https://github.com/jmorrison-juniper/misthelper/blob/main/src/site/address_audit/audit_engine.py): `src/site/address_audit/audit_engine.py`
- [Profile migration](https://github.com/jmorrison-juniper/misthelper/blob/main/src/device/ap_profile_migration_manager.py): `src/device/ap_profile_migration_manager.py`

### Data and reporting

- [Data collection](https://github.com/jmorrison-juniper/misthelper/blob/main/src/analytics/data_collection_manager.py): `src/analytics/data_collection_manager.py`
- [Inventory export](https://github.com/jmorrison-juniper/misthelper/blob/main/src/export/org_inventory_exporter.py): `src/export/org_inventory_exporter.py`
- [Data processing](https://github.com/jmorrison-juniper/misthelper/blob/main/src/data/data_processing_utils.py): `src/data/data_processing_utils.py`
- **Files and databases**

### Portals and metrics

- [Web portal](https://github.com/jmorrison-juniper/misthelper/blob/main/web_portal/app.py): `web_portal/app.py`
- [Webhook receiver](https://github.com/jmorrison-juniper/misthelper/blob/main/web_portal/routes/webhooks.py): `web_portal/routes/webhooks.py`
- [Upgrade capture portal](https://github.com/jmorrison-juniper/misthelper/blob/main/src/upgrade_portal/api/run_controls/routes.py): `src/upgrade_portal/api/run_controls/routes.py`
- [Metrics gateway](https://github.com/jmorrison-juniper/misthelper/tree/main/src/metrics_gateway): `src/metrics_gateway`

### Operations platform

- [Platform API](https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/api/main.py): `mist-ops-platform/src/api/main.py`
- [Request logging](https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/api/middleware/logging.py): `mist-ops-platform/src/api/middleware/logging.py`
- [Audit routes](https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/api/routes/audit.py): `mist-ops-platform/src/api/routes/audit.py`
- [Platform settings](https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/shared/config/settings.py): `mist-ops-platform/src/shared/config/settings.py`
- [Configuration model](https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/shared/models/config.py): `mist-ops-platform/src/shared/models/config.py`
- [Governance model](https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/shared/models/governance.py): `mist-ops-platform/src/shared/models/governance.py`
- [Operations model](https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/shared/models/operations.py): `mist-ops-platform/src/shared/models/operations.py`
- [Deployment tasks](https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/worker/tasks/deploy_tasks.py): `mist-ops-platform/src/worker/tasks/deploy_tasks.py`
- [Sync tasks](https://github.com/jmorrison-juniper/misthelper/blob/main/mist-ops-platform/src/worker/tasks/sync_tasks.py): `mist-ops-platform/src/worker/tasks/sync_tasks.py`

### Remote access

- [SSH operations](https://github.com/jmorrison-juniper/misthelper/blob/main/src/ssh/ssh_runner_manager.py): `src/ssh/ssh_runner_manager.py`

### Other components

- **Network operator**
- **Mist Cloud API**
- **Managed devices**

## Connections

- Network operator → Operation menu: selects operation (evidence: `README.md`)
- Operation menu → Mist Cloud API: reads or changes (evidence: `README.md`)
- Operation menu → Data collection: runs operation
- Data collection → Inventory export: uses exporter (evidence: `src/analytics/data_collection_manager.py`)
- Inventory export → Data processing: uses processing (evidence: `src/export/org_inventory_exporter.py`)
- Inventory export → Files and databases: writes output (evidence: `README.md`)
- Operation menu → Firmware operations: dispatches upgrade
- Firmware operations → Mist Cloud API: upgrades devices (evidence: `README.md`)
- Network operator → Address audit: runs audit (evidence: `src/site/address_audit/audit_engine.py`)
- Address audit → Mist Cloud API: reads inventory (evidence: `src/site/address_audit/audit_engine.py`)
- Network operator → Map operations: uses maps (evidence: `src/maps/maps_manager.py`)
- Network operator → Profile migration: confirms change (evidence: `src/device/ap_profile_migration_manager.py`)
- Profile migration → Mist Cloud API: updates profiles
- Network operator → Web portal: uses portal (evidence: `README.md`)
- Web portal → Webhook receiver: registers receiver (evidence: `web_portal/app.py`)
- Network operator → Upgrade capture portal: captures upgrades (evidence: `README.md`)
- Network operator → Metrics gateway: scrapes metrics (evidence: `README.md`)
- Network operator → Platform API: uses platform
- Platform API → Audit routes: registers routes (evidence: `mist-ops-platform/src/api/main.py`)
- Platform API → Request logging: configures middleware (evidence: `mist-ops-platform/src/api/main.py`)
- Platform API → Platform settings: loads settings (evidence: `mist-ops-platform/src/api/main.py`)
- Audit routes → Governance model: uses model (evidence: `mist-ops-platform/src/api/routes/audit.py`)
- Audit routes → Operations model: uses model (evidence: `mist-ops-platform/src/api/routes/audit.py`)
- Network operator → SSH operations: runs commands (evidence: `README.md`)
- SSH operations → Managed devices: executes remotely (evidence: `README.md`)
