# iamdevdhanush/afterlight architecture

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

## Overview

ORBITAL is an interactive space-archaeology museum. Visitors move from a cinematic arrival and guided artifact storytelling to Moon-or-Mars destination selection, then browse an archival exhibition and optional artifact, surface-map, legacy, or free-exploration views. A separate planetary-archaeology experience presents sites, traverses, terrain, and hardware inspection; classroom, language, accessibility, and fallback features broaden access. The graph follows documented app routing and sampled imports; some optional capabilities are included from the README, with uncertain wiring left unconnected.

Main entry points: [`src/App.tsx`](https://github.com/iamdevdhanush/afterlight/blob/master/src/App.tsx) (Experience router), [`src/store/useExperienceStore.ts`](https://github.com/iamdevdhanush/afterlight/blob/master/src/store/useExperienceStore.ts) (Experience state), [`src/audio/GuideVoiceEngine.ts`](https://github.com/iamdevdhanush/afterlight/blob/master/src/audio/GuideVoiceEngine.ts) (Curator narration), [`src/components/ui/ScreenExhibition.tsx`](https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/ScreenExhibition.tsx) (Artifact exhibition)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Museum Experience"]
  node_app["Experience router<br/>[App.tsx]"]
  node_arrival["Arrival story<br/>[ScreenArrival.tsx]"]
  node_destination["Destination selection"]
  node_exhibition["Artifact exhibition"]
  node_artifactdetails["Artifact details"]
  node_documentary["Documentary stories"]
  node_legacy["Artifact legacy<br/>[ScreenLegacy.tsx]"]
  node_freeexplore["Free exploration"]
  node_scene["Planetary scene<br/>[SceneCanvas.tsx]"]
  node_map["Surface map"]
end

subgraph group_content["Archive Content"]
  node_artifactdata["Artifact archive<br/>[artifacts.ts]"]
  node_destdata["Destination profiles<br/>[destinations.ts]"]
end

subgraph group_planetary["Planetary Archaeology"]
  node_planetmodule["Archaeology module"]
  node_sites["Planetary site catalog<br/>[planetarySites.ts]"]
  node_search["Site search"]
  node_markers["Site markers"]
  node_hardware["Hardware inspection"]
  node_trek["NASA Trek imagery<br/>[nasaTrekService.ts]"]
end

subgraph group_platform["Shared Experience Services"]
  node_state["Experience state"]
  node_navigation["History navigation"]
  node_voice["Curator narration"]
  node_sound["Procedural sound<br/>[SoundManager.ts]"]
end

subgraph group_access["Access and Classroom"]
  node_teacher["Teacher mode"]
  node_languages["Language support<br/>[index.ts]"]
  node_announcer["Screen-reader announcer"]
  node_fallback["2D archival fallback"]
  node_offline["Offline cache<br/>[sw.js]"]
end

node_visitor(("Museum visitor"))
node_nasa(("NASA data services"))

node_visitor -->|"opens"| node_app
node_app -->|"reads state"| node_state
node_app -->|"renders"| node_scene
node_app -->|"routes to"| node_arrival
node_arrival -->|"advances via"| node_navigation
node_arrival -->|"plays cues"| node_sound
node_destination -->|"updates"| node_state
node_destination -->|"reads profiles"| node_destdata
node_exhibition -->|"reads archive"| node_artifactdata
node_exhibition -->|"reads profiles"| node_destdata
node_exhibition -->|"offers map"| node_map
node_artifactdetails -->|"reads archive"| node_artifactdata
node_artifactdetails -->|"requests narration"| node_voice
node_documentary -->|"requests narration"| node_voice
node_legacy -->|"requests narration"| node_voice
node_state -->|"dispatches navigation"| node_navigation
node_state -->|"plays cues"| node_sound
node_state -->|"coordinates narration"| node_voice
node_voice -->|"uses audio engine"| node_sound
node_voice -.->|"speaks scripts"| node_nasa
node_app -->|"routes to"| node_planetmodule
node_planetmodule -.->|"browses sites"| node_sites
node_search -->|"searches"| node_sites
node_search -->|"filters markers"| node_markers
node_markers -.->|"uses site data"| node_sites
node_hardware -.->|"extends inspection"| node_planetmodule
node_map -.->|"shows topography"| node_nasa
node_trek -.->|"requests imagery"| node_nasa
node_app -->|"mounts mode"| node_teacher
node_app -->|"renders"| node_announcer
node_app -->|"uses on WebGL failure"| node_fallback
node_languages -.->|"localizes interface"| node_visitor
node_offline -.->|"caches for offline"| node_visitor
node_fallback -->|"uses site content"| node_sites
node_freeexplore -->|"uses experience state"| node_state
node_exhibition -->|"uses history navigation"| node_navigation

click node_app "https://github.com/iamdevdhanush/afterlight/blob/master/src/App.tsx"
click node_arrival "https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/ScreenArrival.tsx"
click node_destination "https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/ScreenDestinationSelect.tsx"
click node_exhibition "https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/ScreenExhibition.tsx"
click node_artifactdetails "https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/ScreenArtifactDetails.tsx"
click node_documentary "https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/ScreenDocumentary.tsx"
click node_legacy "https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/ScreenLegacy.tsx"
click node_freeexplore "https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/ScreenExplorationUI.tsx"
click node_scene "https://github.com/iamdevdhanush/afterlight/blob/master/src/components/canvas/SceneCanvas.tsx"
click node_artifactdata "https://github.com/iamdevdhanush/afterlight/blob/master/src/data/artifacts.ts"
click node_destdata "https://github.com/iamdevdhanush/afterlight/blob/master/src/data/destinations.ts"
click node_state "https://github.com/iamdevdhanush/afterlight/blob/master/src/store/useExperienceStore.ts"
click node_navigation "https://github.com/iamdevdhanush/afterlight/blob/master/src/navigation/navigationController.ts"
click node_voice "https://github.com/iamdevdhanush/afterlight/blob/master/src/audio/GuideVoiceEngine.ts"
click node_sound "https://github.com/iamdevdhanush/afterlight/blob/master/src/audio/SoundManager.ts"
click node_planetmodule "https://github.com/iamdevdhanush/afterlight/blob/master/src/modules/planetary-archaeology/components/PlanetaryArchaeologyModule.tsx"
click node_sites "https://github.com/iamdevdhanush/afterlight/blob/master/src/modules/planetary-archaeology/data/planetarySites.ts"
click node_search "https://github.com/iamdevdhanush/afterlight/blob/master/src/modules/planetary-archaeology/components/PlanetarySearch.tsx"
click node_markers "https://github.com/iamdevdhanush/afterlight/blob/master/src/modules/planetary-archaeology/components/PlanetaryMarkers.tsx"
click node_hardware "https://github.com/iamdevdhanush/afterlight/blob/master/src/modules/planetary-archaeology/components/HardwareInspectionStudio.tsx"
click node_map "https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/PlanetarySurfaceMap.tsx"
click node_trek "https://github.com/iamdevdhanush/afterlight/blob/master/src/modules/planetary-archaeology/services/nasaTrekService.ts"
click node_teacher "https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/TeacherModeModal.tsx"
click node_languages "https://github.com/iamdevdhanush/afterlight/blob/master/src/i18n/index.ts"
click node_announcer "https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/AriaLiveAnnouncer.tsx"
click node_fallback "https://github.com/iamdevdhanush/afterlight/blob/master/src/components/canvas/WebGLFallbackGallery.tsx"
click node_offline "https://github.com/iamdevdhanush/afterlight/blob/master/public/sw.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_app,node_arrival,node_destination,node_exhibition,node_artifactdetails,node_documentary,node_legacy,node_freeexplore,node_scene,node_map toneBlue
class node_artifactdata,node_destdata toneAmber
class node_planetmodule,node_sites,node_search,node_markers,node_hardware,node_trek toneMint
class node_state,node_navigation,node_voice,node_sound toneRose
class node_teacher,node_languages,node_announcer,node_fallback,node_offline,node_visitor,node_nasa toneIndigo
```

## Components

### Museum Experience

- [Experience router](https://github.com/iamdevdhanush/afterlight/blob/master/src/App.tsx): `src/App.tsx`
- [Arrival story](https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/ScreenArrival.tsx): `src/components/ui/ScreenArrival.tsx`
- [Destination selection](https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/ScreenDestinationSelect.tsx): `src/components/ui/ScreenDestinationSelect.tsx`
- [Artifact exhibition](https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/ScreenExhibition.tsx): `src/components/ui/ScreenExhibition.tsx`
- [Artifact details](https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/ScreenArtifactDetails.tsx): `src/components/ui/ScreenArtifactDetails.tsx`
- [Documentary stories](https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/ScreenDocumentary.tsx): `src/components/ui/ScreenDocumentary.tsx`
- [Artifact legacy](https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/ScreenLegacy.tsx): `src/components/ui/ScreenLegacy.tsx`
- [Free exploration](https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/ScreenExplorationUI.tsx): `src/components/ui/ScreenExplorationUI.tsx`
- [Planetary scene](https://github.com/iamdevdhanush/afterlight/blob/master/src/components/canvas/SceneCanvas.tsx): `src/components/canvas/SceneCanvas.tsx`
- [Surface map](https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/PlanetarySurfaceMap.tsx): `src/components/ui/PlanetarySurfaceMap.tsx`

### Archive Content

- [Artifact archive](https://github.com/iamdevdhanush/afterlight/blob/master/src/data/artifacts.ts): `src/data/artifacts.ts`
- [Destination profiles](https://github.com/iamdevdhanush/afterlight/blob/master/src/data/destinations.ts): `src/data/destinations.ts`

### Planetary Archaeology

- [Archaeology module](https://github.com/iamdevdhanush/afterlight/blob/master/src/modules/planetary-archaeology/components/PlanetaryArchaeologyModule.tsx): `src/modules/planetary-archaeology/components/PlanetaryArchaeologyModule.tsx`
- [Planetary site catalog](https://github.com/iamdevdhanush/afterlight/blob/master/src/modules/planetary-archaeology/data/planetarySites.ts): `src/modules/planetary-archaeology/data/planetarySites.ts`
- [Site search](https://github.com/iamdevdhanush/afterlight/blob/master/src/modules/planetary-archaeology/components/PlanetarySearch.tsx): `src/modules/planetary-archaeology/components/PlanetarySearch.tsx`
- [Site markers](https://github.com/iamdevdhanush/afterlight/blob/master/src/modules/planetary-archaeology/components/PlanetaryMarkers.tsx): `src/modules/planetary-archaeology/components/PlanetaryMarkers.tsx`
- [Hardware inspection](https://github.com/iamdevdhanush/afterlight/blob/master/src/modules/planetary-archaeology/components/HardwareInspectionStudio.tsx): `src/modules/planetary-archaeology/components/HardwareInspectionStudio.tsx`
- [NASA Trek imagery](https://github.com/iamdevdhanush/afterlight/blob/master/src/modules/planetary-archaeology/services/nasaTrekService.ts): `src/modules/planetary-archaeology/services/nasaTrekService.ts`

### Shared Experience Services

- [Experience state](https://github.com/iamdevdhanush/afterlight/blob/master/src/store/useExperienceStore.ts): `src/store/useExperienceStore.ts`
- [History navigation](https://github.com/iamdevdhanush/afterlight/blob/master/src/navigation/navigationController.ts): `src/navigation/navigationController.ts`
- [Curator narration](https://github.com/iamdevdhanush/afterlight/blob/master/src/audio/GuideVoiceEngine.ts): `src/audio/GuideVoiceEngine.ts`
- [Procedural sound](https://github.com/iamdevdhanush/afterlight/blob/master/src/audio/SoundManager.ts): `src/audio/SoundManager.ts`

### Access and Classroom

- [Teacher mode](https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/TeacherModeModal.tsx): `src/components/ui/TeacherModeModal.tsx`
- [Language support](https://github.com/iamdevdhanush/afterlight/blob/master/src/i18n/index.ts): `src/i18n/index.ts`
- [Screen-reader announcer](https://github.com/iamdevdhanush/afterlight/blob/master/src/components/ui/AriaLiveAnnouncer.tsx): `src/components/ui/AriaLiveAnnouncer.tsx`
- [2D archival fallback](https://github.com/iamdevdhanush/afterlight/blob/master/src/components/canvas/WebGLFallbackGallery.tsx): `src/components/canvas/WebGLFallbackGallery.tsx`
- [Offline cache](https://github.com/iamdevdhanush/afterlight/blob/master/public/sw.js): `public/sw.js`

### Other components

- **Museum visitor**
- **NASA data services**

## Connections

- Museum visitor → Experience router: opens (evidence: `README.md`)
- Experience router → Experience state: reads state (evidence: `src/App.tsx`)
- Experience router → Planetary scene: renders (evidence: `src/App.tsx`)
- Experience router → Arrival story: routes to (evidence: `src/App.tsx`)
- Arrival story → History navigation: advances via (evidence: `src/components/ui/ScreenArrival.tsx`)
- Arrival story → Procedural sound: plays cues (evidence: `src/components/ui/ScreenArrival.tsx`)
- Destination selection → Experience state: updates (evidence: `src/components/ui/ScreenDestinationSelect.tsx`)
- Destination selection → Destination profiles: reads profiles (evidence: `src/components/ui/ScreenDestinationSelect.tsx`)
- Artifact exhibition → Artifact archive: reads archive (evidence: `src/components/ui/ScreenExhibition.tsx`)
- Artifact exhibition → Destination profiles: reads profiles (evidence: `src/components/ui/ScreenExhibition.tsx`)
- Artifact exhibition → Surface map: offers map (evidence: `src/components/ui/ScreenExhibition.tsx`)
- Artifact details → Artifact archive: reads archive (evidence: `src/components/ui/ScreenArtifactDetails.tsx`)
- Artifact details → Curator narration: requests narration (evidence: `src/components/ui/ScreenArtifactDetails.tsx`)
- Documentary stories → Curator narration: requests narration (evidence: `src/components/ui/ScreenDocumentary.tsx`)
- Artifact legacy → Curator narration: requests narration (evidence: `src/components/ui/ScreenLegacy.tsx`)
- Experience state → History navigation: dispatches navigation (evidence: `src/store/useExperienceStore.ts`)
- Experience state → Procedural sound: plays cues (evidence: `src/store/useExperienceStore.ts`)
- Experience state → Curator narration: coordinates narration (evidence: `src/store/useExperienceStore.ts`)
- Curator narration → Procedural sound: uses audio engine (evidence: `src/audio/GuideVoiceEngine.ts`)
- Curator narration → NASA data services: speaks scripts
- Experience router → Archaeology module: routes to (evidence: `src/App.tsx`)
- Archaeology module → Planetary site catalog: browses sites
- Site search → Planetary site catalog: searches (evidence: `src/modules/planetary-archaeology/components/PlanetarySearch.tsx`)
- Site search → Site markers: filters markers (evidence: `src/modules/planetary-archaeology/components/PlanetarySearch.tsx`)
- Site markers → Planetary site catalog: uses site data
- Hardware inspection → Archaeology module: extends inspection
- Surface map → NASA data services: shows topography (evidence: `README.md`)
- NASA Trek imagery → NASA data services: requests imagery
- Experience router → Teacher mode: mounts mode (evidence: `src/App.tsx`)
- Experience router → Screen-reader announcer: renders (evidence: `src/App.tsx`)
- Experience router → 2D archival fallback: uses on WebGL failure (evidence: `src/App.tsx`)
- Language support → Museum visitor: localizes interface
- Offline cache → Museum visitor: caches for offline (evidence: `README.md`)
- 2D archival fallback → Planetary site catalog: uses site content (evidence: `src/components/canvas/WebGLFallbackGallery.tsx`)
- Free exploration → Experience state: uses experience state (evidence: `src/components/ui/ScreenExplorationUI.tsx`)
- Artifact exhibition → History navigation: uses history navigation (evidence: `src/components/ui/ScreenExhibition.tsx`)
