# ny78455/indoor-gps- architecture

> Architecture diagram of the GitHub repository ny78455/indoor-gps-, 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/ny78455/indoor-gps-
- Repository: https://github.com/ny78455/indoor-gps-

## Overview

VLCL is an interactive indoor visible-light communication and localization digital twin. Users configure and run simulations through a React interface; the Express service routes requests to the Python simulation core, whose pipeline produces environment, physics, communication/localization, and adaptive results. The graph also retains the dataset-generation capability surfaced by the UI. Some subsystem links are documented or visible only in the source index; those are shown as documented or explicitly unverified rather than inferred call chains.

Main entry points: [`backend/VLCL_AI/pipeline.py`](https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/pipeline.py) (Simulation Pipeline), [`frontend/src/App.tsx`](https://github.com/ny78455/indoor-gps-/blob/main/frontend/src/App.tsx) (Lab Interface), [`backend/VLCL_AI/integrated_vlcl/engine.py`](https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/integrated_vlcl/engine.py) (Integrated VLCL), [`backend/server.ts`](https://github.com/ny78455/indoor-gps-/blob/main/backend/server.ts) (Express API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Simulation UI"]
  node_app["Lab Interface<br/>[App.tsx]"]
  node_visualizer["3D View<br/>[ThreeCanvas.tsx]"]
  node_live_results["Live Results<br/>[LiveResults.tsx]"]
  node_dataset_panel["Dataset Panel<br/>[DatasetPanel.tsx]"]
end

subgraph group_service["Request Service"]
  node_server["Express API<br/>[server.ts]"]
end

subgraph group_simulation["Simulation Core"]
  node_pipeline["Simulation Pipeline<br/>[pipeline.py]"]
  node_system_state["Shared State<br/>[system_state.py]"]
  node_environment["Environment Simulator<br/>[simulator.py]"]
  node_env_state["Geometry State<br/>[state.py]"]
  node_physics["Optical Physics<br/>[physics_engine.py]"]
  node_integrated["Integrated VLCL<br/>[engine.py]"]
  node_communication["Communication DSP<br/>[engine.py]"]
  node_localization["A-DPDOA Localization<br/>[engine.py]"]
  node_metrics["Metrics Aggregation"]
end

subgraph group_adaptation["Adaptive Transmission"]
  node_adaptive["Resource Allocation<br/>[engine.py]"]
  node_power["Power Optimization<br/>[power_engine.py]"]
end

subgraph group_data["Dataset Generation"]
  node_dataset_manager["Dataset Manager<br/>[dataset_manager.py]"]
  node_dataset_generator["Scenario Generator<br/>[generator.py]"]
end

node_user(("Researcher"))

node_user -->|"configures and runs"| node_app
node_app -->|"renders"| node_visualizer
node_app -->|"shows results"| node_live_results
node_app -->|"opens"| node_dataset_panel
node_app -->|"sends HTTP requests"| node_server
node_server -.->|"routes simulation"| node_pipeline
node_server -->|"executes Python"| node_pipeline
node_pipeline -->|"steps"| node_environment
node_pipeline -->|"computes"| node_physics
node_pipeline -->|"runs"| node_integrated
node_pipeline -->|"allocates"| node_adaptive
node_pipeline -->|"optimizes power"| node_power
node_pipeline -->|"aggregates"| node_metrics
node_environment -->|"produces geometry"| node_env_state
node_physics -->|"consumes geometry"| node_env_state
node_integrated -->|"requests allocation"| node_adaptive
node_integrated -->|"instantiates"| node_power
node_integrated -.->|"coordinates communication"| node_communication
node_integrated -.->|"coordinates localization"| node_localization
node_dataset_manager -->|"uses"| node_dataset_generator

click node_app "https://github.com/ny78455/indoor-gps-/blob/main/frontend/src/App.tsx"
click node_visualizer "https://github.com/ny78455/indoor-gps-/blob/main/frontend/src/components/ThreeCanvas.tsx"
click node_live_results "https://github.com/ny78455/indoor-gps-/blob/main/frontend/src/components/results/LiveResults.tsx"
click node_dataset_panel "https://github.com/ny78455/indoor-gps-/blob/main/frontend/src/components/DatasetPanel.tsx"
click node_server "https://github.com/ny78455/indoor-gps-/blob/main/backend/server.ts"
click node_pipeline "https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/pipeline.py"
click node_system_state "https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/system_state.py"
click node_environment "https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/environment/simulator.py"
click node_env_state "https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/environment/state.py"
click node_physics "https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/physics/physics_engine.py"
click node_integrated "https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/integrated_vlcl/engine.py"
click node_communication "https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/communication/engine.py"
click node_localization "https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/localization/engine.py"
click node_metrics "https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/system_metrics_aggregator.py"
click node_adaptive "https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/adaptive/engine.py"
click node_power "https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/adaptive/power_engine.py"
click node_dataset_manager "https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/dataset_generation/dataset_manager.py"
click node_dataset_generator "https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/dataset_generation/generator.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_visualizer,node_live_results,node_dataset_panel toneBlue
class node_server toneAmber
class node_pipeline,node_system_state,node_environment,node_env_state,node_physics,node_integrated,node_communication,node_localization,node_metrics toneMint
class node_adaptive,node_power toneRose
class node_dataset_manager,node_dataset_generator,node_user toneIndigo
```

## Components

### Simulation UI

- [Lab Interface](https://github.com/ny78455/indoor-gps-/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [3D View](https://github.com/ny78455/indoor-gps-/blob/main/frontend/src/components/ThreeCanvas.tsx): `frontend/src/components/ThreeCanvas.tsx`
- [Live Results](https://github.com/ny78455/indoor-gps-/blob/main/frontend/src/components/results/LiveResults.tsx): `frontend/src/components/results/LiveResults.tsx`
- [Dataset Panel](https://github.com/ny78455/indoor-gps-/blob/main/frontend/src/components/DatasetPanel.tsx): `frontend/src/components/DatasetPanel.tsx`

### Request Service

- [Express API](https://github.com/ny78455/indoor-gps-/blob/main/backend/server.ts): `backend/server.ts`

### Simulation Core

- [Simulation Pipeline](https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/pipeline.py): `backend/VLCL_AI/pipeline.py`
- [Shared State](https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/system_state.py): `backend/VLCL_AI/system_state.py`
- [Environment Simulator](https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/environment/simulator.py): `backend/VLCL_AI/environment/simulator.py`
- [Geometry State](https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/environment/state.py): `backend/VLCL_AI/environment/state.py`
- [Optical Physics](https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/physics/physics_engine.py): `backend/VLCL_AI/physics/physics_engine.py`
- [Integrated VLCL](https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/integrated_vlcl/engine.py): `backend/VLCL_AI/integrated_vlcl/engine.py`
- [Communication DSP](https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/communication/engine.py): `backend/VLCL_AI/communication/engine.py`
- [A-DPDOA Localization](https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/localization/engine.py): `backend/VLCL_AI/localization/engine.py`
- [Metrics Aggregation](https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/system_metrics_aggregator.py): `backend/VLCL_AI/system_metrics_aggregator.py`

### Adaptive Transmission

- [Resource Allocation](https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/adaptive/engine.py): `backend/VLCL_AI/adaptive/engine.py`
- [Power Optimization](https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/adaptive/power_engine.py): `backend/VLCL_AI/adaptive/power_engine.py`

### Dataset Generation

- [Dataset Manager](https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/dataset_generation/dataset_manager.py): `backend/VLCL_AI/dataset_generation/dataset_manager.py`
- [Scenario Generator](https://github.com/ny78455/indoor-gps-/blob/main/backend/VLCL_AI/dataset_generation/generator.py): `backend/VLCL_AI/dataset_generation/generator.py`

### Other components

- **Researcher**

## Connections

- Researcher → Lab Interface: configures and runs
- Lab Interface → 3D View: renders (evidence: `frontend/src/App.tsx`)
- Lab Interface → Live Results: shows results (evidence: `frontend/src/App.tsx`)
- Lab Interface → Dataset Panel: opens (evidence: `frontend/src/App.tsx`)
- Lab Interface → Express API: sends HTTP requests
- Express API → Simulation Pipeline: routes simulation
- Express API → Simulation Pipeline: executes Python
- Simulation Pipeline → Environment Simulator: steps (evidence: `backend/VLCL_AI/pipeline.py`)
- Simulation Pipeline → Optical Physics: computes (evidence: `backend/VLCL_AI/pipeline.py`)
- Simulation Pipeline → Integrated VLCL: runs (evidence: `backend/VLCL_AI/pipeline.py`)
- Simulation Pipeline → Resource Allocation: allocates (evidence: `backend/VLCL_AI/pipeline.py`)
- Simulation Pipeline → Power Optimization: optimizes power (evidence: `backend/VLCL_AI/pipeline.py`)
- Simulation Pipeline → Metrics Aggregation: aggregates (evidence: `backend/VLCL_AI/pipeline.py`)
- Environment Simulator → Geometry State: produces geometry
- Optical Physics → Geometry State: consumes geometry (evidence: `backend/VLCL_AI/physics/physics_engine.py`)
- Integrated VLCL → Resource Allocation: requests allocation (evidence: `backend/VLCL_AI/integrated_vlcl/engine.py`)
- Integrated VLCL → Power Optimization: instantiates (evidence: `backend/VLCL_AI/integrated_vlcl/engine.py`)
- Integrated VLCL → Communication DSP: coordinates communication
- Integrated VLCL → A-DPDOA Localization: coordinates localization
- Dataset Manager → Scenario Generator: uses (evidence: `backend/VLCL_AI/dataset_generation/dataset_manager.py`)
