# priyajitpaul275/lunar-mission-browser architecture

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

- Interactive diagram: https://gitdiagram.com/priyajitpaul275/lunar-mission-browser
- Repository: https://github.com/priyajitpaul275/lunar-mission-browser

## Overview

This is a small Flask application for comparing lunar south-pole candidate sites. A user requests site data or a dated solar-illumination/Earth-visibility snapshot; the API computes a current result and a seven-day timeline using site geometry, then returns JSON. The app also serves a static page. Source evidence shows the server-side flow, but the page contents and any browser-side API calls were not provided.

Main entry points: [`app.py`](https://github.com/priyajitpaul275/lunar-mission-browser/blob/main/app.py) (HTTP routes), [`sites.json`](https://github.com/priyajitpaul275/lunar-mission-browser/blob/main/sites.json) (Candidate sites), [`static/index.html`](https://github.com/priyajitpaul275/lunar-mission-browser/blob/main/static/index.html) (Static page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_browser["Browser"]
  node_static_page["Static page<br/>[index.html]"]
end

subgraph group_api["API and calculations"]
  node_api_routes["HTTP routes<br/>[app.py]"]
  node_angle_api["Angle endpoint<br/>[app.py]"]
  node_angle_model["Topocentric model<br/>[app.py]"]
  node_terrain_mask["Terrain mask<br/>[app.py]"]
end

subgraph group_data["Site data"]
  node_candidate_sites[("Candidate sites<br/>[sites.json]")]
end

node_user(("User"))

node_user -->|"uses"| node_browser
node_browser -.->|"requests"| node_api_routes
node_api_routes -->|"serves"| node_static_page
node_api_routes -->|"routes to"| node_angle_api
node_angle_api -->|"calculates"| node_angle_model
node_angle_model -->|"gets limits"| node_terrain_mask
node_api_routes -->|"loads"| node_candidate_sites
node_angle_model -->|"reads site"| node_candidate_sites
node_angle_api -->|"returns sites"| node_candidate_sites

click node_static_page "https://github.com/priyajitpaul275/lunar-mission-browser/blob/main/static/index.html"
click node_api_routes "https://github.com/priyajitpaul275/lunar-mission-browser/blob/main/app.py"
click node_angle_api "https://github.com/priyajitpaul275/lunar-mission-browser/blob/main/app.py"
click node_angle_model "https://github.com/priyajitpaul275/lunar-mission-browser/blob/main/app.py"
click node_terrain_mask "https://github.com/priyajitpaul275/lunar-mission-browser/blob/main/app.py"
click node_candidate_sites "https://github.com/priyajitpaul275/lunar-mission-browser/blob/main/sites.json"

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_browser,node_static_page,node_user toneBlue
class node_api_routes,node_angle_api,node_angle_model,node_terrain_mask toneAmber
class node_candidate_sites toneMint
```

## Components

### Web interface

- **Browser**
- [Static page](https://github.com/priyajitpaul275/lunar-mission-browser/blob/main/static/index.html): `static/index.html`

### API and calculations

- [HTTP routes](https://github.com/priyajitpaul275/lunar-mission-browser/blob/main/app.py): `app.py`
- [Angle endpoint](https://github.com/priyajitpaul275/lunar-mission-browser/blob/main/app.py): `app.py`
- [Topocentric model](https://github.com/priyajitpaul275/lunar-mission-browser/blob/main/app.py): `app.py`
- [Terrain mask](https://github.com/priyajitpaul275/lunar-mission-browser/blob/main/app.py): `app.py`

### Site data

- [Candidate sites](https://github.com/priyajitpaul275/lunar-mission-browser/blob/main/sites.json): `sites.json`

### Other components

- **User**

## Connections

- User → Browser: uses
- Browser → HTTP routes: requests
- HTTP routes → Static page: serves (evidence: `app.py`)
- HTTP routes → Angle endpoint: routes to (evidence: `app.py`)
- Angle endpoint → Topocentric model: calculates (evidence: `app.py`)
- Topocentric model → Terrain mask: gets limits (evidence: `app.py`)
- HTTP routes → Candidate sites: loads (evidence: `app.py`)
- Topocentric model → Candidate sites: reads site (evidence: `app.py`)
- Angle endpoint → Candidate sites: returns sites (evidence: `app.py`)
