# angelavarghese/celesto architecture

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

- Interactive diagram: https://gitdiagram.com/angelavarghese/celesto
- Repository: https://github.com/angelavarghese/celesto

## Overview

Celesto is an exoplanet habitability analysis application with a Streamlit dashboard and console batch modes. Users search NASA archive planets or define synthetic planets; the application computes physics features, obtains scores from three specialist models and a synthesis model, then presents metrics and a narrative. Data acquisition, feature preparation, and model training are shared foundations. The README documents the dashboard; sampled source also shows online and offline console reporting. Optional Gemini narration is separate. Relationships reflect shown calls; unsampled details are omitted.

Main entry points: [`app.py`](https://github.com/angelavarghese/celesto/blob/main/app.py) (Streamlit Dashboard), [`agent_trainer.py`](https://github.com/angelavarghese/celesto/blob/main/agent_trainer.py) (Agent Trainer), [`celesto_main.py`](https://github.com/angelavarghese/celesto/blob/main/celesto_main.py) (Online Batch Runner), [`celesto_main_offline.py`](https://github.com/angelavarghese/celesto/blob/main/celesto_main_offline.py) (Offline Batch Runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User Experiences"]
  node_dashboard["Streamlit Dashboard<br/>[app.py]"]
  node_batch_online["Online Batch Runner<br/>[celesto_main.py]"]
  node_batch_offline["Offline Batch Runner"]
end

subgraph group_data["Planet Data"]
  node_data_loader["Archive Loader<br/>[data_processor.py]"]
  node_physics["Physics Engine<br/>[data_processor.py]"]
  node_dataset["Training Preparation<br/>[data_processor.py]"]
end

subgraph group_models["Habitability Models"]
  node_trainer["Agent Trainer<br/>[agent_trainer.py]"]
  node_specialists["Specialist Agents<br/>[agent_trainer.py]"]
  node_director["Synthesis Agent<br/>[agent_trainer.py]"]
  node_analysis["Planet Scoring<br/>[app.py]"]
end

subgraph group_reporting["Reports &amp; Integrations"]
  node_dashboard_report["Dashboard Report<br/>[app.py]"]
  node_console_report["Console Reports &amp; Plot"]
  node_gemini_report["Gemini Narration<br/>[app.py]"]
  node_batch_narrative["Batch Narration<br/>[celesto_main.py]"]
end

node_user(("Planet Analyst"))
node_nasa[("NASA Archive")]
node_gemini["Gemini API"]

node_user -->|"searches or designs"| node_dashboard
node_dashboard -->|"loads archive"| node_data_loader
node_data_loader -->|"queries archive"| node_nasa
node_data_loader -->|"cleans data"| node_physics
node_dashboard -->|"prepares training"| node_dataset
node_dashboard -->|"trains agents"| node_trainer
node_dataset -->|"supplies bundle"| node_trainer
node_trainer -->|"trains agents"| node_specialists
node_trainer -->|"trains synthesis"| node_director
node_dashboard -->|"scores planet"| node_analysis
node_analysis -->|"computes features"| node_physics
node_analysis -->|"predicts scores"| node_specialists
node_analysis -->|"synthesizes scores"| node_director
node_dashboard -->|"displays results"| node_dashboard_report
node_dashboard -->|"requests narrative"| node_gemini_report
node_gemini_report -.->|"generates text"| node_gemini
node_batch_online -->|"loads archive"| node_data_loader
node_batch_online -->|"prepares training"| node_dataset
node_batch_online -->|"trains agents"| node_trainer
node_batch_online -->|"scores planets"| node_analysis
node_batch_online -->|"generates reports"| node_batch_narrative
node_batch_narrative -.->|"requests text"| node_gemini
node_batch_offline -->|"loads archive"| node_data_loader
node_batch_offline -->|"prepares training"| node_dataset
node_batch_offline -->|"trains agents"| node_trainer
node_batch_offline -->|"scores planets"| node_analysis
node_batch_offline -->|"prints and plots"| node_console_report

click node_dashboard "https://github.com/angelavarghese/celesto/blob/main/app.py"
click node_batch_online "https://github.com/angelavarghese/celesto/blob/main/celesto_main.py"
click node_batch_offline "https://github.com/angelavarghese/celesto/blob/main/celesto_main_offline.py"
click node_data_loader "https://github.com/angelavarghese/celesto/blob/main/data_processor.py"
click node_physics "https://github.com/angelavarghese/celesto/blob/main/data_processor.py"
click node_dataset "https://github.com/angelavarghese/celesto/blob/main/data_processor.py"
click node_trainer "https://github.com/angelavarghese/celesto/blob/main/agent_trainer.py"
click node_specialists "https://github.com/angelavarghese/celesto/blob/main/agent_trainer.py"
click node_director "https://github.com/angelavarghese/celesto/blob/main/agent_trainer.py"
click node_analysis "https://github.com/angelavarghese/celesto/blob/main/app.py"
click node_dashboard_report "https://github.com/angelavarghese/celesto/blob/main/app.py"
click node_console_report "https://github.com/angelavarghese/celesto/blob/main/celesto_main_offline.py"
click node_gemini_report "https://github.com/angelavarghese/celesto/blob/main/app.py"
click node_batch_narrative "https://github.com/angelavarghese/celesto/blob/main/celesto_main.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_dashboard,node_batch_online,node_batch_offline toneBlue
class node_data_loader,node_physics,node_dataset,node_nasa toneAmber
class node_trainer,node_specialists,node_director,node_analysis,node_gemini toneMint
class node_dashboard_report,node_console_report,node_gemini_report,node_batch_narrative toneRose
class node_user toneIndigo
```

## Components

### User Experiences

- [Streamlit Dashboard](https://github.com/angelavarghese/celesto/blob/main/app.py): `app.py`
- [Online Batch Runner](https://github.com/angelavarghese/celesto/blob/main/celesto_main.py): `celesto_main.py`
- [Offline Batch Runner](https://github.com/angelavarghese/celesto/blob/main/celesto_main_offline.py): `celesto_main_offline.py`

### Planet Data

- [Archive Loader](https://github.com/angelavarghese/celesto/blob/main/data_processor.py): `data_processor.py`
- [Physics Engine](https://github.com/angelavarghese/celesto/blob/main/data_processor.py): `data_processor.py`
- [Training Preparation](https://github.com/angelavarghese/celesto/blob/main/data_processor.py): `data_processor.py`

### Habitability Models

- [Agent Trainer](https://github.com/angelavarghese/celesto/blob/main/agent_trainer.py): `agent_trainer.py`
- [Specialist Agents](https://github.com/angelavarghese/celesto/blob/main/agent_trainer.py): `agent_trainer.py`
- [Synthesis Agent](https://github.com/angelavarghese/celesto/blob/main/agent_trainer.py): `agent_trainer.py`
- [Planet Scoring](https://github.com/angelavarghese/celesto/blob/main/app.py): `app.py`

### Reports & Integrations

- [Dashboard Report](https://github.com/angelavarghese/celesto/blob/main/app.py): `app.py`
- [Console Reports & Plot](https://github.com/angelavarghese/celesto/blob/main/celesto_main_offline.py): `celesto_main_offline.py`
- [Gemini Narration](https://github.com/angelavarghese/celesto/blob/main/app.py): `app.py`
- [Batch Narration](https://github.com/angelavarghese/celesto/blob/main/celesto_main.py): `celesto_main.py`

### Other components

- **Planet Analyst**
- **NASA Archive**
- **Gemini API**

## Connections

- Planet Analyst → Streamlit Dashboard: searches or designs (evidence: `README.md`)
- Streamlit Dashboard → Archive Loader: loads archive (evidence: `app.py`)
- Archive Loader → NASA Archive: queries archive (evidence: `data_processor.py`)
- Archive Loader → Physics Engine: cleans data (evidence: `data_processor.py`)
- Streamlit Dashboard → Training Preparation: prepares training (evidence: `app.py`)
- Streamlit Dashboard → Agent Trainer: trains agents (evidence: `app.py`)
- Training Preparation → Agent Trainer: supplies bundle (evidence: `data_processor.py`)
- Agent Trainer → Specialist Agents: trains agents (evidence: `agent_trainer.py`)
- Agent Trainer → Synthesis Agent: trains synthesis (evidence: `agent_trainer.py`)
- Streamlit Dashboard → Planet Scoring: scores planet (evidence: `app.py`)
- Planet Scoring → Physics Engine: computes features (evidence: `app.py`)
- Planet Scoring → Specialist Agents: predicts scores (evidence: `app.py`)
- Planet Scoring → Synthesis Agent: synthesizes scores (evidence: `app.py`)
- Streamlit Dashboard → Dashboard Report: displays results (evidence: `app.py`)
- Streamlit Dashboard → Gemini Narration: requests narrative (evidence: `app.py`)
- Gemini Narration → Gemini API: generates text (evidence: `app.py`)
- Online Batch Runner → Archive Loader: loads archive (evidence: `celesto_main.py`)
- Online Batch Runner → Training Preparation: prepares training (evidence: `celesto_main.py`)
- Online Batch Runner → Agent Trainer: trains agents (evidence: `celesto_main.py`)
- Online Batch Runner → Planet Scoring: scores planets (evidence: `celesto_main.py`)
- Online Batch Runner → Batch Narration: generates reports (evidence: `celesto_main.py`)
- Batch Narration → Gemini API: requests text (evidence: `celesto_main.py`)
- Offline Batch Runner → Archive Loader: loads archive (evidence: `celesto_main_offline.py`)
- Offline Batch Runner → Training Preparation: prepares training (evidence: `celesto_main_offline.py`)
- Offline Batch Runner → Agent Trainer: trains agents (evidence: `celesto_main_offline.py`)
- Offline Batch Runner → Planet Scoring: scores planets (evidence: `celesto_main_offline.py`)
- Offline Batch Runner → Console Reports & Plot: prints and plots (evidence: `celesto_main_offline.py`)
