# majimety/atmos-atacama-telescope-monitoring-and-operations-system architecture

> Architecture diagram of the GitHub repository majimety/atmos-atacama-telescope-monitoring-and-operations-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system
- Repository: https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system

## Overview

ATMOS is a browser-based observatory monitoring and operations simulator. Operators view live array telemetry and alerts, inspect the 3D array and interferometry displays, and use control and scheduling panels. The backend simulates antenna state and atmospheric conditions, exposes APIs and a telemetry WebSocket, and can persist frames to InfluxDB. Edges reflect the shown imports, calls, and README descriptions; unsampled UI and runtime wiring is not inferred.

Main entry points: [`client/src/App.jsx`](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/App.jsx) (Dashboard shell), [`server/app/simulation/alma_sim.py`](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/simulation/alma_sim.py) (Array simulation), [`server/main.py`](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/main.py) (FastAPI application), [`server/app/ws/telemetry.py`](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/ws/telemetry.py) (Telemetry broadcaster)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Operator interface"]
  node_app["Dashboard shell<br/>[App.jsx]"]
  node_websocket_hook["Telemetry connection<br/>[useWebSocket.js]"]
  node_telemetry_store["Telemetry state<br/>[telemetryStore.js]"]
  node_alert_engine["Alert detection<br/>[alertEngine.js]"]
  node_alert_store["Alert state and feed<br/>[alertStore.js]"]
  node_scene["3D array scene<br/>[Scene.jsx]"]
  node_dish_mesh["Antenna models<br/>[DishMesh.jsx]"]
  node_control_panel["Control panel<br/>[ControlPanel.jsx]"]
  node_scheduler_panel["Scheduler panel<br/>[SchedulerPanel.jsx]"]
  node_science_views["Interferometry displays<br/>[UVCoveragePlot.jsx]"]
  node_correlator["Baseline correlator"]
end

subgraph group_backend["API and telemetry"]
  node_api["FastAPI application<br/>[main.py]"]
  node_telemetry_endpoint["Telemetry broadcaster<br/>[telemetry.py]"]
  node_control_api["Telescope control API<br/>[control.py]"]
  node_scheduler_api["Scheduler API<br/>[scheduler.py]"]
  node_scheduler["Observation queue<br/>[obs_queue.py]"]
  node_atmosphere_api["Atmosphere API<br/>[atmosphere.py]"]
end

subgraph group_simulation["Observatory simulation"]
  node_alma_sim["Array simulation<br/>[alma_sim.py]"]
  node_positions["Array positions<br/>[alma_positions.py]"]
  node_pointing["Pointing dynamics<br/>[pointing_sim.py]"]
  node_physics["Tsys models<br/>[physics_models.py]"]
  node_weather["Atmosphere acquisition<br/>[weather_fetcher.py]"]
end

subgraph group_auth["Access control"]
  node_auth_store["Session state<br/>[auth.js]"]
  node_login["Login page<br/>[LoginPage.jsx]"]
  node_auth_api["JWT and role checks<br/>[auth.py]"]
end

subgraph group_integrations["External integrations"]
  node_influx_writer["Time-series writer<br/>[influx_writer.py]"]
  node_influxdb[("InfluxDB")]
  node_open_meteo["Open-Meteo"]
end

node_operator(("Operator"))

node_operator -->|"uses"| node_app
node_app -->|"opens connection"| node_websocket_hook
node_app -->|"reads state"| node_telemetry_store
node_app -->|"detects alerts"| node_alert_engine
node_app -->|"reads alerts"| node_alert_store
node_app -->|"renders"| node_scene
node_app -->|"renders"| node_control_panel
node_app -->|"renders"| node_scheduler_panel
node_alert_engine -->|"raises alerts"| node_alert_store
node_scene -->|"renders"| node_dish_mesh
node_login -->|"authenticates"| node_auth_store
node_scheduler_panel -->|"reads state"| node_telemetry_store
node_scheduler_panel -->|"checks role"| node_auth_store
node_science_views -->|"reads state"| node_telemetry_store
node_correlator -.->|"reads state"| node_telemetry_store
node_api -->|"routes WebSocket"| node_telemetry_endpoint
node_api -->|"registers routes"| node_control_api
node_api -->|"registers routes"| node_scheduler_api
node_api -->|"registers routes"| node_atmosphere_api
node_telemetry_endpoint -->|"gets snapshots"| node_alma_sim
node_telemetry_endpoint -->|"advances queue"| node_scheduler
node_telemetry_endpoint -->|"writes frames"| node_influx_writer
node_control_api -->|"commands array"| node_alma_sim
node_control_api -->|"commands pointing"| node_pointing
node_scheduler_api -->|"manages jobs"| node_scheduler
node_atmosphere_api -->|"gets weather"| node_weather
node_atmosphere_api -.->|"gets simulation data"| node_alma_sim
node_alma_sim -->|"builds array"| node_positions
node_alma_sim -->|"fetches conditions"| node_weather
node_alma_sim -->|"computes Tsys"| node_physics
node_alma_sim -->|"updates pointing"| node_pointing
node_weather -->|"fetches weather"| node_open_meteo
node_influx_writer -->|"writes points"| node_influxdb
node_api -.->|"uses role checks"| node_auth_api
node_auth_store -->|"requests JWT"| node_auth_api

