# abhishek-deshmukh9/cosmosdb architecture

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

- Interactive diagram: https://gitdiagram.com/abhishek-deshmukh9/cosmosdb
- Repository: https://github.com/abhishek-deshmukh9/cosmosdb

## Overview

Orbit Visualizer is a prototype exoplanet catalog and exploration interface. Users browse and search star systems, inspect planet details and habitability indicators, explore visualizations and analytics, and can submit or edit catalog entries. The React router dispatches to feature pages; those pages call a FastAPI backend, which serves catalog, analytics, and CRUD operations backed by MySQL. Separate Python ingestion scripts load constellation and planet-system data. The README confirms the MySQL-backed prototype, but unsampled page and router implementations limit certainty about some feature wiring.

Main entry points: [`src/main.tsx`](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/main.tsx) (Page router), [`backend/main.py`](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/backend/main.py) (API application), [`src/app/pages/PlanetDetail.tsx`](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/pages/PlanetDetail.tsx) (Planet detail), [`src/app/pages/AddPlanet.tsx`](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/pages/AddPlanet.tsx) (Add planet)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web Interface"]
  node_router["Page router<br/>[main.tsx]"]
  node_home["Home<br/>[Home.tsx]"]
  node_observatory["Observatory<br/>[Observatory.tsx]"]
  node_add["Add planet<br/>[AddPlanet.tsx]"]
  node_detail["Planet detail<br/>[PlanetDetail.tsx]"]
  node_analyticsview["Analytics view<br/>[Analytics.tsx]"]
  node_gallery["Gallery<br/>[Gallery.tsx]"]
  node_systemview["System view<br/>[SystemView.tsx]"]
end

subgraph group_api["Backend API"]
  node_backend["API application<br/>[main.py]"]
  node_crud["Catalog CRUD<br/>[crud.py]"]
  node_analytics["Analytics API<br/>[analytics.py]"]
  node_esi_calc["ESI calculation<br/>[utils.py]"]
end

subgraph group_data["Catalog Data"]
  node_ingestplanets["Planet ingestion<br/>[ingest_planets.py]"]
  node_ingestconst["Constellation ingestion"]
  node_mysql[("MySQL catalog")]
end

subgraph group_visual["Exploration Views"]
  node_orbit["Orbit renderer"]
  node_planetinfo["Planet information<br/>[PlanetInfo.tsx]"]
  node_esi["ESI gauge<br/>[ESIGauge.tsx]"]
  node_zones["Habitable zones<br/>[ZoneTracker.tsx]"]
end

node_visitor(("Catalog user"))

node_visitor -->|"navigates"| node_router
node_router -->|"routes"| node_home
node_router -->|"routes"| node_observatory
node_router -->|"routes"| node_add
node_router -->|"routes"| node_detail
node_router -->|"routes"| node_analyticsview
node_router -->|"routes"| node_gallery
node_router -->|"routes"| node_systemview
node_home -->|"renders"| node_orbit
node_home -->|"renders"| node_planetinfo
node_detail -->|"fetches details"| node_backend
node_detail -->|"updates records"| node_crud
node_detail -->|"renders score"| node_esi
node_detail -->|"renders zones"| node_zones
node_add -->|"loads constellations"| node_backend
node_add -->|"searches systems"| node_backend
node_add -->|"creates planet"| node_crud
node_backend -->|"registers routes"| node_analytics
node_backend -->|"registers routes"| node_crud
node_backend -->|"queries catalog"| node_mysql
node_backend -->|"calculates ESI"| node_esi_calc
node_crud -->|"reads and writes"| node_mysql
node_analytics -->|"queries analytics"| node_mysql
node_ingestplanets -->|"loads planet data"| node_mysql
node_ingestconst -->|"loads constellations"| node_mysql

