# kierankristian/star-map-navigation architecture

> Architecture diagram of the GitHub repository kierankristian/star-map-navigation, 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/kierankristian/star-map-navigation
- Repository: https://github.com/kierankristian/star-map-navigation

## Overview

This Unity project is a procedurally generated star-map navigation simulation. The user selects origin and destination stars and sets travel constraints; Dijkstra pathfinding finds a viable shortest route, which is highlighted in the scene and followed by a spaceship. Galaxy generation, star selection, route solving, and visual feedback are distinct stages. The README documents these responsibilities and relationships; source excerpts were not available, so internal call ownership beyond those documented behaviors is not inferred.

Main entry points: [`Assets/Scripts/Spaceship Script.cs`](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Spaceship%20Script.cs) (Spaceship), [`Assets/Scripts/Star Selector.cs`](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Star%20Selector.cs) (Star Selector), [`Assets/Scripts/DijkstraPathfinding.cs`](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/DijkstraPathfinding.cs) (Dijkstra Solver), [`Assets/StarMapScene.unity`](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/StarMapScene.unity) (Star Map Scene)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_galaxy["Galaxy Generation"]
  node_spawner["Star Spawner<br/>[Star Spawner.cs]"]
  node_star["Star Data<br/>[Star.cs]"]
end

subgraph group_navigation["Route Navigation"]
  node_selector["Star Selector<br/>[Star Selector.cs]"]
  node_pathfinding["Dijkstra Solver"]
  node_starpath["Star Path<br/>[Star Path.cs]"]
  node_route["Route Mesh<br/>[RouteMesh.cs]"]
  node_spaceship["Spaceship"]
end

subgraph group_presentation["Scene Presentation"]
  node_sidepanel["Constraint UI"]
  node_scene["Star Map Scene<br/>[StarMapScene.unity]"]
  node_prefabs["Star And Route Prefabs"]
  node_audio["Sound Effects"]
  node_skybox["Space Skybox<br/>[SpaceSkybox.mat]"]
end

subgraph group_controls["Controls And Feedback"]
  node_gamemode["Simulation Control"]
  node_inputs["Input Actions"]
  node_camera["Camera Controls"]
  node_lerping["Lerping<br/>[Lerping.cs]"]
end

node_user(("User"))

node_user -->|"selects stars"| node_selector
node_user -->|"sets constraints"| node_sidepanel
node_user -->|"controls view"| node_camera
node_user -->|"exits with Escape"| node_gamemode
node_spawner -->|"generates stars"| node_star
node_selector -->|"requests route"| node_pathfinding
node_pathfinding -->|"calculates path"| node_starpath
node_pathfinding -->|"highlights route"| node_route
node_spaceship -->|"follows path"| node_starpath
node_spaceship -->|"marks travelled routes"| node_route
node_spaceship -->|"lerps movement"| node_lerping
node_scene -->|"uses scene assets"| node_prefabs
node_scene -->|"sets skybox"| node_skybox
node_spaceship -->|"plays boost sound"| node_audio
node_selector -->|"plays UI feedback"| node_audio
node_inputs -->|"drives controls"| node_camera

click node_spawner "https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Star%20Spawner.cs"
click node_star "https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Custom%20Classes/Star.cs"
click node_selector "https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Star%20Selector.cs"
click node_pathfinding "https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/DijkstraPathfinding.cs"
click node_starpath "https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Custom%20Classes/Star%20Path.cs"
click node_route "https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Custom%20Classes/RouteMesh.cs"
click node_spaceship "https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Spaceship%20Script.cs"
click node_gamemode "https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Gamemode%20Manager.cs"
click node_inputs "https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Inputs.inputactions"
click node_camera "https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Camera%20Controls/FreeLookFlyCamera.cs"
click node_lerping "https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Lerp%20Scripts/Lerping.cs"
click node_sidepanel "https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Lerp%20Scripts/SidePanelManager.cs"
click node_scene "https://github.com/kierankristian/star-map-navigation/blob/main/Assets/StarMapScene.unity"
click node_prefabs "https://github.com/kierankristian/star-map-navigation/tree/main/Assets/Prefabs"
click node_audio "https://github.com/kierankristian/star-map-navigation/tree/main/Assets/SFX"
click node_skybox "https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Materials/SpaceSkybox.mat"

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_spawner,node_star,node_user toneBlue
class node_selector,node_pathfinding,node_starpath,node_route,node_spaceship toneAmber
class node_sidepanel,node_scene,node_prefabs,node_audio,node_skybox toneMint
class node_gamemode,node_inputs,node_camera,node_lerping toneRose
```

## Components

### Galaxy Generation

- [Star Spawner](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Star%20Spawner.cs): `Assets/Scripts/Star Spawner.cs`
- [Star Data](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Custom%20Classes/Star.cs): `Assets/Scripts/Custom Classes/Star.cs`

### Route Navigation

- [Star Selector](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Star%20Selector.cs): `Assets/Scripts/Star Selector.cs`
- [Dijkstra Solver](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/DijkstraPathfinding.cs): `Assets/Scripts/DijkstraPathfinding.cs`
- [Star Path](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Custom%20Classes/Star%20Path.cs): `Assets/Scripts/Custom Classes/Star Path.cs`
- [Route Mesh](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Custom%20Classes/RouteMesh.cs): `Assets/Scripts/Custom Classes/RouteMesh.cs`
- [Spaceship](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Spaceship%20Script.cs): `Assets/Scripts/Spaceship Script.cs`

### Scene Presentation

- [Constraint UI](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Lerp%20Scripts/SidePanelManager.cs): `Assets/Scripts/Lerp Scripts/SidePanelManager.cs`
- [Star Map Scene](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/StarMapScene.unity): `Assets/StarMapScene.unity`
- [Star And Route Prefabs](https://github.com/kierankristian/star-map-navigation/tree/main/Assets/Prefabs): `Assets/Prefabs`
- [Sound Effects](https://github.com/kierankristian/star-map-navigation/tree/main/Assets/SFX): `Assets/SFX`
- [Space Skybox](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Materials/SpaceSkybox.mat): `Assets/Materials/SpaceSkybox.mat`

### Controls And Feedback

- [Simulation Control](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Gamemode%20Manager.cs): `Assets/Scripts/Gamemode Manager.cs`
- [Input Actions](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Inputs.inputactions): `Assets/Inputs.inputactions`
- [Camera Controls](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Camera%20Controls/FreeLookFlyCamera.cs): `Assets/Scripts/Camera Controls/FreeLookFlyCamera.cs`
- [Lerping](https://github.com/kierankristian/star-map-navigation/blob/main/Assets/Scripts/Lerp%20Scripts/Lerping.cs): `Assets/Scripts/Lerp Scripts/Lerping.cs`

### Other components

- **User**

## Connections

- User → Star Selector: selects stars
- User → Constraint UI: sets constraints
- User → Camera Controls: controls view
- User → Simulation Control: exits with Escape
- Star Spawner → Star Data: generates stars
- Star Selector → Dijkstra Solver: requests route
- Dijkstra Solver → Star Path: calculates path
- Dijkstra Solver → Route Mesh: highlights route
- Spaceship → Star Path: follows path
- Spaceship → Route Mesh: marks travelled routes
- Spaceship → Lerping: lerps movement
- Star Map Scene → Star And Route Prefabs: uses scene assets
- Star Map Scene → Space Skybox: sets skybox
- Spaceship → Sound Effects: plays boost sound
- Star Selector → Sound Effects: plays UI feedback
- Input Actions → Camera Controls: drives controls
