# betaflight/betaflight-configurator architecture

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

- Interactive diagram: https://gitdiagram.com/betaflight/betaflight-configurator
- Repository: https://github.com/betaflight/betaflight-configurator

## Overview

Betaflight App is a cross-platform flight-controller configuration and management application. The main workflow is to connect to a controller, exchange MSP commands and state, then use configuration tabs to inspect or change settings; other major branches include firmware flashing and Blackbox log analysis. The README documents the PWA and Android wrapper, while source-index references and excerpts establish only selected internal calls. Several feature directories are unsampled, so their internals and connections are intentionally left unspecified.

Main entry points: [`src/App.vue`](https://github.com/betaflight/betaflight-configurator/blob/master/src/App.vue) (App shell), [`src/stores/connection.ts`](https://github.com/betaflight/betaflight-configurator/blob/master/src/stores/connection.ts) (Connection state), [`src/js/msp.ts`](https://github.com/betaflight/betaflight-configurator/blob/master/src/js/msp.ts) (MSP transport), [`src/components/tabs`](https://github.com/betaflight/betaflight-configurator/tree/master/src/components/tabs) (Configuration features)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application shell"]
  node_app["App shell<br/>[App.vue]"]
  node_connect_ui["Device picker<br/>[ConnectButton.vue]"]
end

subgraph group_connection["Device connectivity"]
  node_connection_state["Connection state<br/>[connection.ts]"]
  node_device_handler["Device handling<br/>[device_handler.ts]"]
  node_transport["Serial backends<br/>[serial_backend.ts]"]
  node_protocols["Device protocols<br/>[devices.ts]"]
  node_msp["MSP transport<br/>[msp.ts]"]
  node_msp_codes["MSP codes<br/>[MSPCodes.ts]"]
  node_msp_helper["MSP codecs<br/>[MSPHelper.ts]"]
end

subgraph group_configuration["Controller management"]
  node_fc_state["Controller state<br/>[fc.ts]"]
  node_config_tabs["Configuration features"]
  node_cli["CLI session"]
  node_firmware["Firmware flashing"]
end

subgraph group_blackbox["Blackbox analysis"]
  node_blackbox_ui["Blackbox viewer<br/>[App.vue]"]
  node_log_store["Flight log state<br/>[log.ts]"]
  node_flightlog["Log parser<br/>[flightlog.ts]"]
  node_graph_store["Graph state<br/>[graph.ts]"]
  node_graphing["Graph rendering<br/>[grapher.ts]"]
end

subgraph group_platform["Platform bridges"]
  node_native_shell["Android wrapper<br/>[MainActivity.java]"]
  node_native_plugins["Native plugins"]
  node_tauri["Desktop bridges<br/>[lib.rs]"]
end

node_pilot(("App user"))

node_pilot -->|"uses"| node_app
node_app -->|"renders"| node_connect_ui
node_app -->|"reads state"| node_connection_state
node_connect_ui -.->|"initiates connection"| node_connection_state
node_connection_state -->|"uses"| node_device_handler
node_connection_state -->|"uses"| node_msp
node_msp -.->|"uses transport"| node_transport
node_msp -.->|"dispatches commands"| node_msp_codes
node_msp_helper -->|"updates state"| node_fc_state
node_msp_helper -->|"encodes commands"| node_msp_codes
node_app -.->|"hosts tabs"| node_config_tabs
node_config_tabs -.->|"requests controller data"| node_msp
node_config_tabs -.->|"uses controller state"| node_fc_state
node_cli -->|"checks version"| node_fc_state
node_cli -->|"schedules reconnect"| node_transport
node_app -.->|"opens viewer"| node_blackbox_ui
node_blackbox_ui -->|"uses log state"| node_log_store
node_log_store -->|"parses logs"| node_flightlog
node_blackbox_ui -->|"uses graph state"| node_graph_store
node_graph_store -->|"reads log state"| node_log_store
node_graph_store -->|"registers renderer"| node_graphing
node_app -->|"runs as wrapper"| node_native_shell
node_native_shell -->|"registers plugins"| node_native_plugins
node_tauri -.->|"provides bridges"| node_protocols

click node_app "https://github.com/betaflight/betaflight-configurator/blob/master/src/App.vue"
click node_connect_ui "https://github.com/betaflight/betaflight-configurator/blob/master/src/components/device-picker/ConnectButton.vue"
click node_connection_state "https://github.com/betaflight/betaflight-configurator/blob/master/src/stores/connection.ts"
click node_device_handler "https://github.com/betaflight/betaflight-configurator/blob/master/src/js/device_handler.ts"
click node_transport "https://github.com/betaflight/betaflight-configurator/blob/master/src/js/serial_backend.ts"
click node_protocols "https://github.com/betaflight/betaflight-configurator/blob/master/src/js/protocols/devices.ts"
click node_msp "https://github.com/betaflight/betaflight-configurator/blob/master/src/js/msp.ts"
click node_msp_codes "https://github.com/betaflight/betaflight-configurator/blob/master/src/js/msp/MSPCodes.ts"
click node_msp_helper "https://github.com/betaflight/betaflight-configurator/blob/master/src/js/msp/MSPHelper.ts"
click node_fc_state "https://github.com/betaflight/betaflight-configurator/blob/master/src/stores/fc.ts"
click node_config_tabs "https://github.com/betaflight/betaflight-configurator/tree/master/src/components/tabs"
click node_cli "https://github.com/betaflight/betaflight-configurator/blob/master/src/composables/useMspCliSession.ts"
click node_firmware "https://github.com/betaflight/betaflight-configurator/blob/master/src/composables/useFirmwareFlashing.ts"
click node_blackbox_ui "https://github.com/betaflight/betaflight-configurator/blob/master/src/blackbox-viewer/App.vue"
click node_log_store "https://github.com/betaflight/betaflight-configurator/blob/master/src/blackbox-viewer/stores/log.ts"
click node_flightlog "https://github.com/betaflight/betaflight-configurator/blob/master/src/blackbox-viewer/flightlog.ts"
click node_graph_store "https://github.com/betaflight/betaflight-configurator/blob/master/src/blackbox-viewer/stores/graph.ts"
click node_graphing "https://github.com/betaflight/betaflight-configurator/blob/master/src/blackbox-viewer/grapher.ts"
click node_native_shell "https://github.com/betaflight/betaflight-configurator/blob/master/android/app/src/main/java/betaflight/app/MainActivity.java"
click node_native_plugins "https://github.com/betaflight/betaflight-configurator/blob/master/android/app/src/main/java/betaflight/app/protocols/serial/BetaflightSerialPlugin.java"
click node_tauri "https://github.com/betaflight/betaflight-configurator/blob/master/src-tauri/src/lib.rs"

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_connect_ui,node_pilot toneBlue
class node_connection_state,node_device_handler,node_transport,node_protocols,node_msp,node_msp_codes,node_msp_helper toneAmber
class node_fc_state,node_config_tabs,node_cli,node_firmware toneMint
class node_blackbox_ui,node_log_store,node_flightlog,node_graph_store,node_graphing toneRose
class node_native_shell,node_native_plugins,node_tauri toneIndigo
```

## Components

### Application shell

- [App shell](https://github.com/betaflight/betaflight-configurator/blob/master/src/App.vue): `src/App.vue`
- [Device picker](https://github.com/betaflight/betaflight-configurator/blob/master/src/components/device-picker/ConnectButton.vue): `src/components/device-picker/ConnectButton.vue`

### Device connectivity

- [Connection state](https://github.com/betaflight/betaflight-configurator/blob/master/src/stores/connection.ts): `src/stores/connection.ts`
- [Device handling](https://github.com/betaflight/betaflight-configurator/blob/master/src/js/device_handler.ts): `src/js/device_handler.ts`
- [Serial backends](https://github.com/betaflight/betaflight-configurator/blob/master/src/js/serial_backend.ts): `src/js/serial_backend.ts`
- [Device protocols](https://github.com/betaflight/betaflight-configurator/blob/master/src/js/protocols/devices.ts): `src/js/protocols/devices.ts`
- [MSP transport](https://github.com/betaflight/betaflight-configurator/blob/master/src/js/msp.ts): `src/js/msp.ts`
- [MSP codes](https://github.com/betaflight/betaflight-configurator/blob/master/src/js/msp/MSPCodes.ts): `src/js/msp/MSPCodes.ts`
- [MSP codecs](https://github.com/betaflight/betaflight-configurator/blob/master/src/js/msp/MSPHelper.ts): `src/js/msp/MSPHelper.ts`

### Controller management

- [Controller state](https://github.com/betaflight/betaflight-configurator/blob/master/src/stores/fc.ts): `src/stores/fc.ts`
- [Configuration features](https://github.com/betaflight/betaflight-configurator/tree/master/src/components/tabs): `src/components/tabs`
- [CLI session](https://github.com/betaflight/betaflight-configurator/blob/master/src/composables/useMspCliSession.ts): `src/composables/useMspCliSession.ts`
- [Firmware flashing](https://github.com/betaflight/betaflight-configurator/blob/master/src/composables/useFirmwareFlashing.ts): `src/composables/useFirmwareFlashing.ts`

### Blackbox analysis

- [Blackbox viewer](https://github.com/betaflight/betaflight-configurator/blob/master/src/blackbox-viewer/App.vue): `src/blackbox-viewer/App.vue`
- [Flight log state](https://github.com/betaflight/betaflight-configurator/blob/master/src/blackbox-viewer/stores/log.ts): `src/blackbox-viewer/stores/log.ts`
- [Log parser](https://github.com/betaflight/betaflight-configurator/blob/master/src/blackbox-viewer/flightlog.ts): `src/blackbox-viewer/flightlog.ts`
- [Graph state](https://github.com/betaflight/betaflight-configurator/blob/master/src/blackbox-viewer/stores/graph.ts): `src/blackbox-viewer/stores/graph.ts`
- [Graph rendering](https://github.com/betaflight/betaflight-configurator/blob/master/src/blackbox-viewer/grapher.ts): `src/blackbox-viewer/grapher.ts`

### Platform bridges

- [Android wrapper](https://github.com/betaflight/betaflight-configurator/blob/master/android/app/src/main/java/betaflight/app/MainActivity.java): `android/app/src/main/java/betaflight/app/MainActivity.java`
- [Native plugins](https://github.com/betaflight/betaflight-configurator/blob/master/android/app/src/main/java/betaflight/app/protocols/serial/BetaflightSerialPlugin.java): `android/app/src/main/java/betaflight/app/protocols/serial/BetaflightSerialPlugin.java`
- [Desktop bridges](https://github.com/betaflight/betaflight-configurator/blob/master/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`

### Other components

- **App user**

## Connections

- App user → App shell: uses (evidence: `README.md`)
- App shell → Device picker: renders (evidence: `src/App.vue`)
- App shell → Connection state: reads state (evidence: `src/App.vue`)
- Device picker → Connection state: initiates connection
- Connection state → Device handling: uses (evidence: `src/stores/connection.ts`)
- Connection state → MSP transport: uses (evidence: `src/stores/connection.ts`)
- MSP transport → Serial backends: uses transport
- MSP transport → MSP codes: dispatches commands
- MSP codecs → Controller state: updates state (evidence: `src/js/msp/MSPHelper.ts`)
- MSP codecs → MSP codes: encodes commands (evidence: `src/js/msp/MSPHelper.ts`)
- App shell → Configuration features: hosts tabs
- Configuration features → MSP transport: requests controller data
- Configuration features → Controller state: uses controller state
- CLI session → Controller state: checks version (evidence: `src/composables/useMspCliSession.ts`)
- CLI session → Serial backends: schedules reconnect (evidence: `src/composables/useMspCliSession.ts`)
- App shell → Blackbox viewer: opens viewer
- Blackbox viewer → Flight log state: uses log state (evidence: `src/blackbox-viewer/App.vue`)
- Flight log state → Log parser: parses logs (evidence: `src/blackbox-viewer/stores/log.ts`)
- Blackbox viewer → Graph state: uses graph state (evidence: `src/blackbox-viewer/App.vue`)
- Graph state → Flight log state: reads log state (evidence: `src/blackbox-viewer/stores/graph.ts`)
- Graph state → Graph rendering: registers renderer (evidence: `src/blackbox-viewer/stores/graph.ts`)
- App shell → Android wrapper: runs as wrapper (evidence: `README.md`)
- Android wrapper → Native plugins: registers plugins (evidence: `android/app/src/main/java/betaflight/app/MainActivity.java`)
- Desktop bridges → Device protocols: provides bridges
