# mythri005/orbitscope architecture

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

## Overview

OrbitScope is a web dashboard for exploring satellite positions and planning observations. Users sign in, choose satellites and observer locations, then view live tracking, predicted passes, calendars, and planning or analytics results; favorites, alerts, and history support ongoing use. The graph captures the React-to-FastAPI request path and the documented feature branches. Sampled source confirms selected route-to-service calls; unsampled feature implementations are represented by their exact tree paths, without assuming their internal wiring.

Main entry points: [`backend/app.py`](https://github.com/mythri005/orbitscope/blob/master/backend/app.py) (FastAPI app), [`frontend/src/App.tsx`](https://github.com/mythri005/orbitscope/blob/master/frontend/src/App.tsx) (React routes), [`frontend/src/services/satelliteService.ts`](https://github.com/mythri005/orbitscope/blob/master/frontend/src/services/satelliteService.ts) (Feature API clients), [`backend/routes/satellite_routes.py`](https://github.com/mythri005/orbitscope/blob/master/backend/routes/satellite_routes.py) (Satellite routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["React routes<br/>[App.tsx]"]
  node_authctx["Auth context<br/>[AuthContext.tsx]"]
  node_pages["Observation pages<br/>[Tracking.tsx]"]
  node_planningpages["Planning pages<br/>[NightPlanner.tsx]"]
  node_analyticpages["Analysis pages"]
  node_clientservices["Feature API clients"]
  node_http["HTTP client<br/>[api.ts]"]
end

subgraph group_api["API and domain"]
  node_server["FastAPI app<br/>[app.py]"]
  node_authroutes["Auth routes<br/>[auth_routes.py]"]
  node_satelliteroutes["Satellite routes"]
  node_locationroutes["Location routes<br/>[location_routes.py]"]
  node_alertroutes["Alert routes"]
  node_favoriteroutes["Favorite routes<br/>[favorite_routes.py]"]
end

subgraph group_astro["Satellite operations"]
  node_satservice["Satellite calculations"]
  node_history["Tracking history"]
  node_night["Night planning"]
  node_alerts["Pass alerts"]
end

subgraph group_persistence["User and state"]
  node_authservice["Authentication<br/>[auth_service.py]"]
  node_locations["Observer locations"]
  node_favorites["Favorites"]
  node_db[("Application database<br/>[database.py]")]
end

node_user(("Observer"))
node_tle["TLE data source"]

node_user -->|"uses"| node_app
node_app -->|"checks session"| node_authctx
node_app -->|"routes to"| node_pages
node_app -->|"routes to"| node_planningpages
node_app -->|"routes to"| node_analyticpages
node_pages -->|"requests tracking"| node_clientservices
node_planningpages -->|"requests planning"| node_clientservices
node_analyticpages -->|"requests analysis"| node_clientservices
node_clientservices -->|"sends requests"| node_http
node_http -->|"HTTP requests"| node_server
node_server -->|"dispatches"| node_authroutes
node_server -->|"dispatches"| node_satelliteroutes
node_server -->|"dispatches"| node_locationroutes
node_server -->|"dispatches"| node_alertroutes
node_server -->|"dispatches"| node_favoriteroutes
node_authroutes -->|"calls"| node_authservice
node_authservice -->|"reads and writes"| node_db
node_satelliteroutes -->|"calls"| node_satservice
node_satelliteroutes -->|"calls"| node_history
node_locationroutes -->|"calls"| node_locations
node_locationroutes -->|"calls"| node_night
node_alertroutes -->|"calls"| node_alerts
node_favoriteroutes -->|"calls"| node_favorites
node_satservice -.->|"refreshes data"| node_tle

click node_app "https://github.com/mythri005/orbitscope/blob/master/frontend/src/App.tsx"
click node_authctx "https://github.com/mythri005/orbitscope/blob/master/frontend/src/context/AuthContext.tsx"
click node_pages "https://github.com/mythri005/orbitscope/blob/master/frontend/src/pages/Tracking.tsx"
click node_planningpages "https://github.com/mythri005/orbitscope/blob/master/frontend/src/pages/NightPlanner.tsx"
click node_analyticpages "https://github.com/mythri005/orbitscope/blob/master/frontend/src/pages/SatelliteComparison.tsx"
click node_clientservices "https://github.com/mythri005/orbitscope/blob/master/frontend/src/services/satelliteService.ts"
click node_http "https://github.com/mythri005/orbitscope/blob/master/frontend/src/services/api.ts"
click node_server "https://github.com/mythri005/orbitscope/blob/master/backend/app.py"
click node_authroutes "https://github.com/mythri005/orbitscope/blob/master/backend/routes/auth_routes.py"
click node_satelliteroutes "https://github.com/mythri005/orbitscope/blob/master/backend/routes/satellite_routes.py"
click node_locationroutes "https://github.com/mythri005/orbitscope/blob/master/backend/routes/location_routes.py"
click node_alertroutes "https://github.com/mythri005/orbitscope/blob/master/backend/routes/pass_alert_routes.py"
click node_favoriteroutes "https://github.com/mythri005/orbitscope/blob/master/backend/routes/favorite_routes.py"
click node_authservice "https://github.com/mythri005/orbitscope/blob/master/backend/services/auth_service.py"
click node_satservice "https://github.com/mythri005/orbitscope/blob/master/backend/services/satellite_service.py"
click node_history "https://github.com/mythri005/orbitscope/blob/master/backend/services/historical_tracking_service.py"
click node_locations "https://github.com/mythri005/orbitscope/blob/master/backend/services/observer_location_service.py"
click node_night "https://github.com/mythri005/orbitscope/blob/master/backend/services/night_planner_service.py"
click node_alerts "https://github.com/mythri005/orbitscope/blob/master/backend/services/pass_alert_service.py"
click node_favorites "https://github.com/mythri005/orbitscope/blob/master/backend/services/favorite_service.py"
click node_db "https://github.com/mythri005/orbitscope/blob/master/backend/database/database.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_authctx,node_pages,node_planningpages,node_analyticpages,node_clientservices,node_http toneBlue
class node_server,node_authroutes,node_satelliteroutes,node_locationroutes,node_alertroutes,node_favoriteroutes toneAmber
class node_satservice,node_history,node_night,node_alerts,node_user toneMint
class node_authservice,node_locations,node_favorites,node_db toneRose
class node_tle toneIndigo
```

## Components

### Web client

- [React routes](https://github.com/mythri005/orbitscope/blob/master/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Auth context](https://github.com/mythri005/orbitscope/blob/master/frontend/src/context/AuthContext.tsx): `frontend/src/context/AuthContext.tsx`
- [Observation pages](https://github.com/mythri005/orbitscope/blob/master/frontend/src/pages/Tracking.tsx): `frontend/src/pages/Tracking.tsx`
- [Planning pages](https://github.com/mythri005/orbitscope/blob/master/frontend/src/pages/NightPlanner.tsx): `frontend/src/pages/NightPlanner.tsx`
- [Analysis pages](https://github.com/mythri005/orbitscope/blob/master/frontend/src/pages/SatelliteComparison.tsx): `frontend/src/pages/SatelliteComparison.tsx`
- [Feature API clients](https://github.com/mythri005/orbitscope/blob/master/frontend/src/services/satelliteService.ts): `frontend/src/services/satelliteService.ts`
- [HTTP client](https://github.com/mythri005/orbitscope/blob/master/frontend/src/services/api.ts): `frontend/src/services/api.ts`

### API and domain

- [FastAPI app](https://github.com/mythri005/orbitscope/blob/master/backend/app.py): `backend/app.py`
- [Auth routes](https://github.com/mythri005/orbitscope/blob/master/backend/routes/auth_routes.py): `backend/routes/auth_routes.py`
- [Satellite routes](https://github.com/mythri005/orbitscope/blob/master/backend/routes/satellite_routes.py): `backend/routes/satellite_routes.py`
- [Location routes](https://github.com/mythri005/orbitscope/blob/master/backend/routes/location_routes.py): `backend/routes/location_routes.py`
- [Alert routes](https://github.com/mythri005/orbitscope/blob/master/backend/routes/pass_alert_routes.py): `backend/routes/pass_alert_routes.py`
- [Favorite routes](https://github.com/mythri005/orbitscope/blob/master/backend/routes/favorite_routes.py): `backend/routes/favorite_routes.py`

### Satellite operations

- [Satellite calculations](https://github.com/mythri005/orbitscope/blob/master/backend/services/satellite_service.py): `backend/services/satellite_service.py`
- [Tracking history](https://github.com/mythri005/orbitscope/blob/master/backend/services/historical_tracking_service.py): `backend/services/historical_tracking_service.py`
- [Night planning](https://github.com/mythri005/orbitscope/blob/master/backend/services/night_planner_service.py): `backend/services/night_planner_service.py`
- [Pass alerts](https://github.com/mythri005/orbitscope/blob/master/backend/services/pass_alert_service.py): `backend/services/pass_alert_service.py`

### User and state

- [Authentication](https://github.com/mythri005/orbitscope/blob/master/backend/services/auth_service.py): `backend/services/auth_service.py`
- [Observer locations](https://github.com/mythri005/orbitscope/blob/master/backend/services/observer_location_service.py): `backend/services/observer_location_service.py`
- [Favorites](https://github.com/mythri005/orbitscope/blob/master/backend/services/favorite_service.py): `backend/services/favorite_service.py`
- [Application database](https://github.com/mythri005/orbitscope/blob/master/backend/database/database.py): `backend/database/database.py`

### Other components

- **Observer**
- **TLE data source**

## Connections

- Observer → React routes: uses
- React routes → Auth context: checks session
- React routes → Observation pages: routes to
- React routes → Planning pages: routes to
- React routes → Analysis pages: routes to
- Observation pages → Feature API clients: requests tracking
- Planning pages → Feature API clients: requests planning
- Analysis pages → Feature API clients: requests analysis
- Feature API clients → HTTP client: sends requests
- HTTP client → FastAPI app: HTTP requests
- FastAPI app → Auth routes: dispatches
- FastAPI app → Satellite routes: dispatches
- FastAPI app → Location routes: dispatches
- FastAPI app → Alert routes: dispatches
- FastAPI app → Favorite routes: dispatches
- Auth routes → Authentication: calls
- Authentication → Application database: reads and writes
- Satellite routes → Satellite calculations: calls
- Satellite routes → Tracking history: calls
- Location routes → Observer locations: calls
- Location routes → Night planning: calls
- Alert routes → Pass alerts: calls
- Favorite routes → Favorites: calls
- Satellite calculations → TLE data source: refreshes data
