# vela604/project-falcon-9 architecture

> Architecture diagram of the GitHub repository vela604/project-falcon-9, 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/vela604/project-falcon-9
- Repository: https://github.com/vela604/project-falcon-9

## Overview

Project Falcon 9 is a browser-based rocket design and flight-simulation application. Its main user workflow is to manage a vehicle fleet, configure and run a mission simulation, then inspect rendered flight state and telemetry. The tree also contains guidance authoring and an Atlas Prism tuning engine; the README provides no capability detail, so those areas are represented from the source index and sampled excerpts. Several source files are unsampled, so their internal relationships are not inferred.

Main entry points: [`js/simJs/threads/render.worker.js`](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/threads/render.worker.js) (Render worker), [`js/simJs/main.js`](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/main.js) (Simulation bootstrap), [`js/fleet.js`](https://github.com/vela604/project-falcon-9/blob/main/js/fleet.js) (Fleet data), [`js/rockets-ui.js`](https://github.com/vela604/project-falcon-9/blob/main/js/rockets-ui.js) (Fleet editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_fleet["Vehicle fleet"]
  node_fleet_data[("Fleet data<br/>[fleet.js]")]
  node_vehicle_logic["Vehicle core<br/>[rockets-core.js]"]
  node_fleet_ui["Fleet editor<br/>[rockets-ui.js]"]
  node_components["Component library"]
end

subgraph group_simulation["Flight simulation"]
  node_sim_main["Simulation bootstrap<br/>[main.js]"]
  node_physics["Physics engine<br/>[physics.js]"]
  node_vehicle_model["Vehicle model<br/>[vehicle.js]"]
  node_environment["Environment<br/>[environment.js]"]
  node_collision["Collision model<br/>[collision.js]"]
  node_trajectory_math["Trajectory math<br/>[trajectoryMath.js]"]
  node_state_buffer["State buffers<br/>[stateBuffer.js]"]
  node_physics_worker["Physics worker<br/>[physics.worker.js]"]
  node_render_worker["Render worker<br/>[render.worker.js]"]
  node_render["Flight renderer<br/>[render.js]"]
  node_controls["Flight controls<br/>[controls.js]"]
  node_rocket_art["Rocket visuals<br/>[rocketArt.js]"]
end

subgraph group_guidance["Guidance system"]
  node_guidance["Guidance runtime<br/>[guidance.js]"]
  node_guidance_blocks["Guidance blocks<br/>[guidance-blocks.js]"]
  node_derivation["Vehicle derivation<br/>[derivation.js]"]
  node_guidance_worker["Guidance worker<br/>[guidance.worker.js]"]
  node_presets["Guide presets<br/>[guidancePresets.js]"]
  node_preset_page["Preset editor"]
  node_experiments["Guidance experiments"]
end

subgraph group_tuning["Atlas Prism tuning"]
  node_tuner_ui["Tuner interface<br/>[engine-fx.js]"]
  node_tuner_pool["Worker pool<br/>[worker-pool.js]"]
  node_tuner_sim["Worker simulation<br/>[worker-sim.js]"]
  node_tuner_hook["Evaluation hooks<br/>[hook.js]"]
  node_tuner_lattice["Search lattice<br/>[lattice.js]"]
  node_tuner_scan["Bias scan<br/>[bias-scan.js]"]
end

node_user(("Engineer"))

node_user -->|"edits fleet"| node_fleet_ui
node_fleet_ui -->|"manages records"| node_fleet_data
node_user -->|"runs mission"| node_sim_main
node_sim_main -->|"starts worker"| node_physics_worker
node_sim_main -->|"starts worker"| node_render_worker
node_sim_main -->|"spawns worker"| node_guidance_worker
node_render_worker -->|"loads renderer"| node_render
node_render_worker -->|"loads visuals"| node_rocket_art
node_render_worker -->|"loads math"| node_trajectory_math
node_render_worker -->|"loads environment"| node_environment
node_render_worker -->|"loads vehicle"| node_vehicle_model
node_render_worker -->|"loads buffers"| node_state_buffer
node_render_worker -->|"loads physics"| node_physics
node_render_worker -->|"loads collisions"| node_collision
node_fleet_data -->|"provides fleet data"| node_vehicle_logic
node_fleet_data -.->|"uses component types"| node_components
node_user -.->|"edits guides"| node_preset_page
node_preset_page -.->|"uses presets"| node_presets
node_user -.->|"monitors tuning"| node_tuner_ui
node_tuner_pool -->|"dispatches jobs"| node_tuner_sim
node_tuner_sim -->|"evaluates jobs"| node_tuner_hook

click node_fleet_data "https://github.com/vela604/project-falcon-9/blob/main/js/fleet.js"
click node_vehicle_logic "https://github.com/vela604/project-falcon-9/blob/main/js/rockets-core.js"
click node_fleet_ui "https://github.com/vela604/project-falcon-9/blob/main/js/rockets-ui.js"
click node_components "https://github.com/vela604/project-falcon-9/blob/main/js/componentLibrary.js"
click node_sim_main "https://github.com/vela604/project-falcon-9/blob/main/js/simJs/main.js"
click node_physics "https://github.com/vela604/project-falcon-9/blob/main/js/simJs/core/physics.js"
click node_vehicle_model "https://github.com/vela604/project-falcon-9/blob/main/js/simJs/core/vehicle.js"
click node_environment "https://github.com/vela604/project-falcon-9/blob/main/js/simJs/core/environment.js"
click node_collision "https://github.com/vela604/project-falcon-9/blob/main/js/simJs/core/collision.js"
click node_trajectory_math "https://github.com/vela604/project-falcon-9/blob/main/js/simJs/core/trajectoryMath.js"
click node_state_buffer "https://github.com/vela604/project-falcon-9/blob/main/js/simJs/core/stateBuffer.js"
click node_physics_worker "https://github.com/vela604/project-falcon-9/blob/main/js/simJs/threads/physics.worker.js"
click node_render_worker "https://github.com/vela604/project-falcon-9/blob/main/js/simJs/threads/render.worker.js"
click node_render "https://github.com/vela604/project-falcon-9/blob/main/js/simJs/view/render.js"
click node_controls "https://github.com/vela604/project-falcon-9/blob/main/js/simJs/view/controls.js"
click node_rocket_art "https://github.com/vela604/project-falcon-9/blob/main/js/simJs/view/rocketArt.js"
click node_guidance "https://github.com/vela604/project-falcon-9/blob/main/js/simJs/guidance/guidance.js"
click node_guidance_blocks "https://github.com/vela604/project-falcon-9/blob/main/js/simJs/guidance/guidance-blocks.js"
click node_derivation "https://github.com/vela604/project-falcon-9/blob/main/js/simJs/guidance/derivation.js"
click node_guidance_worker "https://github.com/vela604/project-falcon-9/blob/main/js/simJs/threads/guidance.worker.js"
click node_presets "https://github.com/vela604/project-falcon-9/blob/main/js/guidancePresets.js"
click node_preset_page "https://github.com/vela604/project-falcon-9/blob/main/js/guidancePresetsPage.js"
click node_experiments "https://github.com/vela604/project-falcon-9/blob/main/js/simJs/guidance/guidance-experiments.js"
click node_tuner_ui "https://github.com/vela604/project-falcon-9/blob/main/atlas-prism/standard/visJs/engine-fx.js"
click node_tuner_pool "https://github.com/vela604/project-falcon-9/blob/main/atlas-prism/lib/worker-pool.js"
click node_tuner_sim "https://github.com/vela604/project-falcon-9/blob/main/atlas-prism/lib/worker-sim.js"
click node_tuner_hook "https://github.com/vela604/project-falcon-9/blob/main/atlas-prism/lib/hook.js"
click node_tuner_lattice "https://github.com/vela604/project-falcon-9/blob/main/atlas-prism/lib/lattice.js"
click node_tuner_scan "https://github.com/vela604/project-falcon-9/blob/main/atlas-prism/lib/bias-scan.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_fleet_data,node_vehicle_logic,node_fleet_ui,node_components toneBlue
class node_sim_main,node_physics,node_vehicle_model,node_environment,node_collision,node_trajectory_math,node_state_buffer,node_physics_worker,node_render_worker,node_render,node_controls,node_rocket_art toneAmber
class node_guidance,node_guidance_blocks,node_derivation,node_guidance_worker,node_presets,node_preset_page,node_experiments toneMint
class node_tuner_ui,node_tuner_pool,node_tuner_sim,node_tuner_hook,node_tuner_lattice,node_tuner_scan toneRose
class node_user toneIndigo
```

## Components

### Vehicle fleet

- [Fleet data](https://github.com/vela604/project-falcon-9/blob/main/js/fleet.js): `js/fleet.js`
- [Vehicle core](https://github.com/vela604/project-falcon-9/blob/main/js/rockets-core.js): `js/rockets-core.js`
- [Fleet editor](https://github.com/vela604/project-falcon-9/blob/main/js/rockets-ui.js): `js/rockets-ui.js`
- [Component library](https://github.com/vela604/project-falcon-9/blob/main/js/componentLibrary.js): `js/componentLibrary.js`

### Flight simulation

- [Simulation bootstrap](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/main.js): `js/simJs/main.js`
- [Physics engine](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/core/physics.js): `js/simJs/core/physics.js`
- [Vehicle model](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/core/vehicle.js): `js/simJs/core/vehicle.js`
- [Environment](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/core/environment.js): `js/simJs/core/environment.js`
- [Collision model](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/core/collision.js): `js/simJs/core/collision.js`
- [Trajectory math](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/core/trajectoryMath.js): `js/simJs/core/trajectoryMath.js`
- [State buffers](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/core/stateBuffer.js): `js/simJs/core/stateBuffer.js`
- [Physics worker](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/threads/physics.worker.js): `js/simJs/threads/physics.worker.js`
- [Render worker](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/threads/render.worker.js): `js/simJs/threads/render.worker.js`
- [Flight renderer](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/view/render.js): `js/simJs/view/render.js`
- [Flight controls](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/view/controls.js): `js/simJs/view/controls.js`
- [Rocket visuals](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/view/rocketArt.js): `js/simJs/view/rocketArt.js`

### Guidance system

- [Guidance runtime](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/guidance/guidance.js): `js/simJs/guidance/guidance.js`
- [Guidance blocks](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/guidance/guidance-blocks.js): `js/simJs/guidance/guidance-blocks.js`
- [Vehicle derivation](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/guidance/derivation.js): `js/simJs/guidance/derivation.js`
- [Guidance worker](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/threads/guidance.worker.js): `js/simJs/threads/guidance.worker.js`
- [Guide presets](https://github.com/vela604/project-falcon-9/blob/main/js/guidancePresets.js): `js/guidancePresets.js`
- [Preset editor](https://github.com/vela604/project-falcon-9/blob/main/js/guidancePresetsPage.js): `js/guidancePresetsPage.js`
- [Guidance experiments](https://github.com/vela604/project-falcon-9/blob/main/js/simJs/guidance/guidance-experiments.js): `js/simJs/guidance/guidance-experiments.js`

### Atlas Prism tuning

- [Tuner interface](https://github.com/vela604/project-falcon-9/blob/main/atlas-prism/standard/visJs/engine-fx.js): `atlas-prism/standard/visJs/engine-fx.js`
- [Worker pool](https://github.com/vela604/project-falcon-9/blob/main/atlas-prism/lib/worker-pool.js): `atlas-prism/lib/worker-pool.js`
- [Worker simulation](https://github.com/vela604/project-falcon-9/blob/main/atlas-prism/lib/worker-sim.js): `atlas-prism/lib/worker-sim.js`
- [Evaluation hooks](https://github.com/vela604/project-falcon-9/blob/main/atlas-prism/lib/hook.js): `atlas-prism/lib/hook.js`
- [Search lattice](https://github.com/vela604/project-falcon-9/blob/main/atlas-prism/lib/lattice.js): `atlas-prism/lib/lattice.js`
- [Bias scan](https://github.com/vela604/project-falcon-9/blob/main/atlas-prism/lib/bias-scan.js): `atlas-prism/lib/bias-scan.js`

### Other components

- **Engineer**

## Connections

- Engineer → Fleet editor: edits fleet (evidence: `js/rockets-ui.js`)
- Fleet editor → Fleet data: manages records (evidence: `js/rockets-ui.js`)
- Engineer → Simulation bootstrap: runs mission (evidence: `js/simJs/main.js`)
- Simulation bootstrap → Physics worker: starts worker (evidence: `js/simJs/main.js`)
- Simulation bootstrap → Render worker: starts worker (evidence: `js/simJs/main.js`)
- Simulation bootstrap → Guidance worker: spawns worker (evidence: `js/simJs/main.js`)
- Render worker → Flight renderer: loads renderer (evidence: `js/simJs/threads/render.worker.js`)
- Render worker → Rocket visuals: loads visuals (evidence: `js/simJs/threads/render.worker.js`)
- Render worker → Trajectory math: loads math (evidence: `js/simJs/threads/render.worker.js`)
- Render worker → Environment: loads environment (evidence: `js/simJs/threads/render.worker.js`)
- Render worker → Vehicle model: loads vehicle (evidence: `js/simJs/threads/render.worker.js`)
- Render worker → State buffers: loads buffers (evidence: `js/simJs/threads/render.worker.js`)
- Render worker → Physics engine: loads physics (evidence: `js/simJs/threads/render.worker.js`)
- Render worker → Collision model: loads collisions (evidence: `js/simJs/threads/render.worker.js`)
- Fleet data → Vehicle core: provides fleet data (evidence: `js/fleet.js`)
- Fleet data → Component library: uses component types
- Engineer → Preset editor: edits guides
- Preset editor → Guide presets: uses presets
- Engineer → Tuner interface: monitors tuning
- Worker pool → Worker simulation: dispatches jobs (evidence: `atlas-prism/lib/worker-pool.js`)
- Worker simulation → Evaluation hooks: evaluates jobs (evidence: `atlas-prism/lib/worker-sim.js`)
