# walidnxt123456-sudo/ran-performance-mapper architecture

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

- Interactive diagram: https://gitdiagram.com/walidnxt123456-sudo/ran-performance-mapper
- Repository: https://github.com/walidnxt123456-sudo/ran-performance-mapper

## Overview

This application supports telecom radio-site discovery and performance-metric analysis. A user submits a geographic discovery or KPI extraction request through the FastAPI service; the core controller routes it to the geo or PM workflow, and the result is returned to the frontend. Site discovery searches technology-specific cell files and ranks nearby sites. PM workflows discover file metadata or extract KPI values. The frontend includes map, site-layer, and KPI-visualization components, but their runtime connections are not shown in the supplied excerpts. Edges below are limited to documented calls and data handling.

Main entry points: [`backend_engine/module/pm_file_discovery_module/discovery_main.py`](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/module/pm_file_discovery_module/discovery_main.py) (PM discovery module), [`backend_engine/core_controller.py`](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/core_controller.py) (Core controller), [`main.py`](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/main.py) (HTTP API), [`backend_engine/controllers/geo_service_controller.py`](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/controllers/geo_service_controller.py) (Geo controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_fastapi["HTTP API<br/>[main.py]"]
end

subgraph group_coordination["Request coordination"]
  node_core["Core controller<br/>[core_controller.py]"]
  node_session["Session manager<br/>[session_manager.py]"]
end

subgraph group_geography["Site discovery"]
  node_geo_controller["Geo controller"]
  node_geo_locator["Nearest-site locator"]
  node_radio_utils["Radio column utilities<br/>[radio_utils.py]"]
  node_geo_files["Cell design files"]
end

subgraph group_performance["PM analytics"]
  node_pm_controller["PM controller"]
  node_pm_service["PM metadata service<br/>[pm_service.py]"]
  node_discovery["PM discovery module<br/>[discovery_main.py]"]
  node_file_adapter["Chunked file adapter<br/>[file_adapter.py]"]
  node_analytic_engine["PM analytics engine<br/>[analytic_engine.py]"]
  node_pm_models["PM request models<br/>[models.py]"]
  node_csv_reader["Telecom data reader<br/>[csv_reader.py]"]
  node_pm_files["PM data files"]
end

subgraph group_frontend["Map and analysis UI"]
  node_frontend["Frontend page<br/>[index.html]"]
  node_map_ui["Map and site layers<br/>[map_manager.js]"]
  node_site_layer["Site visualization<br/>[site_layer.js]"]
  node_pm_ui["PM controls"]
  node_kpi_visuals["KPI visualization"]
end

node_user(("User"))

node_user -->|"submits request"| node_fastapi
node_fastapi -->|"routes request"| node_core
node_core -->|"requests discovery"| node_geo_controller
node_core -->|"routes PM work"| node_pm_controller
node_core -->|"initializes"| node_session
node_geo_controller -->|"queries sites"| node_geo_locator
node_geo_locator -->|"reads design data"| node_csv_reader
node_geo_locator -->|"maps columns"| node_radio_utils
node_geo_controller -->|"selects technology files"| node_geo_files
node_pm_controller -->|"runs discovery or extraction"| node_discovery
node_pm_controller -->|"delegates PM lookup"| node_pm_service
node_discovery -->|"validates request"| node_pm_models
node_discovery -->|"streams discovery chunks"| node_file_adapter
node_discovery -->|"scans or extracts"| node_analytic_engine
node_discovery -->|"reads extraction data"| node_csv_reader
node_pm_service -->|"reads PM data"| node_csv_reader
node_discovery -->|"loads configured file"| node_pm_files
node_pm_service -->|"scans PM directory"| node_pm_files
node_fastapi -->|"serves page"| node_frontend

click node_fastapi "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/main.py"
click node_core "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/core_controller.py"
click node_session "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/utils/session_manager.py"
click node_geo_controller "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/controllers/geo_service_controller.py"
click node_geo_locator "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/services/geo_locator_nearest.py"
click node_radio_utils "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/services/radio_utils.py"
click node_pm_controller "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/controllers/pm_service_controller.py"
click node_pm_service "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/services/pm_service.py"
click node_discovery "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/module/pm_file_discovery_module/discovery_main.py"
click node_file_adapter "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/module/pm_file_discovery_module/file_adapter.py"
click node_analytic_engine "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/module/pm_file_discovery_module/analytic_engine.py"
click node_pm_models "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/module/pm_file_discovery_module/models.py"
click node_csv_reader "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/infrastructure/csv_reader.py"
click node_frontend "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/frontend/index.html"
click node_map_ui "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/frontend/js/map/map_manager.js"
click node_site_layer "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/frontend/js/layers/site_layer.js"
click node_pm_ui "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/frontend/js/ui/pm_ui_controller.js"
click node_kpi_visuals "https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/frontend/js/ui/kpi_visual_manager.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_fastapi,node_user toneBlue
class node_core,node_session toneAmber
class node_geo_controller,node_geo_locator,node_radio_utils,node_geo_files toneMint
class node_pm_controller,node_pm_service,node_discovery,node_file_adapter,node_analytic_engine,node_pm_models,node_csv_reader,node_pm_files toneRose
class node_frontend,node_map_ui,node_site_layer,node_pm_ui,node_kpi_visuals toneIndigo
```

## Components

### Application entry

- [HTTP API](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/main.py): `main.py`

### Request coordination

- [Core controller](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/core_controller.py): `backend_engine/core_controller.py`
- [Session manager](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/utils/session_manager.py): `backend_engine/utils/session_manager.py`

### Site discovery

- [Geo controller](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/controllers/geo_service_controller.py): `backend_engine/controllers/geo_service_controller.py`
- [Nearest-site locator](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/services/geo_locator_nearest.py): `backend_engine/services/geo_locator_nearest.py`
- [Radio column utilities](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/services/radio_utils.py): `backend_engine/services/radio_utils.py`
- **Cell design files**

### PM analytics

- [PM controller](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/controllers/pm_service_controller.py): `backend_engine/controllers/pm_service_controller.py`
- [PM metadata service](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/services/pm_service.py): `backend_engine/services/pm_service.py`
- [PM discovery module](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/module/pm_file_discovery_module/discovery_main.py): `backend_engine/module/pm_file_discovery_module/discovery_main.py`
- [Chunked file adapter](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/module/pm_file_discovery_module/file_adapter.py): `backend_engine/module/pm_file_discovery_module/file_adapter.py`
- [PM analytics engine](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/module/pm_file_discovery_module/analytic_engine.py): `backend_engine/module/pm_file_discovery_module/analytic_engine.py`
- [PM request models](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/module/pm_file_discovery_module/models.py): `backend_engine/module/pm_file_discovery_module/models.py`
- [Telecom data reader](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/backend_engine/infrastructure/csv_reader.py): `backend_engine/infrastructure/csv_reader.py`
- **PM data files**

### Map and analysis UI

- [Frontend page](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/frontend/index.html): `frontend/index.html`
- [Map and site layers](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/frontend/js/map/map_manager.js): `frontend/js/map/map_manager.js`
- [Site visualization](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/frontend/js/layers/site_layer.js): `frontend/js/layers/site_layer.js`
- [PM controls](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/frontend/js/ui/pm_ui_controller.js): `frontend/js/ui/pm_ui_controller.js`
- [KPI visualization](https://github.com/walidnxt123456-sudo/ran-performance-mapper/blob/main/frontend/js/ui/kpi_visual_manager.js): `frontend/js/ui/kpi_visual_manager.js`

### Other components

- **User**

## Connections

- User → HTTP API: submits request (evidence: `main.py`)
- HTTP API → Core controller: routes request (evidence: `main.py`)
- Core controller → Geo controller: requests discovery (evidence: `backend_engine/core_controller.py`)
- Core controller → PM controller: routes PM work (evidence: `backend_engine/core_controller.py`)
- Core controller → Session manager: initializes (evidence: `backend_engine/core_controller.py`)
- Geo controller → Nearest-site locator: queries sites (evidence: `backend_engine/controllers/geo_service_controller.py`)
- Nearest-site locator → Telecom data reader: reads design data (evidence: `backend_engine/services/geo_locator_nearest.py`)
- Nearest-site locator → Radio column utilities: maps columns (evidence: `backend_engine/services/geo_locator_nearest.py`)
- Geo controller → Cell design files: selects technology files (evidence: `backend_engine/controllers/geo_service_controller.py`)
- PM controller → PM discovery module: runs discovery or extraction (evidence: `backend_engine/controllers/pm_service_controller.py`)
- PM controller → PM metadata service: delegates PM lookup (evidence: `backend_engine/controllers/pm_service_controller.py`)
- PM discovery module → PM request models: validates request (evidence: `backend_engine/module/pm_file_discovery_module/discovery_main.py`)
- PM discovery module → Chunked file adapter: streams discovery chunks (evidence: `backend_engine/module/pm_file_discovery_module/discovery_main.py`)
- PM discovery module → PM analytics engine: scans or extracts (evidence: `backend_engine/module/pm_file_discovery_module/discovery_main.py`)
- PM discovery module → Telecom data reader: reads extraction data (evidence: `backend_engine/module/pm_file_discovery_module/discovery_main.py`)
- PM metadata service → Telecom data reader: reads PM data (evidence: `backend_engine/services/pm_service.py`)
- PM discovery module → PM data files: loads configured file (evidence: `backend_engine/module/pm_file_discovery_module/discovery_main.py`)
- PM metadata service → PM data files: scans PM directory (evidence: `backend_engine/services/pm_service.py`)
- HTTP API → Frontend page: serves page (evidence: `main.py`)
