# simachines/motorbuster architecture

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

- Interactive diagram: https://gitdiagram.com/simachines/motorbuster
- Repository: https://github.com/simachines/motorbuster

## Overview

MotorBuster is a haptic-effect composition and hardware-testing toolkit. The documented workflow is to connect a controller, compose and edit effects on a timeline, then play the sequence through a haptic device; projects can also be saved and loaded. The graph includes the documented editor capabilities and the sampled WebSocket-to-engine command path. The main UI and native application source were not sampled, so links from the UI to the server are shown as unverified rather than asserted.

Main entry points: [`client/src/App.jsx`](https://github.com/simachines/motorbuster/blob/main/client/src/App.jsx) (Haptic Editor), [`server/main.py`](https://github.com/simachines/motorbuster/blob/main/server/main.py) (Command Dispatch), [`server/ffb_engine.py`](https://github.com/simachines/motorbuster/blob/main/server/ffb_engine.py) (FFB Engine), [`inspector_panel.py`](https://github.com/simachines/motorbuster/blob/main/inspector_panel.py) (Clip Inspector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_composition["Composition and Editing"]
  node_editor["Haptic Editor<br/>[App.jsx]"]
  node_timeline["Clip Timeline<br/>[App.jsx]"]
  node_effect_library["Effect Library<br/>[App.jsx]"]
  node_inspector["Clip Inspector<br/>[inspector_panel.py]"]
  node_native_app["Native Application<br/>[native_app.py]"]
end

subgraph group_runtime["Playback Runtime"]
  node_server["WebSocket Server<br/>[main.py]"]
  node_dispatch["Command Dispatch<br/>[main.py]"]
  node_engine["FFB Engine<br/>[ffb_engine.py]"]
end

subgraph group_device["Device Support"]
  node_device{{"Haptic Controller"}}
end

subgraph group_projects["Project Files"]
  node_project_files["Project Files<br/>[App.jsx]"]
end

node_user(("Composer"))
node_browser(("Browser UI"))

node_user -->|"composes"| node_editor
node_editor -->|"arranges clips"| node_timeline
node_editor -->|"selects effects"| node_effect_library
node_user -->|"edits parameters"| node_inspector
node_editor -->|"saves and loads"| node_project_files
node_browser -->|"opens app"| node_server
node_browser -.->|"sends commands"| node_dispatch
node_server -->|"routes commands"| node_dispatch
node_dispatch -->|"calls playback"| node_engine
node_engine -.->|"drives effects"| node_device
node_user -.->|"launches"| node_native_app

click node_editor "https://github.com/simachines/motorbuster/blob/main/client/src/App.jsx"
click node_timeline "https://github.com/simachines/motorbuster/blob/main/client/src/App.jsx"
click node_effect_library "https://github.com/simachines/motorbuster/blob/main/client/src/App.jsx"
click node_inspector "https://github.com/simachines/motorbuster/blob/main/inspector_panel.py"
click node_project_files "https://github.com/simachines/motorbuster/blob/main/client/src/App.jsx"
click node_server "https://github.com/simachines/motorbuster/blob/main/server/main.py"
click node_dispatch "https://github.com/simachines/motorbuster/blob/main/server/main.py"
click node_engine "https://github.com/simachines/motorbuster/blob/main/server/ffb_engine.py"
click node_native_app "https://github.com/simachines/motorbuster/blob/main/native_app.py"

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_editor,node_timeline,node_effect_library,node_inspector,node_native_app,node_browser toneBlue
class node_server,node_dispatch,node_engine toneAmber
class node_device toneMint
class node_project_files toneRose
class node_user toneIndigo
```

## Components

### Composition and Editing

- [Haptic Editor](https://github.com/simachines/motorbuster/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Clip Timeline](https://github.com/simachines/motorbuster/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Effect Library](https://github.com/simachines/motorbuster/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Clip Inspector](https://github.com/simachines/motorbuster/blob/main/inspector_panel.py): `inspector_panel.py`
- [Native Application](https://github.com/simachines/motorbuster/blob/main/native_app.py): `native_app.py`

### Playback Runtime

- [WebSocket Server](https://github.com/simachines/motorbuster/blob/main/server/main.py): `server/main.py`
- [Command Dispatch](https://github.com/simachines/motorbuster/blob/main/server/main.py): `server/main.py`
- [FFB Engine](https://github.com/simachines/motorbuster/blob/main/server/ffb_engine.py): `server/ffb_engine.py`

### Device Support

- **Haptic Controller**

### Project Files

- [Project Files](https://github.com/simachines/motorbuster/blob/main/client/src/App.jsx): `client/src/App.jsx`

### Other components

- **Composer**
- **Browser UI**

## Connections

- Composer → Haptic Editor: composes
- Haptic Editor → Clip Timeline: arranges clips
- Haptic Editor → Effect Library: selects effects
- Composer → Clip Inspector: edits parameters
- Haptic Editor → Project Files: saves and loads
- Browser UI → WebSocket Server: opens app (evidence: `server/main.py`)
- Browser UI → Command Dispatch: sends commands
- WebSocket Server → Command Dispatch: routes commands (evidence: `server/main.py`)
- Command Dispatch → FFB Engine: calls playback (evidence: `server/main.py`)
- FFB Engine → Haptic Controller: drives effects
- Composer → Native Application: launches
