# yazanz22/nokia architecture

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

- Interactive diagram: https://gitdiagram.com/yazanz22/nokia
- Repository: https://github.com/yazanz22/nokia

## Overview

FILO Asset Sentinel diagnoses silent IoT equipment before dispatching technicians: it checks network reachability, roaming and congestion, classifies likely equipment faults, locates the asset and crew, then coordinates parts and work orders. A separate geofence push path warns operators about healthy assets leaving the site. The dashboard consumes live state and supports fleet, incident, inventory, maintenance and simulation views. The excerpts establish simulator startup, app wiring, fault-model behavior and live Nokia integration; some route-to-agent wiring is documented but not shown in sampled source.

Main entry points: [`frontend/src/App.tsx`](https://github.com/yazanz22/nokia/blob/main/frontend/src/App.tsx) (Dashboard app), [`backend/app/agent/tools.py`](https://github.com/yazanz22/nokia/blob/main/backend/app/agent/tools.py) (Agent actions), [`backend/app/main.py`](https://github.com/yazanz22/nokia/blob/main/backend/app/main.py) (REST and WebSocket), [`backend/app/store.py`](https://github.com/yazanz22/nokia/blob/main/backend/app/store.py) (Fleet state store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Operator dashboard"]
  node_app["Dashboard app<br/>[App.tsx]"]
  node_live["Live state<br/>[ws.ts]"]
  node_dashboard_tab["Fleet dashboard<br/>[DashboardTab.tsx]"]
  node_assets_tab["Asset views<br/>[AssetsTab.tsx]"]
  node_incidents_tab["Incidents view<br/>[IncidentsTab.tsx]"]
  node_maintenance_tab["Maintenance view<br/>[MaintenanceTab.tsx]"]
  node_inventory_tab["Inventory view<br/>[InventoryTab.tsx]"]
  node_simulation_tab["Scenario controls<br/>[SimulationTab.tsx]"]
end

subgraph group_diagnosis["Telemetry and diagnosis"]
  node_simulator["Telemetry simulator<br/>[engine.py]"]
  node_detector["Anomaly detector<br/>[detector.py]"]
  node_agent["Diagnostic agent<br/>[agent.py]"]
  node_tools["Agent actions<br/>[tools.py]"]
  node_ml["Fault and forecast models<br/>[client.py]"]
end

subgraph group_operations["Maintenance operations"]
  node_store[("Fleet state store<br/>[store.py]")]
  node_workorders["Work orders<br/>[workorders.py]"]
  node_maintenance["Maintenance planning<br/>[maintenance.py]"]
  node_incidents["Incident management<br/>[incidents.py]"]
  node_inventory["Parts inventory<br/>[inventory.py]"]
  node_geofence["Geofence alerts<br/>[fleet.py]"]
end

subgraph group_platform["API and integrations"]
  node_api["REST and WebSocket<br/>[main.py]"]
  node_routes["API routes"]
  node_nac["Network client<br/>[factory.py]"]
  node_nokia["Nokia CAMARA adapter<br/>[nokia.py]"]
end

node_operator(("Operator"))
node_network{{"Mobile network"}}

node_operator -->|"uses"| node_app
node_app -->|"subscribes"| node_live
node_app -->|"renders"| node_dashboard_tab
node_app -->|"renders"| node_assets_tab
node_app -->|"renders"| node_incidents_tab
node_app -->|"renders"| node_maintenance_tab
node_app -->|"renders"| node_inventory_tab
node_app -->|"renders"| node_simulation_tab
node_live -->|"opens socket"| node_api
node_api -->|"streams state"| node_live
node_app -->|"requests"| node_api
node_api -->|"dispatches"| node_routes
node_simulator -->|"records telemetry"| node_store
node_simulator -->|"publishes positions"| node_store
node_simulator -->|"raises geofence alerts"| node_store
node_simulator -->|"advances jobs"| node_store
node_api -->|"starts"| node_simulator
node_api -->|"starts"| node_detector
node_detector -->|"invokes diagnosis"| node_agent
node_agent -->|"calls actions"| node_tools
node_tools -->|"checks network"| node_nac
node_tools -->|"classifies fault"| node_ml
node_tools -->|"reads and writes"| node_store
node_nac -->|"selects adapter"| node_nokia
node_nokia -->|"queries CAMARA"| node_network
node_network -.->|"pushes geofence event"| node_nokia
node_tools -->|"creates jobs"| node_workorders
node_tools -->|"records incidents"| node_incidents
node_tools -->|"checks parts"| node_inventory
node_tools -->|"schedules work"| node_maintenance
node_store -->|"supplies live state"| node_api

click node_app "https://github.com/yazanz22/nokia/blob/main/frontend/src/App.tsx"
click node_live "https://github.com/yazanz22/nokia/blob/main/frontend/src/lib/ws.ts"
click node_dashboard_tab "https://github.com/yazanz22/nokia/blob/main/frontend/src/tabs/DashboardTab.tsx"
click node_assets_tab "https://github.com/yazanz22/nokia/blob/main/frontend/src/tabs/AssetsTab.tsx"
click node_incidents_tab "https://github.com/yazanz22/nokia/blob/main/frontend/src/tabs/IncidentsTab.tsx"
click node_maintenance_tab "https://github.com/yazanz22/nokia/blob/main/frontend/src/tabs/MaintenanceTab.tsx"
click node_inventory_tab "https://github.com/yazanz22/nokia/blob/main/frontend/src/tabs/InventoryTab.tsx"
click node_simulation_tab "https://github.com/yazanz22/nokia/blob/main/frontend/src/tabs/SimulationTab.tsx"
click node_api "https://github.com/yazanz22/nokia/blob/main/backend/app/main.py"
click node_routes "https://github.com/yazanz22/nokia/tree/main/backend/app/routes"
click node_simulator "https://github.com/yazanz22/nokia/blob/main/backend/app/simulator/engine.py"
click node_detector "https://github.com/yazanz22/nokia/blob/main/backend/app/anomaly/detector.py"
click node_agent "https://github.com/yazanz22/nokia/blob/main/backend/app/agent/agent.py"
click node_tools "https://github.com/yazanz22/nokia/blob/main/backend/app/agent/tools.py"
click node_ml "https://github.com/yazanz22/nokia/blob/main/backend/app/ml/client.py"
click node_nac "https://github.com/yazanz22/nokia/blob/main/backend/app/nac/factory.py"
click node_nokia "https://github.com/yazanz22/nokia/blob/main/backend/app/nac/nokia.py"
click node_store "https://github.com/yazanz22/nokia/blob/main/backend/app/store.py"
click node_workorders "https://github.com/yazanz22/nokia/blob/main/backend/app/routes/workorders.py"
click node_maintenance "https://github.com/yazanz22/nokia/blob/main/backend/app/routes/maintenance.py"
click node_incidents "https://github.com/yazanz22/nokia/blob/main/backend/app/routes/incidents.py"
click node_inventory "https://github.com/yazanz22/nokia/blob/main/backend/app/routes/inventory.py"
click node_geofence "https://github.com/yazanz22/nokia/blob/main/backend/app/routes/fleet.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_app,node_live,node_dashboard_tab,node_assets_tab,node_incidents_tab,node_maintenance_tab,node_inventory_tab,node_simulation_tab toneBlue
class node_simulator,node_detector,node_agent,node_tools,node_ml toneAmber
class node_store,node_workorders,node_maintenance,node_incidents,node_inventory,node_geofence toneMint
class node_api,node_routes,node_nac,node_nokia toneRose
class node_operator,node_network toneIndigo
```

## Components

### Operator dashboard

- [Dashboard app](https://github.com/yazanz22/nokia/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Live state](https://github.com/yazanz22/nokia/blob/main/frontend/src/lib/ws.ts): `frontend/src/lib/ws.ts`
- [Fleet dashboard](https://github.com/yazanz22/nokia/blob/main/frontend/src/tabs/DashboardTab.tsx): `frontend/src/tabs/DashboardTab.tsx`
- [Asset views](https://github.com/yazanz22/nokia/blob/main/frontend/src/tabs/AssetsTab.tsx): `frontend/src/tabs/AssetsTab.tsx`
- [Incidents view](https://github.com/yazanz22/nokia/blob/main/frontend/src/tabs/IncidentsTab.tsx): `frontend/src/tabs/IncidentsTab.tsx`
- [Maintenance view](https://github.com/yazanz22/nokia/blob/main/frontend/src/tabs/MaintenanceTab.tsx): `frontend/src/tabs/MaintenanceTab.tsx`
- [Inventory view](https://github.com/yazanz22/nokia/blob/main/frontend/src/tabs/InventoryTab.tsx): `frontend/src/tabs/InventoryTab.tsx`
- [Scenario controls](https://github.com/yazanz22/nokia/blob/main/frontend/src/tabs/SimulationTab.tsx): `frontend/src/tabs/SimulationTab.tsx`

### Telemetry and diagnosis

- [Telemetry simulator](https://github.com/yazanz22/nokia/blob/main/backend/app/simulator/engine.py): `backend/app/simulator/engine.py`
- [Anomaly detector](https://github.com/yazanz22/nokia/blob/main/backend/app/anomaly/detector.py): `backend/app/anomaly/detector.py`
- [Diagnostic agent](https://github.com/yazanz22/nokia/blob/main/backend/app/agent/agent.py): `backend/app/agent/agent.py`
- [Agent actions](https://github.com/yazanz22/nokia/blob/main/backend/app/agent/tools.py): `backend/app/agent/tools.py`
- [Fault and forecast models](https://github.com/yazanz22/nokia/blob/main/backend/app/ml/client.py): `backend/app/ml/client.py`

### Maintenance operations

- [Fleet state store](https://github.com/yazanz22/nokia/blob/main/backend/app/store.py): `backend/app/store.py`
- [Work orders](https://github.com/yazanz22/nokia/blob/main/backend/app/routes/workorders.py): `backend/app/routes/workorders.py`
- [Maintenance planning](https://github.com/yazanz22/nokia/blob/main/backend/app/routes/maintenance.py): `backend/app/routes/maintenance.py`
- [Incident management](https://github.com/yazanz22/nokia/blob/main/backend/app/routes/incidents.py): `backend/app/routes/incidents.py`
- [Parts inventory](https://github.com/yazanz22/nokia/blob/main/backend/app/routes/inventory.py): `backend/app/routes/inventory.py`
- [Geofence alerts](https://github.com/yazanz22/nokia/blob/main/backend/app/routes/fleet.py): `backend/app/routes/fleet.py`

### API and integrations

- [REST and WebSocket](https://github.com/yazanz22/nokia/blob/main/backend/app/main.py): `backend/app/main.py`
- [API routes](https://github.com/yazanz22/nokia/tree/main/backend/app/routes): `backend/app/routes`
- [Network client](https://github.com/yazanz22/nokia/blob/main/backend/app/nac/factory.py): `backend/app/nac/factory.py`
- [Nokia CAMARA adapter](https://github.com/yazanz22/nokia/blob/main/backend/app/nac/nokia.py): `backend/app/nac/nokia.py`

### Other components

- **Operator**
- **Mobile network**

## Connections

- Operator → Dashboard app: uses
- Dashboard app → Live state: subscribes
- Dashboard app → Fleet dashboard: renders
- Dashboard app → Asset views: renders
- Dashboard app → Incidents view: renders
- Dashboard app → Maintenance view: renders
- Dashboard app → Inventory view: renders
- Dashboard app → Scenario controls: renders
- Live state → REST and WebSocket: opens socket
- REST and WebSocket → Live state: streams state
- Dashboard app → REST and WebSocket: requests
- REST and WebSocket → API routes: dispatches
- Telemetry simulator → Fleet state store: records telemetry
- Telemetry simulator → Fleet state store: publishes positions
- Telemetry simulator → Fleet state store: raises geofence alerts
- Telemetry simulator → Fleet state store: advances jobs
- REST and WebSocket → Telemetry simulator: starts
- REST and WebSocket → Anomaly detector: starts
- Anomaly detector → Diagnostic agent: invokes diagnosis
- Diagnostic agent → Agent actions: calls actions
- Agent actions → Network client: checks network
- Agent actions → Fault and forecast models: classifies fault
- Agent actions → Fleet state store: reads and writes
- Network client → Nokia CAMARA adapter: selects adapter
- Nokia CAMARA adapter → Mobile network: queries CAMARA
- Mobile network → Nokia CAMARA adapter: pushes geofence event
- Agent actions → Work orders: creates jobs
- Agent actions → Incident management: records incidents
- Agent actions → Parts inventory: checks parts
- Agent actions → Maintenance planning: schedules work
- Fleet state store → REST and WebSocket: supplies live state
