# abhaytc/satellite architecture

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

## Overview

This is a satellite conjunction-risk and mission-control platform. Operators replay ESA CDM data through ingestion, tracking, ML risk assessment, and maneuver recommendation, then inspect live events through REST/WebSocket feeds and a React dashboard. The README documents the agent stages and product capabilities; sampled source confirms replay orchestration, event storage, API endpoints, and selected UI/API calls. Several agent implementations and dashboard views were not sampled, so their documented relationships are shown from the README rather than inferred from module names.

Main entry points: [`satellite_ml_package/backend/agents/orchestrator.py`](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/agents/orchestrator.py) (Replay orchestrator), [`satellite_ml_package/src/api.ts`](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/src/api.ts) (HTTP and WebSocket client), [`satellite_ml_package/backend/main.py`](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/main.py) (FastAPI application), [`satellite_ml_package/backend/agents/ingestion.py`](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/agents/ingestion.py) (CDM ingestion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_replay["Replay agents"]
  node_ingestion["CDM ingestion<br/>[ingestion.py]"]
  node_tracking["Event tracking<br/>[tracking.py]"]
  node_risk_agent["Streaming risk agent<br/>[risk.py]"]
  node_maneuver["Maneuver decisions<br/>[maneuver.py]"]
end

subgraph group_backend["Backend services"]
  node_orchestrator["Replay orchestrator<br/>[orchestrator.py]"]
  node_event_store[("Event store<br/>[orchestrator.py]")]
  node_api_server["FastAPI application<br/>[main.py]"]
end

subgraph group_models["Risk and learning"]
  node_calculator_api["Risk calculator API<br/>[calculator.py]"]
  node_learning_api["Learning and simulation API<br/>[learning.py]"]
  node_risk_model["Risk model<br/>[risk_model.py]"]
  node_risk_lite["Lightweight risk inference<br/>[risk_lite.py]"]
  node_metrics["Model benchmarks"]
end

subgraph group_frontend["Mission dashboard"]
  node_learning_view["Policy explorer and simulation<br/>[LearningAgent.tsx]"]
  node_dashboard["Mission control shell<br/>[App.tsx]"]
  node_api_client["HTTP and WebSocket client<br/>[api.ts]"]
  node_constellation["3D constellation radar"]
  node_event_table["Conjunction event table"]
  node_event_detail["Event detail view<br/>[EventDetail.tsx]"]
  node_risk_calculator["Interactive risk calculator<br/>[RiskCalculator.tsx]"]
end

subgraph group_shared["Shared contracts"]
  node_contracts["Stream and CDM models<br/>[models.py]"]
  node_config["Backend configuration<br/>[config.py]"]
end

node_operator(("Satellite operator"))
node_cdm["ESA CDM replay data"]

node_operator -->|"uses"| node_dashboard
node_cdm -->|"loads replay"| node_ingestion
node_ingestion -->|"queues CDMs"| node_tracking
node_tracking -->|"passes trends"| node_risk_agent
node_risk_agent -->|"passes risk"| node_maneuver
node_orchestrator -->|"starts agent"| node_ingestion
node_orchestrator -->|"starts agent"| node_tracking
node_orchestrator -->|"starts agent"| node_risk_agent
node_orchestrator -->|"starts agent"| node_maneuver
node_orchestrator -->|"updates events"| node_event_store
node_api_server -->|"controls replay"| node_orchestrator
node_api_server -->|"reads history"| node_event_store
node_api_server -->|"mounts routes"| node_calculator_api
node_api_server -->|"mounts routes"| node_learning_api
node_calculator_api -->|"runs inference"| node_risk_lite
node_dashboard -->|"starts replay"| node_api_client
node_constellation -.->|"reads live data"| node_api_client
node_event_table -->|"fetches and subscribes"| node_api_client
node_event_detail -.->|"reads event history"| node_api_client
node_risk_calculator -->|"requests prediction"| node_api_client
node_api_client -->|"calls REST and stream"| node_api_server
node_risk_calculator -->|"submits CDMs"| node_calculator_api
node_learning_view -.->|"loads policy and frames"| node_learning_api
node_metrics -.->|"loads metrics"| node_api_client
node_ingestion -->|"validates rows"| node_contracts
node_orchestrator -->|"stores messages"| node_contracts
node_ingestion -->|"loads replay settings"| node_config
node_api_server -->|"loads settings"| node_config

click node_ingestion "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/agents/ingestion.py"
click node_tracking "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/agents/tracking.py"
click node_risk_agent "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/agents/risk.py"
click node_maneuver "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/agents/maneuver.py"
click node_orchestrator "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/agents/orchestrator.py"
click node_event_store "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/agents/orchestrator.py"
click node_api_server "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/main.py"
click node_calculator_api "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/api/calculator.py"
click node_learning_api "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/api/learning.py"
click node_risk_model "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/risk_model.py"
click node_risk_lite "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/risk_lite.py"
click node_metrics "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/src/components/ModelPerformance.tsx"
click node_learning_view "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/src/components/LearningAgent.tsx"
click node_dashboard "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/src/App.tsx"
click node_api_client "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/src/api.ts"
click node_constellation "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/src/components/ConstellationView.tsx"
click node_event_table "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/src/components/ConjunctionTable.tsx"
click node_event_detail "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/src/components/EventDetail.tsx"
click node_risk_calculator "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/src/components/RiskCalculator.tsx"
click node_contracts "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/core/models.py"
click node_config "https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/core/config.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_ingestion,node_tracking,node_risk_agent,node_maneuver toneBlue
class node_orchestrator,node_event_store,node_api_server toneAmber
class node_calculator_api,node_learning_api,node_risk_model,node_risk_lite,node_metrics toneMint
class node_learning_view,node_dashboard,node_api_client,node_constellation,node_event_table,node_event_detail,node_risk_calculator toneRose
class node_contracts,node_config,node_operator,node_cdm toneIndigo
```

## Components

### Replay agents

- [CDM ingestion](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/agents/ingestion.py): `satellite_ml_package/backend/agents/ingestion.py`
- [Event tracking](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/agents/tracking.py): `satellite_ml_package/backend/agents/tracking.py`
- [Streaming risk agent](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/agents/risk.py): `satellite_ml_package/backend/agents/risk.py`
- [Maneuver decisions](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/agents/maneuver.py): `satellite_ml_package/backend/agents/maneuver.py`

### Backend services

- [Replay orchestrator](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/agents/orchestrator.py): `satellite_ml_package/backend/agents/orchestrator.py`
- [Event store](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/agents/orchestrator.py): `satellite_ml_package/backend/agents/orchestrator.py`
- [FastAPI application](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/main.py): `satellite_ml_package/backend/main.py`

### Risk and learning

- [Risk calculator API](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/api/calculator.py): `satellite_ml_package/backend/api/calculator.py`
- [Learning and simulation API](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/api/learning.py): `satellite_ml_package/backend/api/learning.py`
- [Risk model](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/risk_model.py): `satellite_ml_package/risk_model.py`
- [Lightweight risk inference](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/risk_lite.py): `satellite_ml_package/risk_lite.py`
- [Model benchmarks](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/src/components/ModelPerformance.tsx): `satellite_ml_package/src/components/ModelPerformance.tsx`

### Mission dashboard

- [Policy explorer and simulation](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/src/components/LearningAgent.tsx): `satellite_ml_package/src/components/LearningAgent.tsx`
- [Mission control shell](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/src/App.tsx): `satellite_ml_package/src/App.tsx`
- [HTTP and WebSocket client](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/src/api.ts): `satellite_ml_package/src/api.ts`
- [3D constellation radar](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/src/components/ConstellationView.tsx): `satellite_ml_package/src/components/ConstellationView.tsx`
- [Conjunction event table](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/src/components/ConjunctionTable.tsx): `satellite_ml_package/src/components/ConjunctionTable.tsx`
- [Event detail view](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/src/components/EventDetail.tsx): `satellite_ml_package/src/components/EventDetail.tsx`
- [Interactive risk calculator](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/src/components/RiskCalculator.tsx): `satellite_ml_package/src/components/RiskCalculator.tsx`

### Shared contracts

- [Stream and CDM models](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/core/models.py): `satellite_ml_package/backend/core/models.py`
- [Backend configuration](https://github.com/abhaytc/satellite/blob/main/satellite_ml_package/backend/core/config.py): `satellite_ml_package/backend/core/config.py`

### Other components

- **Satellite operator**
- **ESA CDM replay data**

## Connections

- Satellite operator → Mission control shell: uses (evidence: `README.md`)
- ESA CDM replay data → CDM ingestion: loads replay (evidence: `satellite_ml_package/backend/agents/ingestion.py`)
- CDM ingestion → Event tracking: queues CDMs (evidence: `README.md`)
- Event tracking → Streaming risk agent: passes trends (evidence: `README.md`)
- Streaming risk agent → Maneuver decisions: passes risk (evidence: `README.md`)
- Replay orchestrator → CDM ingestion: starts agent (evidence: `satellite_ml_package/backend/agents/orchestrator.py`)
- Replay orchestrator → Event tracking: starts agent (evidence: `satellite_ml_package/backend/agents/orchestrator.py`)
- Replay orchestrator → Streaming risk agent: starts agent (evidence: `satellite_ml_package/backend/agents/orchestrator.py`)
- Replay orchestrator → Maneuver decisions: starts agent (evidence: `satellite_ml_package/backend/agents/orchestrator.py`)
- Replay orchestrator → Event store: updates events (evidence: `satellite_ml_package/backend/agents/orchestrator.py`)
- FastAPI application → Replay orchestrator: controls replay (evidence: `satellite_ml_package/backend/main.py`)
- FastAPI application → Event store: reads history (evidence: `satellite_ml_package/backend/main.py`)
- FastAPI application → Risk calculator API: mounts routes (evidence: `satellite_ml_package/backend/main.py`)
- FastAPI application → Learning and simulation API: mounts routes (evidence: `satellite_ml_package/backend/main.py`)
- Risk calculator API → Lightweight risk inference: runs inference
- Mission control shell → HTTP and WebSocket client: starts replay (evidence: `satellite_ml_package/src/App.tsx`)
- 3D constellation radar → HTTP and WebSocket client: reads live data
- Conjunction event table → HTTP and WebSocket client: fetches and subscribes (evidence: `satellite_ml_package/src/components/ConjunctionTable.tsx`)
- Event detail view → HTTP and WebSocket client: reads event history
- Interactive risk calculator → HTTP and WebSocket client: requests prediction (evidence: `satellite_ml_package/src/components/RiskCalculator.tsx`)
- HTTP and WebSocket client → FastAPI application: calls REST and stream (evidence: `README.md`)
- Interactive risk calculator → Risk calculator API: submits CDMs (evidence: `README.md`)
- Policy explorer and simulation → Learning and simulation API: loads policy and frames
- Model benchmarks → HTTP and WebSocket client: loads metrics
- CDM ingestion → Stream and CDM models: validates rows (evidence: `satellite_ml_package/backend/agents/ingestion.py`)
- Replay orchestrator → Stream and CDM models: stores messages (evidence: `satellite_ml_package/backend/agents/orchestrator.py`)
- CDM ingestion → Backend configuration: loads replay settings (evidence: `satellite_ml_package/backend/agents/ingestion.py`)
- FastAPI application → Backend configuration: loads settings (evidence: `satellite_ml_package/backend/main.py`)