click node_app "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/App.jsx"
click node_websocket_hook "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/hooks/useWebSocket.js"
click node_telemetry_store "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/store/telemetryStore.js"
click node_alert_engine "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/store/alertEngine.js"
click node_alert_store "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/store/alertStore.js"
click node_scene "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/three/Scene.jsx"
click node_dish_mesh "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/three/DishMesh.jsx"
click node_control_panel "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/components/ControlPanel.jsx"
click node_scheduler_panel "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/components/SchedulerPanel.jsx"
click node_science_views "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/components/UVCoveragePlot.jsx"
click node_correlator "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/components/BaselineCorrelator.jsx"
click node_auth_store "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/store/auth.js"
click node_login "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/pages/LoginPage.jsx"
click node_api "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/main.py"
click node_telemetry_endpoint "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/ws/telemetry.py"
click node_control_api "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/api/control.py"
click node_scheduler_api "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/api/scheduler.py"
click node_scheduler "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/obs_queue.py"
click node_alma_sim "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/simulation/alma_sim.py"
click node_positions "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/simulation/alma_positions.py"
click node_pointing "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/simulation/pointing_sim.py"
click node_physics "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/simulation/physics_models.py"
click node_weather "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/simulation/weather_fetcher.py"
click node_atmosphere_api "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/api/atmosphere.py"
click node_auth_api "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/auth.py"
click node_influx_writer "https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/influx_writer.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_websocket_hook,node_telemetry_store,node_alert_engine,node_alert_store,node_scene,node_dish_mesh,node_control_panel,node_scheduler_panel,node_science_views,node_correlator toneBlue
class node_api,node_telemetry_endpoint,node_control_api,node_scheduler_api,node_scheduler,node_atmosphere_api toneAmber
class node_alma_sim,node_positions,node_pointing,node_physics,node_weather toneMint
class node_auth_store,node_login,node_auth_api toneRose
class node_influx_writer,node_influxdb,node_open_meteo,node_operator toneIndigo
```

## Components

### Operator interface

- [Dashboard shell](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Telemetry connection](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/hooks/useWebSocket.js): `client/src/hooks/useWebSocket.js`
- [Telemetry state](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/store/telemetryStore.js): `client/src/store/telemetryStore.js`
- [Alert detection](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/store/alertEngine.js): `client/src/store/alertEngine.js`
- [Alert state and feed](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/store/alertStore.js): `client/src/store/alertStore.js`
- [3D array scene](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/three/Scene.jsx): `client/src/three/Scene.jsx`
- [Antenna models](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/three/DishMesh.jsx): `client/src/three/DishMesh.jsx`
- [Control panel](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/components/ControlPanel.jsx): `client/src/components/ControlPanel.jsx`
- [Scheduler panel](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/components/SchedulerPanel.jsx): `client/src/components/SchedulerPanel.jsx`
- [Interferometry displays](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/components/UVCoveragePlot.jsx): `client/src/components/UVCoveragePlot.jsx`
- [Baseline correlator](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/components/BaselineCorrelator.jsx): `client/src/components/BaselineCorrelator.jsx`

### API and telemetry

- [FastAPI application](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/main.py): `server/main.py`
- [Telemetry broadcaster](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/ws/telemetry.py): `server/app/ws/telemetry.py`
- [Telescope control API](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/api/control.py): `server/app/api/control.py`
- [Scheduler API](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/api/scheduler.py): `server/app/api/scheduler.py`
- [Observation queue](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/obs_queue.py): `server/app/obs_queue.py`
- [Atmosphere API](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/api/atmosphere.py): `server/app/api/atmosphere.py`

### Observatory simulation

- [Array simulation](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/simulation/alma_sim.py): `server/app/simulation/alma_sim.py`
- [Array positions](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/simulation/alma_positions.py): `server/app/simulation/alma_positions.py`
- [Pointing dynamics](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/simulation/pointing_sim.py): `server/app/simulation/pointing_sim.py`
- [Tsys models](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/simulation/physics_models.py): `server/app/simulation/physics_models.py`
- [Atmosphere acquisition](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/app/simulation/weather_fetcher.py): `server/app/simulation/weather_fetcher.py`

### Access control

- [Session state](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/store/auth.js): `client/src/store/auth.js`
- [Login page](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/client/src/pages/LoginPage.jsx): `client/src/pages/LoginPage.jsx`
- [JWT and role checks](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/auth.py): `server/auth.py`

### External integrations

- [Time-series writer](https://github.com/majimety/atmos-atacama-telescope-monitoring-and-operations-system/blob/main/server/influx_writer.py): `server/influx_writer.py`
- **InfluxDB**
- **Open-Meteo**

### Other components

- **Operator**

## Connections

- Operator → Dashboard shell: uses
- Dashboard shell → Telemetry connection: opens connection (evidence: `client/src/App.jsx`)
- Dashboard shell → Telemetry state: reads state (evidence: `client/src/App.jsx`)
- Dashboard shell → Alert detection: detects alerts (evidence: `client/src/App.jsx`)
- Dashboard shell → Alert state and feed: reads alerts (evidence: `client/src/App.jsx`)
- Dashboard shell → 3D array scene: renders (evidence: `client/src/App.jsx`)
- Dashboard shell → Control panel: renders (evidence: `client/src/App.jsx`)
- Dashboard shell → Scheduler panel: renders (evidence: `client/src/App.jsx`)
- Alert detection → Alert state and feed: raises alerts (evidence: `client/src/hooks/useTelemetry.js`)
- 3D array scene → Antenna models: renders (evidence: `client/src/three/Scene.jsx`)
- Login page → Session state: authenticates (evidence: `client/src/pages/LoginPage.jsx`)
- Scheduler panel → Telemetry state: reads state (evidence: `client/src/components/SchedulerPanel.jsx`)
- Scheduler panel → Session state: checks role (evidence: `client/src/components/SchedulerPanel.jsx`)
- Interferometry displays → Telemetry state: reads state (evidence: `client/src/components/UVCoveragePlot.jsx`)
- Baseline correlator → Telemetry state: reads state
- FastAPI application → Telemetry broadcaster: routes WebSocket (evidence: `server/main.py`)
- FastAPI application → Telescope control API: registers routes (evidence: `server/main.py`)
- FastAPI application → Scheduler API: registers routes (evidence: `server/main.py`)
- FastAPI application → Atmosphere API: registers routes (evidence: `server/main.py`)
- Telemetry broadcaster → Array simulation: gets snapshots (evidence: `server/app/ws/telemetry.py`)
- Telemetry broadcaster → Observation queue: advances queue (evidence: `server/app/ws/telemetry.py`)
- Telemetry broadcaster → Time-series writer: writes frames (evidence: `server/app/ws/telemetry.py`)
- Telescope control API → Array simulation: commands array (evidence: `server/app/api/control.py`)
- Telescope control API → Pointing dynamics: commands pointing (evidence: `server/app/api/control.py`)
- Scheduler API → Observation queue: manages jobs (evidence: `server/app/api/scheduler.py`)
- Atmosphere API → Atmosphere acquisition: gets weather (evidence: `server/app/api/atmosphere.py`)
- Atmosphere API → Array simulation: gets simulation data
- Array simulation → Array positions: builds array (evidence: `server/app/simulation/alma_sim.py`)
- Array simulation → Atmosphere acquisition: fetches conditions (evidence: `server/app/simulation/alma_sim.py`)
- Array simulation → Tsys models: computes Tsys (evidence: `server/app/simulation/alma_sim.py`)
- Array simulation → Pointing dynamics: updates pointing (evidence: `server/app/simulation/alma_sim.py`)
- Atmosphere acquisition → Open-Meteo: fetches weather (evidence: `server/app/simulation/weather_fetcher.py`)
- Time-series writer → InfluxDB: writes points (evidence: `server/influx_writer.py`)
- FastAPI application → JWT and role checks: uses role checks (evidence: `server/main.py`)
- Session state → JWT and role checks: requests JWT (evidence: `client/src/store/auth.js`)
