# ashtynguela/lu-see architecture

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

- Interactive diagram: https://gitdiagram.com/ashtynguela/lu-see
- Repository: https://github.com/ashtynguela/lu-see

## Overview

AMAZE-X is a browser-based lunar landing-site exploration and mission-planning app, with a distinct Rocky assistant/overlay and a Solar System explorer. The principal workflow is to choose a lunar site and landing date, load ephemeris and terrain data, inspect Sun/Earth conditions over a mission, search candidate arrival windows, then compare or export scenarios. The graph preserves documented capabilities even where their implementation was not sampled; dashed, uncited edges mark inferred client/server connections.

Main entry points: [`src/App.tsx`](https://github.com/ashtynguela/lu-see/blob/main/src/App.tsx) (App shell), [`server/index.mjs`](https://github.com/ashtynguela/lu-see/blob/main/server/index.mjs) (HTTP API), [`server/app-tools.mjs`](https://github.com/ashtynguela/lu-see/blob/main/server/app-tools.mjs) (App action tools), [`src/World.tsx`](https://github.com/ashtynguela/lu-see/blob/main/src/World.tsx) (Earth–Moon views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["App shell<br/>[App.tsx]"]
  node_welcome["Welcome screen<br/>[Welcome.tsx]"]
  node_solarview["Solar System<br/>[SolarSystem.tsx]"]
  node_world["Earth–Moon views<br/>[World.tsx]"]
  node_lunarview["Lunar globe<br/>[LunarGlobe.tsx]"]
  node_state["App state<br/>[store.ts]"]
end

subgraph group_analysis["Lunar analysis"]
  node_engine["Site conditions<br/>[index.mjs]"]
  node_solarcalc["Solar vectors<br/>[solar.mjs]"]
  node_orientation["Body orientation"]
  node_celestial["Lunar context"]
  node_landing["Landing windows<br/>[landing.mjs]"]
  node_history["Mission references"]
  node_comparison["Scenario comparison<br/>[comparison.mjs]"]
  node_nearby["Nearby sites<br/>[nearby.mjs]"]
  node_report["Analysis reports<br/>[report.mjs]"]
end

subgraph group_services["Data services"]
  node_api["HTTP API<br/>[index.mjs]"]
  node_horizons["JPL Horizons<br/>[horizons.mjs]"]
  node_terrain["Terrain service<br/>[terrain.mjs]"]
  node_terrainwork["Terrain processing<br/>[terrain-work.mjs]"]
  node_imagery["Surface imagery"]
end

subgraph group_assistant["Assistant and actions"]
  node_assistant["Rocky assistant<br/>[assistant.mjs]"]
  node_tools["App action tools<br/>[app-tools.mjs]"]
  node_actions["Action definitions<br/>[app-actions.mjs]"]
end

node_visitor(("Explorer"))

node_visitor -->|"opens"| node_app
node_app -->|"shows"| node_welcome
node_app -->|"reads and updates"| node_state
node_app -->|"renders"| node_world
node_app -->|"renders"| node_nearby
node_visitor -->|"explores planets"| node_solarview
node_solarview -->|"uses positions"| node_solarcalc
node_solarview -->|"uses rotation"| node_orientation
node_world -->|"offers lunar map"| node_lunarview
node_world -->|"computes conditions"| node_engine
node_world -->|"uses rotation"| node_orientation
node_lunarview -->|"builds context"| node_celestial
node_celestial -->|"interpolates vectors"| node_solarcalc
node_visitor -->|"requests windows"| node_landing
node_landing -->|"uses mission timing"| node_history
node_visitor -->|"compares scenarios"| node_comparison
node_visitor -->|"exports analysis"| node_report
node_nearby -->|"ranks sites"| node_engine
node_app -->|"exports report"| node_report
node_state -.->|"requests data"| node_api
node_api -->|"fetches ephemeris"| node_horizons
node_api -->|"builds solar packet"| node_solarcalc
node_api -->|"loads terrain"| node_terrain
node_terrain -->|"delegates work"| node_terrainwork
node_api -->|"serves imagery"| node_imagery
node_visitor -->|"chats with Rocky"| node_assistant
node_assistant -->|"runs tools"| node_tools
node_tools -->|"validates actions"| node_actions
node_tools -->|"searches windows"| node_landing
node_tools -->|"estimates arrivals"| node_history
node_tools -->|"summarizes comparison"| node_comparison

click node_app "https://github.com/ashtynguela/lu-see/blob/main/src/App.tsx"
click node_welcome "https://github.com/ashtynguela/lu-see/blob/main/src/Welcome.tsx"
click node_solarview "https://github.com/ashtynguela/lu-see/blob/main/src/SolarSystem.tsx"
click node_world "https://github.com/ashtynguela/lu-see/blob/main/src/World.tsx"
click node_lunarview "https://github.com/ashtynguela/lu-see/blob/main/src/LunarGlobe.tsx"
click node_state "https://github.com/ashtynguela/lu-see/blob/main/src/store.ts"
click node_engine "https://github.com/ashtynguela/lu-see/blob/main/engine/index.mjs"
click node_solarcalc "https://github.com/ashtynguela/lu-see/blob/main/engine/solar.mjs"
click node_orientation "https://github.com/ashtynguela/lu-see/blob/main/engine/planetOrientation.mjs"
click node_celestial "https://github.com/ashtynguela/lu-see/blob/main/engine/celestial-context.mjs"
click node_landing "https://github.com/ashtynguela/lu-see/blob/main/engine/landing.mjs"
click node_history "https://github.com/ashtynguela/lu-see/blob/main/engine/mission-history.mjs"
click node_comparison "https://github.com/ashtynguela/lu-see/blob/main/engine/comparison.mjs"
click node_nearby "https://github.com/ashtynguela/lu-see/blob/main/engine/nearby.mjs"
click node_report "https://github.com/ashtynguela/lu-see/blob/main/engine/report.mjs"
click node_api "https://github.com/ashtynguela/lu-see/blob/main/server/index.mjs"
click node_horizons "https://github.com/ashtynguela/lu-see/blob/main/server/horizons.mjs"
click node_terrain "https://github.com/ashtynguela/lu-see/blob/main/server/terrain.mjs"
click node_terrainwork "https://github.com/ashtynguela/lu-see/blob/main/server/terrain-work.mjs"
click node_imagery "https://github.com/ashtynguela/lu-see/blob/main/server/surface-imagery.mjs"
click node_assistant "https://github.com/ashtynguela/lu-see/blob/main/server/assistant.mjs"
click node_tools "https://github.com/ashtynguela/lu-see/blob/main/server/app-tools.mjs"
click node_actions "https://github.com/ashtynguela/lu-see/blob/main/engine/app-actions.mjs"

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_welcome,node_solarview,node_world,node_lunarview,node_state toneBlue
class node_engine,node_solarcalc,node_orientation,node_celestial,node_landing,node_history,node_comparison,node_nearby,node_report toneAmber
class node_api,node_horizons,node_terrain,node_terrainwork,node_imagery toneMint
class node_assistant,node_tools,node_actions toneRose
class node_visitor toneIndigo
```

## Components

### App experience

- [App shell](https://github.com/ashtynguela/lu-see/blob/main/src/App.tsx): `src/App.tsx`
- [Welcome screen](https://github.com/ashtynguela/lu-see/blob/main/src/Welcome.tsx): `src/Welcome.tsx`
- [Solar System](https://github.com/ashtynguela/lu-see/blob/main/src/SolarSystem.tsx): `src/SolarSystem.tsx`
- [Earth–Moon views](https://github.com/ashtynguela/lu-see/blob/main/src/World.tsx): `src/World.tsx`
- [Lunar globe](https://github.com/ashtynguela/lu-see/blob/main/src/LunarGlobe.tsx): `src/LunarGlobe.tsx`
- [App state](https://github.com/ashtynguela/lu-see/blob/main/src/store.ts): `src/store.ts`

### Lunar analysis

- [Site conditions](https://github.com/ashtynguela/lu-see/blob/main/engine/index.mjs): `engine/index.mjs`
- [Solar vectors](https://github.com/ashtynguela/lu-see/blob/main/engine/solar.mjs): `engine/solar.mjs`
- [Body orientation](https://github.com/ashtynguela/lu-see/blob/main/engine/planetOrientation.mjs): `engine/planetOrientation.mjs`
- [Lunar context](https://github.com/ashtynguela/lu-see/blob/main/engine/celestial-context.mjs): `engine/celestial-context.mjs`
- [Landing windows](https://github.com/ashtynguela/lu-see/blob/main/engine/landing.mjs): `engine/landing.mjs`
- [Mission references](https://github.com/ashtynguela/lu-see/blob/main/engine/mission-history.mjs): `engine/mission-history.mjs`
- [Scenario comparison](https://github.com/ashtynguela/lu-see/blob/main/engine/comparison.mjs): `engine/comparison.mjs`
- [Nearby sites](https://github.com/ashtynguela/lu-see/blob/main/engine/nearby.mjs): `engine/nearby.mjs`
- [Analysis reports](https://github.com/ashtynguela/lu-see/blob/main/engine/report.mjs): `engine/report.mjs`

### Data services

- [HTTP API](https://github.com/ashtynguela/lu-see/blob/main/server/index.mjs): `server/index.mjs`
- [JPL Horizons](https://github.com/ashtynguela/lu-see/blob/main/server/horizons.mjs): `server/horizons.mjs`
- [Terrain service](https://github.com/ashtynguela/lu-see/blob/main/server/terrain.mjs): `server/terrain.mjs`
- [Terrain processing](https://github.com/ashtynguela/lu-see/blob/main/server/terrain-work.mjs): `server/terrain-work.mjs`
- [Surface imagery](https://github.com/ashtynguela/lu-see/blob/main/server/surface-imagery.mjs): `server/surface-imagery.mjs`

### Assistant and actions

- [Rocky assistant](https://github.com/ashtynguela/lu-see/blob/main/server/assistant.mjs): `server/assistant.mjs`
- [App action tools](https://github.com/ashtynguela/lu-see/blob/main/server/app-tools.mjs): `server/app-tools.mjs`
- [Action definitions](https://github.com/ashtynguela/lu-see/blob/main/engine/app-actions.mjs): `engine/app-actions.mjs`

### Other components

- **Explorer**

## Connections

- Explorer → App shell: opens (evidence: `README.md`)
- App shell → Welcome screen: shows (evidence: `src/App.tsx`)
- App shell → App state: reads and updates (evidence: `src/App.tsx`)
- App shell → Earth–Moon views: renders (evidence: `src/App.tsx`)
- App shell → Nearby sites: renders (evidence: `src/App.tsx`)
- Explorer → Solar System: explores planets (evidence: `README.md`)
- Solar System → Solar vectors: uses positions (evidence: `src/SolarSystem.tsx`)
- Solar System → Body orientation: uses rotation (evidence: `src/SolarSystem.tsx`)
- Earth–Moon views → Lunar globe: offers lunar map (evidence: `src/World.tsx`)
- Earth–Moon views → Site conditions: computes conditions (evidence: `src/World.tsx`)
- Earth–Moon views → Body orientation: uses rotation (evidence: `src/World.tsx`)
- Lunar globe → Lunar context: builds context (evidence: `src/LunarGlobe.tsx`)
- Lunar context → Solar vectors: interpolates vectors (evidence: `engine/celestial-context.mjs`)
- Explorer → Landing windows: requests windows (evidence: `README.md`)
- Landing windows → Mission references: uses mission timing
- Explorer → Scenario comparison: compares scenarios (evidence: `README.md`)
- Explorer → Analysis reports: exports analysis (evidence: `README.md`)
- Nearby sites → Site conditions: ranks sites (evidence: `src/NearbySites.tsx`)
- App shell → Analysis reports: exports report (evidence: `src/App.tsx`)
- App state → HTTP API: requests data
- HTTP API → JPL Horizons: fetches ephemeris (evidence: `server/index.mjs`)
- HTTP API → Solar vectors: builds solar packet
- HTTP API → Terrain service: loads terrain (evidence: `server/index.mjs`)
- Terrain service → Terrain processing: delegates work (evidence: `server/terrain.mjs`)
- HTTP API → Surface imagery: serves imagery (evidence: `server/index.mjs`)
- Explorer → Rocky assistant: chats with Rocky (evidence: `README.md`)
- Rocky assistant → App action tools: runs tools (evidence: `server/assistant.mjs`)
- App action tools → Action definitions: validates actions (evidence: `server/app-tools.mjs`)
- App action tools → Landing windows: searches windows (evidence: `server/app-tools.mjs`)
- App action tools → Mission references: estimates arrivals (evidence: `server/app-tools.mjs`)
- App action tools → Scenario comparison: summarizes comparison (evidence: `server/app-tools.mjs`)
