# zxlawdx/acess_manager architecture

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

- Interactive diagram: https://gitdiagram.com/zxlawdx/acess_manager
- Repository: https://github.com/zxlawdx/acess_manager

## Overview

ZTE Automatic is a desktop support application for connecting to ONTs, inspecting device/network state, diagnosing service issues, and applying verified configuration changes. Its main workflow runs from the SPA through the internal API to ZTEService, which selects a device-specific adapter and protocol client, then records sessions and changes. Distinct branches cover automated support diagnostics and reports, attendant profiles, and fleet/management operations. README capabilities not tied to sampled call sites are represented as documented subsystem scope; uncertain internal links are omitted.

Main entry points: [`apps/zte_manager/services/zte_service.py`](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/zte_service.py) (ZTE service), [`apps/zte_manager/presentation/api`](https://github.com/zxlawdx/acess_manager/tree/main/apps/zte_manager/presentation/api) (API routes), [`apps/zte_manager/services/huawei_service.py`](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/huawei_service.py) (Huawei service), [`apps/zte_manager/model/zte.py`](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/model/zte.py) (ZTE device model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_spa["Support SPA<br/>[app.js]"]
  node_api_client["API client<br/>[api_client.js]"]
end

subgraph group_api["API and services"]
  node_api_routes["API routes"]
  node_device_service["Device service<br/>[device_service.py]"]
  node_zte_service["ZTE service<br/>[zte_service.py]"]
  node_profiles["Profile service<br/>[profile_service.py]"]
  node_profile_store[("Profile repository")]
end

subgraph group_device["Device access"]
  node_adapters["Device adapters"]
  node_firmware["Firmware policy<br/>[firmware_policy.py]"]
  node_zte_model["ZTE device model<br/>[zte.py]"]
  node_thinklua["ThinkLua adapter<br/>[thinklua_device.py]"]
  node_huawei_service["Huawei service<br/>[huawei_service.py]"]
  node_huawei_clients["Huawei clients"]
end

subgraph group_diagnostics["Diagnostics and history"]
  node_auto_diag["Automatic diagnostics"]
  node_support_diag["Support diagnostics"]
  node_speed_test["Speed tests"]
  node_attendance["Attendance report"]
  node_history[("Session history")]
end

subgraph group_management["Management operations"]
  node_management["CPE management"]
  node_management_store[("Management store")]
  node_tr069["TR-069 profiles"]
end

node_attendant(("Support attendant"))
node_ont(("ZTE/Huawei ONT"))

node_attendant -->|"uses"| node_spa
node_spa -->|"issues requests"| node_api_client
node_api_client -->|"calls API"| node_api_routes
node_api_routes -->|"routes device calls"| node_device_service
node_device_service -.->|"delegates"| node_zte_service
node_zte_service -->|"selects adapter"| node_adapters
node_adapters -->|"checks policy"| node_firmware
node_zte_service -->|"uses device model"| node_zte_model
node_thinklua -->|"delegates"| node_zte_model
node_zte_service -->|"dispatches"| node_thinklua
node_zte_service -.->|"dispatches"| node_huawei_service
node_huawei_service -->|"uses clients"| node_huawei_clients
node_zte_model -.->|"reads and writes"| node_ont
node_huawei_clients -->|"HTTP protocol"| node_ont
node_api_routes -.->|"routes profiles"| node_profiles
node_profiles -->|"reads and writes"| node_profile_store
node_api_routes -.->|"starts diagnostics"| node_auto_diag
node_support_diag -->|"composes"| node_auto_diag
node_support_diag -->|"runs tests"| node_speed_test
node_auto_diag -.->|"feeds report"| node_attendance
node_zte_service -->|"records sessions"| node_history
node_api_routes -.->|"routes operations"| node_management
node_management -->|"persists records"| node_management_store
node_huawei_service -->|"uses profiles"| node_tr069

click node_spa "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/static/js/app.js"
click node_api_client "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/static/js/core/api_client.js"
click node_api_routes "https://github.com/zxlawdx/acess_manager/tree/main/apps/zte_manager/presentation/api"
click node_device_service "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/device_service.py"
click node_zte_service "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/zte_service.py"
click node_profiles "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/profile_service.py"
click node_profile_store "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/repositories/profile_repository.py"
click node_adapters "https://github.com/zxlawdx/acess_manager/tree/main/apps/zte_manager/model/device_adapters"
click node_firmware "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/infrastructure/zte/firmware_policy.py"
click node_zte_model "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/model/zte.py"
click node_thinklua "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/infrastructure/zte/adapters/thinklua_device.py"
click node_huawei_service "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/huawei_service.py"
click node_huawei_clients "https://github.com/zxlawdx/acess_manager/tree/main/apps/zte_manager/infrastructure/huawei"
click node_auto_diag "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/automatic_diagnostic_service.py"
click node_support_diag "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/support_diagnostic_service.py"
click node_speed_test "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/speed_test_service.py"
click node_attendance "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/attendance_report_service.py"
click node_history "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/repositories/history_repository.py"
click node_management "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/cpe_management_service.py"
click node_management_store "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/repositories/management_repository.py"
click node_tr069 "https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/tr069_profile_service.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_spa,node_api_client toneBlue
class node_api_routes,node_device_service,node_zte_service,node_profiles,node_profile_store toneAmber
class node_adapters,node_firmware,node_zte_model,node_thinklua,node_huawei_service,node_huawei_clients toneMint
class node_auto_diag,node_support_diag,node_speed_test,node_attendance,node_history toneRose
class node_management,node_management_store,node_tr069,node_attendant,node_ont toneIndigo
```

## Components

### Desktop interface

- [Support SPA](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/static/js/app.js): `apps/zte_manager/static/js/app.js`
- [API client](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/static/js/core/api_client.js): `apps/zte_manager/static/js/core/api_client.js`

### API and services

- [API routes](https://github.com/zxlawdx/acess_manager/tree/main/apps/zte_manager/presentation/api): `apps/zte_manager/presentation/api`
- [Device service](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/device_service.py): `apps/zte_manager/services/device_service.py`
- [ZTE service](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/zte_service.py): `apps/zte_manager/services/zte_service.py`
- [Profile service](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/profile_service.py): `apps/zte_manager/services/profile_service.py`
- [Profile repository](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/repositories/profile_repository.py): `apps/zte_manager/repositories/profile_repository.py`

### Device access

- [Device adapters](https://github.com/zxlawdx/acess_manager/tree/main/apps/zte_manager/model/device_adapters): `apps/zte_manager/model/device_adapters`
- [Firmware policy](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/infrastructure/zte/firmware_policy.py): `apps/zte_manager/infrastructure/zte/firmware_policy.py`
- [ZTE device model](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/model/zte.py): `apps/zte_manager/model/zte.py`
- [ThinkLua adapter](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/infrastructure/zte/adapters/thinklua_device.py): `apps/zte_manager/infrastructure/zte/adapters/thinklua_device.py`
- [Huawei service](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/huawei_service.py): `apps/zte_manager/services/huawei_service.py`
- [Huawei clients](https://github.com/zxlawdx/acess_manager/tree/main/apps/zte_manager/infrastructure/huawei): `apps/zte_manager/infrastructure/huawei`

### Diagnostics and history

- [Automatic diagnostics](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/automatic_diagnostic_service.py): `apps/zte_manager/services/automatic_diagnostic_service.py`
- [Support diagnostics](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/support_diagnostic_service.py): `apps/zte_manager/services/support_diagnostic_service.py`
- [Speed tests](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/speed_test_service.py): `apps/zte_manager/services/speed_test_service.py`
- [Attendance report](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/attendance_report_service.py): `apps/zte_manager/services/attendance_report_service.py`
- [Session history](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/repositories/history_repository.py): `apps/zte_manager/repositories/history_repository.py`

### Management operations

- [CPE management](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/cpe_management_service.py): `apps/zte_manager/services/cpe_management_service.py`
- [Management store](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/repositories/management_repository.py): `apps/zte_manager/repositories/management_repository.py`
- [TR-069 profiles](https://github.com/zxlawdx/acess_manager/blob/main/apps/zte_manager/services/tr069_profile_service.py): `apps/zte_manager/services/tr069_profile_service.py`

### Other components

- **Support attendant**
- **ZTE/Huawei ONT**

## Connections

- Support attendant → Support SPA: uses
- Support SPA → API client: issues requests
- API client → API routes: calls API
- API routes → Device service: routes device calls
- Device service → ZTE service: delegates
- ZTE service → Device adapters: selects adapter (evidence: `apps/zte_manager/services/zte_service.py`)
- Device adapters → Firmware policy: checks policy
- ZTE service → ZTE device model: uses device model (evidence: `apps/zte_manager/services/zte_service.py`)
- ThinkLua adapter → ZTE device model: delegates (evidence: `apps/zte_manager/infrastructure/zte/adapters/thinklua_device.py`)
- ZTE service → ThinkLua adapter: dispatches (evidence: `apps/zte_manager/services/zte_service.py`)
- ZTE service → Huawei service: dispatches
- Huawei service → Huawei clients: uses clients (evidence: `apps/zte_manager/services/huawei_service.py`)
- ZTE device model → ZTE/Huawei ONT: reads and writes
- Huawei clients → ZTE/Huawei ONT: HTTP protocol (evidence: `apps/zte_manager/infrastructure/huawei/family_client.py`)
- API routes → Profile service: routes profiles
- Profile service → Profile repository: reads and writes (evidence: `apps/zte_manager/services/profile_service.py`)
- API routes → Automatic diagnostics: starts diagnostics
- Support diagnostics → Automatic diagnostics: composes (evidence: `apps/zte_manager/services/support_diagnostic_service.py`)
- Support diagnostics → Speed tests: runs tests (evidence: `apps/zte_manager/services/support_diagnostic_service.py`)
- Automatic diagnostics → Attendance report: feeds report
- ZTE service → Session history: records sessions (evidence: `apps/zte_manager/services/zte_service.py`)
- API routes → CPE management: routes operations
- CPE management → Management store: persists records (evidence: `apps/zte_manager/services/cpe_management_service.py`)
- Huawei service → TR-069 profiles: uses profiles (evidence: `apps/zte_manager/services/huawei_service.py`)