click node_router "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/main.tsx"
click node_home "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/pages/Home.tsx"
click node_observatory "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/pages/Observatory.tsx"
click node_add "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/pages/AddPlanet.tsx"
click node_detail "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/pages/PlanetDetail.tsx"
click node_analyticsview "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/pages/Analytics.tsx"
click node_gallery "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/pages/Gallery.tsx"
click node_systemview "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/pages/SystemView.tsx"
click node_orbit "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/components/OrbitVisualizer.tsx"
click node_planetinfo "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/components/PlanetInfo.tsx"
click node_esi "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/components/ESIGauge.tsx"
click node_zones "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/components/ZoneTracker.tsx"
click node_backend "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/backend/main.py"
click node_crud "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/backend/crud.py"
click node_analytics "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/backend/analytics.py"
click node_esi_calc "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/backend/utils.py"
click node_ingestplanets "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/backend/ingest_planets.py"
click node_ingestconst "https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/backend/ingestConstellation.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_router,node_home,node_observatory,node_add,node_detail,node_analyticsview,node_gallery,node_systemview,node_visitor toneBlue
class node_backend,node_crud,node_analytics,node_esi_calc toneAmber
class node_ingestplanets,node_ingestconst,node_mysql toneMint
class node_orbit,node_planetinfo,node_esi,node_zones toneRose
```

## Components

### Web Interface

- [Page router](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/main.tsx): `src/main.tsx`
- [Home](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/pages/Home.tsx): `src/app/pages/Home.tsx`
- [Observatory](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/pages/Observatory.tsx): `src/app/pages/Observatory.tsx`
- [Add planet](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/pages/AddPlanet.tsx): `src/app/pages/AddPlanet.tsx`
- [Planet detail](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/pages/PlanetDetail.tsx): `src/app/pages/PlanetDetail.tsx`
- [Analytics view](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/pages/Analytics.tsx): `src/app/pages/Analytics.tsx`
- [Gallery](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/pages/Gallery.tsx): `src/app/pages/Gallery.tsx`
- [System view](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/pages/SystemView.tsx): `src/app/pages/SystemView.tsx`

### Backend API

- [API application](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/backend/main.py): `backend/main.py`
- [Catalog CRUD](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/backend/crud.py): `backend/crud.py`
- [Analytics API](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/backend/analytics.py): `backend/analytics.py`
- [ESI calculation](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/backend/utils.py): `backend/utils.py`

### Catalog Data

- [Planet ingestion](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/backend/ingest_planets.py): `backend/ingest_planets.py`
- [Constellation ingestion](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/backend/ingestConstellation.py): `backend/ingestConstellation.py`
- **MySQL catalog**

### Exploration Views

- [Orbit renderer](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/components/OrbitVisualizer.tsx): `src/app/components/OrbitVisualizer.tsx`
- [Planet information](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/components/PlanetInfo.tsx): `src/app/components/PlanetInfo.tsx`
- [ESI gauge](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/components/ESIGauge.tsx): `src/app/components/ESIGauge.tsx`
- [Habitable zones](https://github.com/abhishek-deshmukh9/cosmosdb/blob/main/src/app/components/ZoneTracker.tsx): `src/app/components/ZoneTracker.tsx`

### Other components

- **Catalog user**

## Connections

- Catalog user → Page router: navigates
- Page router → Home: routes
- Page router → Observatory: routes
- Page router → Add planet: routes
- Page router → Planet detail: routes
- Page router → Analytics view: routes
- Page router → Gallery: routes
- Page router → System view: routes
- Home → Orbit renderer: renders
- Home → Planet information: renders
- Planet detail → API application: fetches details
- Planet detail → Catalog CRUD: updates records
- Planet detail → ESI gauge: renders score
- Planet detail → Habitable zones: renders zones
- Add planet → API application: loads constellations
- Add planet → API application: searches systems
- Add planet → Catalog CRUD: creates planet
- API application → Analytics API: registers routes
- API application → Catalog CRUD: registers routes
- API application → MySQL catalog: queries catalog
- API application → ESI calculation: calculates ESI
- Catalog CRUD → MySQL catalog: reads and writes
- Analytics API → MySQL catalog: queries analytics
- Planet ingestion → MySQL catalog: loads planet data
- Constellation ingestion → MySQL catalog: loads constellations
