# malakabdelkhalek/marsouine-martian-map architecture

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

- Interactive diagram: https://gitdiagram.com/malakabdelkhalek/marsouine-martian-map
- Repository: https://github.com/malakabdelkhalek/marsouine-martian-map

## Overview

Marsouine is a Martian EVA route-planning and terrain-awareness system for the Mount Sharp boxwork region. The principal workflow combines terrain/elevation layers and stop-level assessments into a GO/NO-GO map, then lets an astronaut plan a route, scout uncertain stretches, and follow the route on a helmet/phone view. The repository also contains a simulated drone and a web map/3D-walk branch. Several subsystem links are documented in the README; unsampled implementation details are represented only where the tree or documentation supports them.

Main entry points: [`Application/fg-app/src/components/Tablet.jsx`](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/components/Tablet.jsx) (Tablet planner), [`Map_layer/martian_map/pipeline/50_combined_routes.py`](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Map_layer/martian_map/pipeline/50_combined_routes.py) (Combined routes), [`Application/fg-app/src/components/Helmet.jsx`](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/components/Helmet.jsx) (Helmet guidance), [`Application/fg-app/src/lib/mission.js`](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/lib/mission.js) (Stop and mission rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mapdata["Terrain map data"]
  node_elev["Elevation and slope"]
end

subgraph group_gis["GIS and route layers"]
  node_mapbuild["Map assembly"]
  node_gonogo["GO/NO-GO layers"]
  node_combine["Combined routes"]
  node_webexport["Web map export<br/>[60_web_export.py]"]
  node_common["GIS shared utilities<br/>[common.py]"]
  node_poi["Stops and POIs<br/>[10_build_poi.py]"]
end

subgraph group_scout["Scout simulation"]
  node_droneflight["Drone flight planning"]
  node_dronehazard["Drone hazard layer<br/>[05_hazard_layer.js]"]
  node_droneapp["Drone simulator"]
end

subgraph group_tablet["Tablet mission planning"]
  node_app["App view routing<br/>[App.jsx]"]
  node_tabletui["Tablet planner<br/>[Tablet.jsx]"]
  node_planner["Route planner<br/>[Planner.jsx]"]
  node_geodata["Geo layer loading<br/>[geo.js]"]
  node_mission["Stop and mission rules<br/>[mission.js]"]
  node_routes["Route options<br/>[routes.js]"]
  node_safety["Safety and oxygen<br/>[safety.js]"]
  node_export["Mission exports<br/>[exportMission.js]"]
end

subgraph group_walk["Helmet and 3D walk"]
  node_helmet["Helmet guidance<br/>[Helmet.jsx]"]
  node_assistant["Mission assistant<br/>[Assistant.jsx]"]
  node_portal["Phone walk portal<br/>[portal.js]"]
  node_sections["3D terrain sections<br/>[sections.js]"]
end

node_astronaut(("Astronaut"))

node_elev -.->|"supplies terrain"| node_mapbuild
node_mapbuild -.->|"builds layers"| node_gonogo
node_gonogo -->|"combines hazards"| node_combine
node_combine -->|"uses utilities"| node_common
node_combine -.->|"uses stop locations"| node_poi
node_combine -.->|"exports web layers"| node_webexport
node_droneflight -.->|"produces hazards"| node_dronehazard
node_dronehazard -.->|"informs scouting"| node_tabletui
node_astronaut -->|"plans EVA"| node_tabletui
node_app -->|"selects tablet view"| node_tabletui
node_app -->|"selects helmet view"| node_helmet
node_tabletui -->|"loads map data"| node_geodata
node_tabletui -->|"renders planner"| node_planner
node_tabletui -->|"requests scout needs"| node_routes
node_tabletui -->|"exports mission"| node_export
node_mission -->|"loads elevation context"| node_geodata
node_routes -->|"uses distance"| node_mission
node_tabletui -.->|"loads stops"| node_mission
node_helmet -->|"loads stops"| node_mission
node_helmet -->|"checks EVA safety"| node_safety
node_helmet -->|"renders assistant"| node_assistant
node_astronaut -->|"follows walk route"| node_portal
node_webexport -.->|"provides web terrain"| node_portal
node_sections -.->|"supports 3D walk view"| node_portal

click node_elev "https://github.com/malakabdelkhalek/marsouine-martian-map/tree/main/Map_layer/Layer2_Elevation/scripts"
click node_mapbuild "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Map_layer/martian_map/pipeline/00_assemble_workspace.py"
click node_gonogo "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Map_layer/martian_map/pipeline/40_gonogo_layers.py"
click node_combine "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Map_layer/martian_map/pipeline/50_combined_routes.py"
click node_webexport "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Map_layer/martian_map/pipeline/60_web_export.py"
click node_common "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Map_layer/martian_map/pipeline/common.py"
click node_poi "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Map_layer/martian_map/pipeline/build_history/L5_poi/10_build_poi.py"
click node_droneflight "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Drone/sim/scripts/02_route_flights.py"
click node_dronehazard "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Drone/sim/scripts/05_hazard_layer.js"
click node_droneapp "https://github.com/malakabdelkhalek/marsouine-martian-map/tree/main/Drone/sim"
click node_app "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/App.jsx"
click node_tabletui "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/components/Tablet.jsx"
click node_planner "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/components/Planner.jsx"
click node_geodata "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/lib/geo.js"
click node_mission "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/lib/mission.js"
click node_routes "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/lib/routes.js"
click node_safety "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/lib/safety.js"
click node_export "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/lib/exportMission.js"
click node_helmet "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/components/Helmet.jsx"
click node_assistant "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/components/Assistant.jsx"
click node_portal "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Map_layer/martian_map/web/walk/portal.js"
click node_sections "https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Map_layer/martian_map/web/lib/sections.js"

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_elev toneBlue
class node_mapbuild,node_gonogo,node_combine,node_webexport,node_common,node_poi toneAmber
class node_droneflight,node_dronehazard,node_droneapp toneMint
class node_app,node_tabletui,node_planner,node_geodata,node_mission,node_routes,node_safety,node_export toneRose
class node_helmet,node_assistant,node_portal,node_sections,node_astronaut toneIndigo
```

## Components

### Terrain map data

- [Elevation and slope](https://github.com/malakabdelkhalek/marsouine-martian-map/tree/main/Map_layer/Layer2_Elevation/scripts): `Map_layer/Layer2_Elevation/scripts`

### GIS and route layers

- [Map assembly](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Map_layer/martian_map/pipeline/00_assemble_workspace.py): `Map_layer/martian_map/pipeline/00_assemble_workspace.py`
- [GO/NO-GO layers](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Map_layer/martian_map/pipeline/40_gonogo_layers.py): `Map_layer/martian_map/pipeline/40_gonogo_layers.py`
- [Combined routes](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Map_layer/martian_map/pipeline/50_combined_routes.py): `Map_layer/martian_map/pipeline/50_combined_routes.py`
- [Web map export](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Map_layer/martian_map/pipeline/60_web_export.py): `Map_layer/martian_map/pipeline/60_web_export.py`
- [GIS shared utilities](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Map_layer/martian_map/pipeline/common.py): `Map_layer/martian_map/pipeline/common.py`
- [Stops and POIs](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Map_layer/martian_map/pipeline/build_history/L5_poi/10_build_poi.py): `Map_layer/martian_map/pipeline/build_history/L5_poi/10_build_poi.py`

### Scout simulation

- [Drone flight planning](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Drone/sim/scripts/02_route_flights.py): `Drone/sim/scripts/02_route_flights.py`
- [Drone hazard layer](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Drone/sim/scripts/05_hazard_layer.js): `Drone/sim/scripts/05_hazard_layer.js`
- [Drone simulator](https://github.com/malakabdelkhalek/marsouine-martian-map/tree/main/Drone/sim): `Drone/sim`

### Tablet mission planning

- [App view routing](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/App.jsx): `Application/fg-app/src/App.jsx`
- [Tablet planner](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/components/Tablet.jsx): `Application/fg-app/src/components/Tablet.jsx`
- [Route planner](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/components/Planner.jsx): `Application/fg-app/src/components/Planner.jsx`
- [Geo layer loading](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/lib/geo.js): `Application/fg-app/src/lib/geo.js`
- [Stop and mission rules](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/lib/mission.js): `Application/fg-app/src/lib/mission.js`
- [Route options](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/lib/routes.js): `Application/fg-app/src/lib/routes.js`
- [Safety and oxygen](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/lib/safety.js): `Application/fg-app/src/lib/safety.js`
- [Mission exports](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/lib/exportMission.js): `Application/fg-app/src/lib/exportMission.js`

### Helmet and 3D walk

- [Helmet guidance](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/components/Helmet.jsx): `Application/fg-app/src/components/Helmet.jsx`
- [Mission assistant](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Application/fg-app/src/components/Assistant.jsx): `Application/fg-app/src/components/Assistant.jsx`
- [Phone walk portal](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Map_layer/martian_map/web/walk/portal.js): `Map_layer/martian_map/web/walk/portal.js`
- [3D terrain sections](https://github.com/malakabdelkhalek/marsouine-martian-map/blob/main/Map_layer/martian_map/web/lib/sections.js): `Map_layer/martian_map/web/lib/sections.js`

### Other components

- **Astronaut**

## Connections

- Elevation and slope → Map assembly: supplies terrain (evidence: `README.md`)
- Map assembly → GO/NO-GO layers: builds layers (evidence: `README.md`)
- GO/NO-GO layers → Combined routes: combines hazards (evidence: `Map_layer/martian_map/pipeline/50_combined_routes.py`)
- Combined routes → GIS shared utilities: uses utilities (evidence: `Map_layer/martian_map/pipeline/50_combined_routes.py`)
- Combined routes → Stops and POIs: uses stop locations (evidence: `README.md`)
- Combined routes → Web map export: exports web layers (evidence: `README.md`)
- Drone flight planning → Drone hazard layer: produces hazards (evidence: `README.md`)
- Drone hazard layer → Tablet planner: informs scouting (evidence: `README.md`)
- Astronaut → Tablet planner: plans EVA (evidence: `README.md`)
- App view routing → Tablet planner: selects tablet view (evidence: `Application/fg-app/src/App.jsx`)
- App view routing → Helmet guidance: selects helmet view (evidence: `Application/fg-app/src/App.jsx`)
- Tablet planner → Geo layer loading: loads map data (evidence: `Application/fg-app/src/components/Tablet.jsx`)
- Tablet planner → Route planner: renders planner (evidence: `Application/fg-app/src/components/Tablet.jsx`)
- Tablet planner → Route options: requests scout needs (evidence: `Application/fg-app/src/components/Tablet.jsx`)
- Tablet planner → Mission exports: exports mission
- Stop and mission rules → Geo layer loading: loads elevation context (evidence: `Application/fg-app/src/lib/mission.js`)
- Route options → Stop and mission rules: uses distance (evidence: `Application/fg-app/src/lib/routes.js`)
- Tablet planner → Stop and mission rules: loads stops (evidence: `Application/fg-app/src/components/Tablet.jsx`)
- Helmet guidance → Stop and mission rules: loads stops (evidence: `Application/fg-app/src/components/Helmet.jsx`)
- Helmet guidance → Safety and oxygen: checks EVA safety (evidence: `Application/fg-app/src/components/Helmet.jsx`)
- Helmet guidance → Mission assistant: renders assistant (evidence: `Application/fg-app/src/components/Helmet.jsx`)
- Astronaut → Phone walk portal: follows walk route (evidence: `README.md`)
- Web map export → Phone walk portal: provides web terrain (evidence: `README.md`)
- 3D terrain sections → Phone walk portal: supports 3D walk view (evidence: `README.md`)
