# b14ckyy/kite-gc architecture

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

- Interactive diagram: https://gitdiagram.com/b14ckyy/kite-gc
- Repository: https://github.com/b14ckyy/kite-gc

## Overview

Kite Ground Control is a cross-platform ground station for INAV, ArduPilot, and PX4. A pilot uses the Svelte interface to connect to an aircraft, view and act on telemetry, plan missions, and control the vehicle; the Rust/Tauri backend handles links, autopilot protocols, and domain services. Major companion capabilities include flight logging, safety and airspace tools, radar, video, terrain awareness, and telemetry relay. The README documents these product relationships; source excerpts show selected backend and Android internals, so unsampled implementation links are not asserted.

Main entry points: [`src/routes/+page.svelte`](https://github.com/b14ckyy/kite-gc/blob/master/src/routes/%2Bpage.svelte) (Ground station UI), [`src-tauri/src/state.rs`](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/state.rs) (Shared application state), [`src-tauri/src/commands/mod.rs`](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/commands/mod.rs) (Tauri commands), [`src-tauri/src/transport/mod.rs`](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/transport/mod.rs) (Link transports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Pilot interface"]
  node_ui["Ground station UI<br/>[+page.svelte]"]
  node_connection_ui["Connection controls"]
  node_dashboard["Telemetry dashboard<br/>[Map.svelte]"]
end

subgraph group_flight["Aircraft link"]
  node_commands["Tauri commands<br/>[mod.rs]"]
  node_transports["Link transports<br/>[mod.rs]"]
  node_mavlink["MAVLink handler<br/>[handler.rs]"]
  node_passive["Passive telemetry<br/>[handler.rs]"]
  node_app_state["Shared application state<br/>[state.rs]"]
  node_scheduler["Telemetry and RC scheduler<br/>[telemetry.rs]"]
end

subgraph group_planning["Planning and safety"]
  node_mission["Mission planning<br/>[store.rs]"]
  node_safety["Geofence and airspace<br/>[fence.rs]"]
  node_radar["Foreign-vehicle radar<br/>[mod.rs]"]
end

subgraph group_operations["Flight services"]
  node_logbook["Flight logbook<br/>[recorder.rs]"]
  node_logdb[("Flight history store<br/>[db.rs]")]
  node_video["Live video<br/>[video.rs]"]
  node_relay["Telemetry relay<br/>[relay.rs]"]
  node_terrain["Terrain analysis<br/>[mod.rs]"]
end

subgraph group_platform["Platform integration"]
  node_android["Android platform services<br/>[MainActivity.kt]"]
  node_telemetry_api["Telemetry API<br/>[server.rs]"]
end

node_pilot(("Pilot"))
node_autopilot(("Autopilot"))

node_pilot -->|"uses"| node_ui
node_ui -->|"manages links"| node_connection_ui
node_connection_ui -->|"requests connection"| node_commands
node_commands -->|"opens link"| node_transports
node_transports -->|"exchanges bytes"| node_autopilot
node_autopilot -->|"streams telemetry"| node_mavlink
node_mavlink -->|"updates state"| node_app_state
node_transports -->|"feeds listen-only link"| node_passive
node_passive -->|"records telemetry"| node_logbook
node_app_state -->|"holds scheduler state"| node_scheduler
node_scheduler -->|"records flight data"| node_logbook
node_logbook -->|"persists flights"| node_logdb
node_app_state -.->|"stores mission state"| node_mission
node_ui -->|"plans missions"| node_mission
node_ui -->|"manages safety"| node_safety
node_ui -->|"views traffic"| node_radar
node_ui -->|"displays telemetry"| node_dashboard
node_ui -->|"views stream"| node_video
node_ui -->|"analyzes terrain"| node_terrain
node_app_state -->|"holds radar state"| node_radar
node_ui -->|"configures forwarding"| node_relay
node_ui -.->|"exposes telemetry"| node_telemetry_api
node_commands -->|"uses platform storage"| node_android

click node_ui "https://github.com/b14ckyy/kite-gc/blob/master/src/routes/%2Bpage.svelte"
click node_connection_ui "https://github.com/b14ckyy/kite-gc/blob/master/src/lib/controllers/connectionController.ts"
click node_dashboard "https://github.com/b14ckyy/kite-gc/blob/master/src/lib/components/Map.svelte"
click node_commands "https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/commands/mod.rs"
click node_transports "https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/transport/mod.rs"
click node_mavlink "https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/mavlink_proto/handler.rs"
click node_passive "https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/passive_telemetry/handler.rs"
click node_app_state "https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/state.rs"
click node_scheduler "https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/scheduler/telemetry.rs"
click node_mission "https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/mission/store.rs"
click node_safety "https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/commands/fence.rs"
click node_radar "https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/radar/mod.rs"
click node_logbook "https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/flightlog/recorder.rs"
click node_logdb "https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/flightlog/db.rs"
click node_video "https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/commands/video.rs"
click node_relay "https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/telemetry_forward/relay.rs"
click node_terrain "https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/terrain/mod.rs"
click node_android "https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/gen/android/app/src/main/java/com/kitegc/app/MainActivity.kt"
click node_telemetry_api "https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/telemetry_api/server.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_ui,node_connection_ui,node_dashboard toneBlue
class node_commands,node_transports,node_mavlink,node_passive,node_app_state,node_scheduler toneAmber
class node_mission,node_safety,node_radar toneMint
class node_logbook,node_logdb,node_video,node_relay,node_terrain toneRose
class node_android,node_telemetry_api,node_pilot,node_autopilot toneIndigo
```

## Components

### Pilot interface

- [Ground station UI](https://github.com/b14ckyy/kite-gc/blob/master/src/routes/%2Bpage.svelte): `src/routes/+page.svelte`
- [Connection controls](https://github.com/b14ckyy/kite-gc/blob/master/src/lib/controllers/connectionController.ts): `src/lib/controllers/connectionController.ts`
- [Telemetry dashboard](https://github.com/b14ckyy/kite-gc/blob/master/src/lib/components/Map.svelte): `src/lib/components/Map.svelte`

### Aircraft link

- [Tauri commands](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/commands/mod.rs): `src-tauri/src/commands/mod.rs`
- [Link transports](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/transport/mod.rs): `src-tauri/src/transport/mod.rs`
- [MAVLink handler](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/mavlink_proto/handler.rs): `src-tauri/src/mavlink_proto/handler.rs`
- [Passive telemetry](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/passive_telemetry/handler.rs): `src-tauri/src/passive_telemetry/handler.rs`
- [Shared application state](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/state.rs): `src-tauri/src/state.rs`
- [Telemetry and RC scheduler](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/scheduler/telemetry.rs): `src-tauri/src/scheduler/telemetry.rs`

### Planning and safety

- [Mission planning](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/mission/store.rs): `src-tauri/src/mission/store.rs`
- [Geofence and airspace](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/commands/fence.rs): `src-tauri/src/commands/fence.rs`
- [Foreign-vehicle radar](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/radar/mod.rs): `src-tauri/src/radar/mod.rs`

### Flight services

- [Flight logbook](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/flightlog/recorder.rs): `src-tauri/src/flightlog/recorder.rs`
- [Flight history store](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/flightlog/db.rs): `src-tauri/src/flightlog/db.rs`
- [Live video](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/commands/video.rs): `src-tauri/src/commands/video.rs`
- [Telemetry relay](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/telemetry_forward/relay.rs): `src-tauri/src/telemetry_forward/relay.rs`
- [Terrain analysis](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/terrain/mod.rs): `src-tauri/src/terrain/mod.rs`

### Platform integration

- [Android platform services](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/gen/android/app/src/main/java/com/kitegc/app/MainActivity.kt): `src-tauri/gen/android/app/src/main/java/com/kitegc/app/MainActivity.kt`
- [Telemetry API](https://github.com/b14ckyy/kite-gc/blob/master/src-tauri/src/telemetry_api/server.rs): `src-tauri/src/telemetry_api/server.rs`

### Other components

- **Pilot**
- **Autopilot**

## Connections

- Pilot → Ground station UI: uses
- Ground station UI → Connection controls: manages links
- Connection controls → Tauri commands: requests connection
- Tauri commands → Link transports: opens link (evidence: `src-tauri/src/commands/mod.rs`)
- Link transports → Autopilot: exchanges bytes
- Autopilot → MAVLink handler: streams telemetry (evidence: `src-tauri/src/mavlink_proto/handler.rs`)
- MAVLink handler → Shared application state: updates state (evidence: `src-tauri/src/mavlink_proto/handler.rs`)
- Link transports → Passive telemetry: feeds listen-only link (evidence: `src-tauri/src/passive_telemetry/handler.rs`)
- Passive telemetry → Flight logbook: records telemetry (evidence: `src-tauri/src/passive_telemetry/handler.rs`)
- Shared application state → Telemetry and RC scheduler: holds scheduler state (evidence: `src-tauri/src/state.rs`)
- Telemetry and RC scheduler → Flight logbook: records flight data (evidence: `src-tauri/src/flightlog/recorder.rs`)
- Flight logbook → Flight history store: persists flights (evidence: `src-tauri/src/flightlog/recorder.rs`)
- Shared application state → Mission planning: stores mission state
- Ground station UI → Mission planning: plans missions
- Ground station UI → Geofence and airspace: manages safety
- Ground station UI → Foreign-vehicle radar: views traffic
- Ground station UI → Telemetry dashboard: displays telemetry
- Ground station UI → Live video: views stream
- Ground station UI → Terrain analysis: analyzes terrain
- Shared application state → Foreign-vehicle radar: holds radar state (evidence: `src-tauri/src/state.rs`)
- Ground station UI → Telemetry relay: configures forwarding
- Ground station UI → Telemetry API: exposes telemetry
- Tauri commands → Android platform services: uses platform storage
