# getsayall/remote-mic-app-windows architecture

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

- Interactive diagram: https://gitdiagram.com/getsayall/remote-mic-app-windows
- Repository: https://github.com/getsayall/remote-mic-app-windows

## Overview

SayAll for Windows turns paired Xiaomi Bluetooth remotes into configurable controls and a voice-input bridge. The main user flow is to scan and connect a remote, choose an audio endpoint, then use its voice or mapped buttons; the Vue settings UI reaches the Rust host over Tauri IPC, which delegates to Windows platform services and the shared voice core. The graph also preserves mapping, diagnostics, settings, statistics, and update capabilities documented in the README. Unsampled subsystems are represented at their listed source paths; edges rely on excerpts or README statements.

Main entry points: [`src-tauri/src/lib.rs`](https://github.com/getsayall/remote-mic-app-windows/blob/main/src-tauri/src/lib.rs) (Tauri commands), [`src-tauri/src/platform.rs`](https://github.com/getsayall/remote-mic-app-windows/blob/main/src-tauri/src/platform.rs) (Platform runtime), [`src/App.vue`](https://github.com/getsayall/remote-mic-app-windows/blob/main/src/App.vue) (App shell), [`crates/sayall-core/src/pipeline.rs`](https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-core/src/pipeline.rs) (Voice sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Settings UI"]
  node_app["App shell<br/>[App.vue]"]
  node_connection["Connection settings<br/>[ConnectionPage.vue]"]
  node_buttons["Button mappings<br/>[ButtonsPage.vue]"]
  node_about["About and updates<br/>[AboutPage.vue]"]
  node_bridge["Tauri IPC bridge<br/>[bridge.ts]"]
end

subgraph group_host["Application host"]
  node_hostlib["Tauri commands<br/>[lib.rs]"]
  node_platform["Platform runtime<br/>[platform.rs]"]
  node_settings["Host settings<br/>[settings.rs]"]
  node_diagnostics["Diagnostics<br/>[diagnostics.rs]"]
  node_updater["App updater<br/>[updater.rs]"]
end

subgraph group_win["Windows runtime"]
  node_ble["BLE connection<br/>[ble.rs]"]
  node_audio["Audio output<br/>[audio.rs]"]
  node_raw["Remote input<br/>[raw_input.rs]"]
  node_mapping["Mapping engine<br/>[button_mapping.rs]"]
  node_sendinput["Input actions<br/>[send_input.rs]"]
  node_registered["App registry<br/>[registered_apps.rs]"]
end

subgraph group_core["Voice core"]
  node_voice["Voice sessions<br/>[pipeline.rs]"]
  node_atvv["ATVV protocol<br/>[atvv.rs]"]
  node_adpcm["ADPCM codec<br/>[adpcm.rs]"]
  node_stats["Usage statistics<br/>[statistics.rs]"]
end

node_user(("User"))
node_remote(("Bluetooth remote"))
node_endpoint(("Audio endpoint"))

node_user -->|"configures"| node_app
node_app -->|"shows"| node_connection
node_app -->|"shows"| node_buttons
node_app -->|"shows"| node_about
node_connection -->|"requests device and audio"| node_bridge
node_buttons -->|"saves mappings"| node_bridge
node_about -->|"requests updates"| node_bridge
node_bridge -->|"invokes commands"| node_hostlib
node_hostlib -->|"delegates runtime"| node_platform
node_platform -->|"uses Windows BLE"| node_ble
node_platform -->|"uses WASAPI"| node_audio
node_platform -->|"starts input"| node_raw
node_platform -->|"supports mapping"| node_mapping
node_mapping -->|"injects actions"| node_sendinput
node_mapping -->|"uses app targets"| node_registered
node_remote -->|"connects over BLE"| node_ble
node_remote -->|"sends button input"| node_raw
node_endpoint -->|"receives voice output"| node_audio
node_ble -->|"feeds voice sessions"| node_voice
node_hostlib -.->|"manages preferences"| node_settings
node_hostlib -.->|"reports events"| node_diagnostics
node_hostlib -.->|"handles updates"| node_updater
node_voice -.->|"uses protocol"| node_atvv
node_voice -.->|"decodes audio"| node_adpcm
node_voice -.->|"records sessions"| node_stats

click node_app "https://github.com/getsayall/remote-mic-app-windows/blob/main/src/App.vue"
click node_connection "https://github.com/getsayall/remote-mic-app-windows/blob/main/src/pages/ConnectionPage.vue"
click node_buttons "https://github.com/getsayall/remote-mic-app-windows/blob/main/src/pages/ButtonsPage.vue"
click node_about "https://github.com/getsayall/remote-mic-app-windows/blob/main/src/pages/AboutPage.vue"
click node_bridge "https://github.com/getsayall/remote-mic-app-windows/blob/main/src/lib/bridge.ts"
click node_hostlib "https://github.com/getsayall/remote-mic-app-windows/blob/main/src-tauri/src/lib.rs"
click node_platform "https://github.com/getsayall/remote-mic-app-windows/blob/main/src-tauri/src/platform.rs"
click node_settings "https://github.com/getsayall/remote-mic-app-windows/blob/main/src-tauri/src/settings.rs"
click node_diagnostics "https://github.com/getsayall/remote-mic-app-windows/blob/main/src-tauri/src/diagnostics.rs"
click node_updater "https://github.com/getsayall/remote-mic-app-windows/blob/main/src-tauri/src/updater.rs"
click node_ble "https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-windows/src/ble.rs"
click node_audio "https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-windows/src/audio.rs"
click node_raw "https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-windows/src/raw_input.rs"
click node_mapping "https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-windows/src/button_mapping.rs"
click node_sendinput "https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-windows/src/send_input.rs"
click node_registered "https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-windows/src/registered_apps.rs"
click node_voice "https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-core/src/pipeline.rs"
click node_atvv "https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-core/src/atvv.rs"
click node_adpcm "https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-core/src/adpcm.rs"
click node_stats "https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-core/src/statistics.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_connection,node_buttons,node_about,node_bridge,node_user toneBlue
class node_hostlib,node_platform,node_settings,node_diagnostics,node_updater toneAmber
class node_ble,node_audio,node_raw,node_mapping,node_sendinput,node_registered toneMint
class node_voice,node_atvv,node_adpcm,node_stats toneRose
class node_remote,node_endpoint toneIndigo
```

## Components

### Settings UI

- [App shell](https://github.com/getsayall/remote-mic-app-windows/blob/main/src/App.vue): `src/App.vue`
- [Connection settings](https://github.com/getsayall/remote-mic-app-windows/blob/main/src/pages/ConnectionPage.vue): `src/pages/ConnectionPage.vue`
- [Button mappings](https://github.com/getsayall/remote-mic-app-windows/blob/main/src/pages/ButtonsPage.vue): `src/pages/ButtonsPage.vue`
- [About and updates](https://github.com/getsayall/remote-mic-app-windows/blob/main/src/pages/AboutPage.vue): `src/pages/AboutPage.vue`
- [Tauri IPC bridge](https://github.com/getsayall/remote-mic-app-windows/blob/main/src/lib/bridge.ts): `src/lib/bridge.ts`

### Application host

- [Tauri commands](https://github.com/getsayall/remote-mic-app-windows/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Platform runtime](https://github.com/getsayall/remote-mic-app-windows/blob/main/src-tauri/src/platform.rs): `src-tauri/src/platform.rs`
- [Host settings](https://github.com/getsayall/remote-mic-app-windows/blob/main/src-tauri/src/settings.rs): `src-tauri/src/settings.rs`
- [Diagnostics](https://github.com/getsayall/remote-mic-app-windows/blob/main/src-tauri/src/diagnostics.rs): `src-tauri/src/diagnostics.rs`
- [App updater](https://github.com/getsayall/remote-mic-app-windows/blob/main/src-tauri/src/updater.rs): `src-tauri/src/updater.rs`

### Windows runtime

- [BLE connection](https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-windows/src/ble.rs): `crates/sayall-windows/src/ble.rs`
- [Audio output](https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-windows/src/audio.rs): `crates/sayall-windows/src/audio.rs`
- [Remote input](https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-windows/src/raw_input.rs): `crates/sayall-windows/src/raw_input.rs`
- [Mapping engine](https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-windows/src/button_mapping.rs): `crates/sayall-windows/src/button_mapping.rs`
- [Input actions](https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-windows/src/send_input.rs): `crates/sayall-windows/src/send_input.rs`
- [App registry](https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-windows/src/registered_apps.rs): `crates/sayall-windows/src/registered_apps.rs`

### Voice core

- [Voice sessions](https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-core/src/pipeline.rs): `crates/sayall-core/src/pipeline.rs`
- [ATVV protocol](https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-core/src/atvv.rs): `crates/sayall-core/src/atvv.rs`
- [ADPCM codec](https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-core/src/adpcm.rs): `crates/sayall-core/src/adpcm.rs`
- [Usage statistics](https://github.com/getsayall/remote-mic-app-windows/blob/main/crates/sayall-core/src/statistics.rs): `crates/sayall-core/src/statistics.rs`

### Other components

- **User**
- **Bluetooth remote**
- **Audio endpoint**

## Connections

- User → App shell: configures
- App shell → Connection settings: shows (evidence: `src/App.vue`)
- App shell → Button mappings: shows (evidence: `src/App.vue`)
- App shell → About and updates: shows (evidence: `src/App.vue`)
- Connection settings → Tauri IPC bridge: requests device and audio (evidence: `src/pages/ConnectionPage.vue`)
- Button mappings → Tauri IPC bridge: saves mappings (evidence: `src/pages/ButtonsPage.vue`)
- About and updates → Tauri IPC bridge: requests updates (evidence: `src/pages/AboutPage.vue`)
- Tauri IPC bridge → Tauri commands: invokes commands
- Tauri commands → Platform runtime: delegates runtime (evidence: `src-tauri/src/lib.rs`)
- Platform runtime → BLE connection: uses Windows BLE
- Platform runtime → Audio output: uses WASAPI
- Platform runtime → Remote input: starts input
- Platform runtime → Mapping engine: supports mapping
- Mapping engine → Input actions: injects actions (evidence: `crates/sayall-windows/src/button_mapping.rs`)
- Mapping engine → App registry: uses app targets (evidence: `crates/sayall-windows/src/button_mapping.rs`)
- Bluetooth remote → BLE connection: connects over BLE
- Bluetooth remote → Remote input: sends button input
- Audio endpoint → Audio output: receives voice output
- BLE connection → Voice sessions: feeds voice sessions
- Tauri commands → Host settings: manages preferences (evidence: `src-tauri/src/lib.rs`)
- Tauri commands → Diagnostics: reports events (evidence: `src-tauri/src/lib.rs`)
- Tauri commands → App updater: handles updates (evidence: `src-tauri/src/lib.rs`)
- Voice sessions → ATVV protocol: uses protocol
- Voice sessions → ADPCM codec: decodes audio
- Voice sessions → Usage statistics: records sessions
