# notfeylo/propwash architecture

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

## Overview

PROPWASH is a browser-based FPV drone simulator. The principal workflow is: a pilot supplies keyboard, gamepad, or radio controls; the app sends them through a flight controller into the fixed-step flight simulation; the resulting flight drives the drone, camera views, audio, and on-screen displays. Recordings can be replayed deterministically, while blackbox data supports Flight Lab analysis and CSV export or real-log import. The README documents several capabilities whose wiring is not shown in the sampled excerpts, so only documented or source-supported relationships are drawn.

Main entry points: [`src/app/App.ts`](https://github.com/notfeylo/propwash/blob/main/src/app/App.ts) (App Orchestrator), [`src/sim/flight/FlightSim.ts`](https://github.com/notfeylo/propwash/blob/main/src/sim/flight/FlightSim.ts) (Flight Simulator), [`src/ui/FlightLabPanel.ts`](https://github.com/notfeylo/propwash/blob/main/src/ui/FlightLabPanel.ts) (Flight Lab), [`src/input/InputManager.ts`](https://github.com/notfeylo/propwash/blob/main/src/input/InputManager.ts) (Input Manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Pilot Interface"]
  node_app["App Orchestrator<br/>[App.ts]"]
  node_input["Input Manager<br/>[InputManager.ts]"]
  node_controls["Flight Controls<br/>[SettingsPanel.ts]"]
  node_hud["Flight UI<br/>[Hud.ts]"]
  node_flightlab["Flight Lab<br/>[FlightLabPanel.ts]"]
end

subgraph group_simulation["Flight Simulation"]
  node_sim["Flight Simulator<br/>[FlightSim.ts]"]
  node_fc["Flight Controller"]
  node_powertrain["Powertrain<br/>[Powertrain.ts]"]
  node_airframes["Airframe Config<br/>[index.ts]"]
  node_world["Field And Terrain<br/>[fieldLayout.ts]"]
  node_rapier["Rapier Physics"]
end

subgraph group_flightdata["Flight Data"]
  node_blackbox["Blackbox<br/>[blackbox.ts]"]
  node_recorder["Flight Recorder<br/>[recorder.ts]"]
  node_csv["Log Import Export<br/>[blackbox.ts]"]
end

subgraph group_visuals["Visual Output"]
  node_drone["Drone Model<br/>[DroneModel.ts]"]
  node_cameras["Camera Director<br/>[CameraDirector.ts]"]
  node_render["Render Pipeline<br/>[pipeline.ts]"]
  node_fieldrender["World Rendering<br/>[field.ts]"]
end

subgraph group_audio["Audio"]
  node_audioengine["Audio Engine<br/>[AudioEngine.ts]"]
  node_audioinput["Web Audio"]
end

node_pilot(("Pilot"))

node_pilot -->|"provides controls"| node_input
node_input -->|"supplies control state"| node_app
node_pilot -->|"adjusts settings"| node_controls
node_controls -->|"updates settings"| node_app
node_app -->|"steps simulation"| node_sim
node_app -->|"applies FC settings"| node_fc
node_sim -->|"runs each step"| node_fc
node_sim -->|"models power"| node_powertrain
node_sim -->|"uses airframe"| node_airframes
node_sim -->|"uses field data"| node_world
node_sim -->|"steps rigid body"| node_rapier
node_app -->|"initializes physics"| node_rapier
node_app -->|"records flight"| node_blackbox
node_app -->|"records flight"| node_recorder
node_app -->|"imports real logs"| node_csv
node_flightlab -->|"requests log import"| node_app
node_app -->|"updates analysis"| node_flightlab
node_blackbox -->|"supplies flight data"| node_flightlab
node_recorder -->|"provides replay data"| node_app
node_sim -->|"supplies flight state"| node_drone
node_app -->|"updates camera view"| node_cameras
node_cameras -->|"selects camera look"| node_render
node_app -->|"renders frames"| node_render
node_sim -->|"supplies field state"| node_fieldrender
node_app -->|"renders field"| node_fieldrender
node_sim -->|"supplies flight audio state"| node_audioengine
node_audioengine -->|"outputs sound"| node_audioinput
node_app -->|"updates displays"| node_hud

click node_app "https://github.com/notfeylo/propwash/blob/main/src/app/App.ts"
click node_input "https://github.com/notfeylo/propwash/blob/main/src/input/InputManager.ts"
click node_controls "https://github.com/notfeylo/propwash/blob/main/src/ui/SettingsPanel.ts"
click node_hud "https://github.com/notfeylo/propwash/blob/main/src/ui/Hud.ts"
click node_flightlab "https://github.com/notfeylo/propwash/blob/main/src/ui/FlightLabPanel.ts"
click node_sim "https://github.com/notfeylo/propwash/blob/main/src/sim/flight/FlightSim.ts"
click node_fc "https://github.com/notfeylo/propwash/blob/main/src/sim/fc/FlightController.ts"
click node_powertrain "https://github.com/notfeylo/propwash/blob/main/src/sim/Powertrain.ts"
click node_airframes "https://github.com/notfeylo/propwash/blob/main/src/config/airframes/index.ts"
click node_world "https://github.com/notfeylo/propwash/blob/main/src/world/fieldLayout.ts"
click node_blackbox "https://github.com/notfeylo/propwash/blob/main/src/sim/blackbox.ts"
click node_recorder "https://github.com/notfeylo/propwash/blob/main/src/sim/recorder.ts"
click node_csv "https://github.com/notfeylo/propwash/blob/main/src/sim/blackbox.ts"
click node_drone "https://github.com/notfeylo/propwash/blob/main/src/drone/DroneModel.ts"
click node_cameras "https://github.com/notfeylo/propwash/blob/main/src/cameras/CameraDirector.ts"
click node_render "https://github.com/notfeylo/propwash/blob/main/src/render/pipeline.ts"
click node_fieldrender "https://github.com/notfeylo/propwash/blob/main/src/render/field.ts"
click node_audioengine "https://github.com/notfeylo/propwash/blob/main/src/audio/AudioEngine.ts"

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_input,node_controls,node_hud,node_flightlab toneBlue
class node_sim,node_fc,node_powertrain,node_airframes,node_world,node_rapier toneAmber
class node_blackbox,node_recorder,node_csv toneMint
class node_drone,node_cameras,node_render,node_fieldrender toneRose
class node_audioengine,node_audioinput,node_pilot toneIndigo
```

## Components

### Pilot Interface

- [App Orchestrator](https://github.com/notfeylo/propwash/blob/main/src/app/App.ts): `src/app/App.ts`
- [Input Manager](https://github.com/notfeylo/propwash/blob/main/src/input/InputManager.ts): `src/input/InputManager.ts`
- [Flight Controls](https://github.com/notfeylo/propwash/blob/main/src/ui/SettingsPanel.ts): `src/ui/SettingsPanel.ts`
- [Flight UI](https://github.com/notfeylo/propwash/blob/main/src/ui/Hud.ts): `src/ui/Hud.ts`
- [Flight Lab](https://github.com/notfeylo/propwash/blob/main/src/ui/FlightLabPanel.ts): `src/ui/FlightLabPanel.ts`

### Flight Simulation

- [Flight Simulator](https://github.com/notfeylo/propwash/blob/main/src/sim/flight/FlightSim.ts): `src/sim/flight/FlightSim.ts`
- [Flight Controller](https://github.com/notfeylo/propwash/blob/main/src/sim/fc/FlightController.ts): `src/sim/fc/FlightController.ts`
- [Powertrain](https://github.com/notfeylo/propwash/blob/main/src/sim/Powertrain.ts): `src/sim/Powertrain.ts`
- [Airframe Config](https://github.com/notfeylo/propwash/blob/main/src/config/airframes/index.ts): `src/config/airframes/index.ts`
- [Field And Terrain](https://github.com/notfeylo/propwash/blob/main/src/world/fieldLayout.ts): `src/world/fieldLayout.ts`
- **Rapier Physics**

### Flight Data

- [Blackbox](https://github.com/notfeylo/propwash/blob/main/src/sim/blackbox.ts): `src/sim/blackbox.ts`
- [Flight Recorder](https://github.com/notfeylo/propwash/blob/main/src/sim/recorder.ts): `src/sim/recorder.ts`
- [Log Import Export](https://github.com/notfeylo/propwash/blob/main/src/sim/blackbox.ts): `src/sim/blackbox.ts`

### Visual Output

- [Drone Model](https://github.com/notfeylo/propwash/blob/main/src/drone/DroneModel.ts): `src/drone/DroneModel.ts`
- [Camera Director](https://github.com/notfeylo/propwash/blob/main/src/cameras/CameraDirector.ts): `src/cameras/CameraDirector.ts`
- [Render Pipeline](https://github.com/notfeylo/propwash/blob/main/src/render/pipeline.ts): `src/render/pipeline.ts`
- [World Rendering](https://github.com/notfeylo/propwash/blob/main/src/render/field.ts): `src/render/field.ts`

### Audio

- [Audio Engine](https://github.com/notfeylo/propwash/blob/main/src/audio/AudioEngine.ts): `src/audio/AudioEngine.ts`
- **Web Audio**

### Other components

- **Pilot**

## Connections

- Pilot → Input Manager: provides controls
- Input Manager → App Orchestrator: supplies control state
- Pilot → Flight Controls: adjusts settings
- Flight Controls → App Orchestrator: updates settings
- App Orchestrator → Flight Simulator: steps simulation
- App Orchestrator → Flight Controller: applies FC settings
- Flight Simulator → Flight Controller: runs each step
- Flight Simulator → Powertrain: models power
- Flight Simulator → Airframe Config: uses airframe
- Flight Simulator → Field And Terrain: uses field data
- Flight Simulator → Rapier Physics: steps rigid body
- App Orchestrator → Rapier Physics: initializes physics
- App Orchestrator → Blackbox: records flight
- App Orchestrator → Flight Recorder: records flight
- App Orchestrator → Log Import Export: imports real logs
- Flight Lab → App Orchestrator: requests log import
- App Orchestrator → Flight Lab: updates analysis
- Blackbox → Flight Lab: supplies flight data
- Flight Recorder → App Orchestrator: provides replay data
- Flight Simulator → Drone Model: supplies flight state
- App Orchestrator → Camera Director: updates camera view
- Camera Director → Render Pipeline: selects camera look
- App Orchestrator → Render Pipeline: renders frames
- Flight Simulator → World Rendering: supplies field state
- App Orchestrator → World Rendering: renders field
- Flight Simulator → Audio Engine: supplies flight audio state
- Audio Engine → Web Audio: outputs sound
- App Orchestrator → Flight UI: updates displays
