# latifangren/bfr-webui-go architecture

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

- Interactive diagram: https://gitdiagram.com/latifangren/bfr-webui-go
- Repository: https://github.com/latifangren/bfr-webui-go

## Overview

BFR-WEBUI-GO is an offline-ready Android system control panel: users connect through a browser, authenticate, select a feature tab, and operate device services through the embedded web UI. Its major domain areas include file and partition management, modem and hardware controls, networking and proxying, telemetry, and remote shell/screen access. The frontend entry and file-manager/API calls are visible in excerpts; most backend subsystem implementations were not sampled, so their internal call paths are intentionally not inferred.

Main entry points: [`frontend/src/App.svelte`](https://github.com/latifangren/bfr-webui-go/blob/dev/frontend/src/App.svelte) (App Shell), [`frontend/src/api/client.ts`](https://github.com/latifangren/bfr-webui-go/blob/dev/frontend/src/api/client.ts) (HTTP API Client), [`frontend/src/components/tabs/files/TabFileManager.svelte`](https://github.com/latifangren/bfr-webui-go/blob/dev/frontend/src/components/tabs/files/TabFileManager.svelte) (Dual-Pane Files), [`frontend/src/components/tabs/registry.ts`](https://github.com/latifangren/bfr-webui-go/blob/dev/frontend/src/components/tabs/registry.ts) (Tab Registry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web UI"]
  node_app["App Shell<br/>[App.svelte]"]
  node_tab_registry["Tab Registry<br/>[registry.ts]"]
  node_api_client["HTTP API Client<br/>[client.ts]"]
  node_file_ui["Dual-Pane Files"]
  node_appearance["Appearance Studio"]
end

subgraph group_device["Device Control"]
  node_http_server["Go HTTP Server<br/>[main.go]"]
  node_http_handlers["API Handlers"]
  node_file_service["File Operations"]
  node_partition_service["Partitions"]
  node_kernel_service["Kernel Tuning"]
  node_power_service["Power Controls"]
  node_charger_service["Charger Controls"]
  node_modem_service["Modem Controls"]
  node_efs_service["Qualcomm EFS"]
  node_samsung_service["Samsung Modem"]
  node_shannon_service["Shannon Modem"]
  node_sysinfo_service["System Telemetry"]
end

subgraph group_network["Networking"]
  node_network_service["Network Settings"]
  node_hotspot_service["Hotspot Routing"]
  node_proxy_service["Proxy Suite"]
  node_qos_service["Traffic QoS"]
  node_vnstat_service["Traffic Accounting"]
end

subgraph group_remote["Remote Operations"]
  node_terminal_service["Root Terminal"]
  node_scrcpy_service["Screen Mirroring"]
  node_ssh_service["SSH Service"]
  node_telegram_service["Telegram Bot"]
end

node_browser(("Browser User"))

node_browser -->|"opens"| node_app
node_app -->|"loads tabs"| node_tab_registry
node_file_ui -->|"calls"| node_api_client
node_api_client -->|"HTTP requests"| node_http_server
node_app -->|"opens settings"| node_appearance

click node_app "https://github.com/latifangren/bfr-webui-go/blob/dev/frontend/src/App.svelte"
click node_tab_registry "https://github.com/latifangren/bfr-webui-go/blob/dev/frontend/src/components/tabs/registry.ts"
click node_api_client "https://github.com/latifangren/bfr-webui-go/blob/dev/frontend/src/api/client.ts"
click node_file_ui "https://github.com/latifangren/bfr-webui-go/blob/dev/frontend/src/components/tabs/files/TabFileManager.svelte"
click node_appearance "https://github.com/latifangren/bfr-webui-go/blob/dev/frontend/src/components/layout/AppearanceModal.svelte"
click node_http_server "https://github.com/latifangren/bfr-webui-go/blob/dev/main.go"
click node_http_handlers "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/handlers"
click node_file_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/filemanager"
click node_partition_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/partition"
click node_kernel_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/kernel"
click node_power_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/power"
click node_charger_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/charger"
click node_modem_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/modem"
click node_efs_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/efs"
click node_samsung_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/samsung"
click node_shannon_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/shannon"
click node_sysinfo_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/sysinfo"
click node_network_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/network"
click node_hotspot_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/hotspot"
click node_proxy_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/proxy"
click node_qos_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/qos"
click node_vnstat_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/vnstat"
click node_terminal_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/terminal"
click node_scrcpy_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/scrcpy"
click node_ssh_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/ssh"
click node_telegram_service "https://github.com/latifangren/bfr-webui-go/tree/dev/internal/telegram"

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_tab_registry,node_api_client,node_file_ui,node_appearance,node_browser toneBlue
class node_http_server,node_http_handlers,node_file_service,node_partition_service,node_kernel_service,node_power_service,node_charger_service,node_modem_service,node_efs_service,node_samsung_service,node_shannon_service,node_sysinfo_service toneAmber
class node_network_service,node_hotspot_service,node_proxy_service,node_qos_service,node_vnstat_service toneMint
class node_terminal_service,node_scrcpy_service,node_ssh_service,node_telegram_service toneRose
```

## Components

### Web UI

- [App Shell](https://github.com/latifangren/bfr-webui-go/blob/dev/frontend/src/App.svelte): `frontend/src/App.svelte`
- [Tab Registry](https://github.com/latifangren/bfr-webui-go/blob/dev/frontend/src/components/tabs/registry.ts): `frontend/src/components/tabs/registry.ts`
- [HTTP API Client](https://github.com/latifangren/bfr-webui-go/blob/dev/frontend/src/api/client.ts): `frontend/src/api/client.ts`
- [Dual-Pane Files](https://github.com/latifangren/bfr-webui-go/blob/dev/frontend/src/components/tabs/files/TabFileManager.svelte): `frontend/src/components/tabs/files/TabFileManager.svelte`
- [Appearance Studio](https://github.com/latifangren/bfr-webui-go/blob/dev/frontend/src/components/layout/AppearanceModal.svelte): `frontend/src/components/layout/AppearanceModal.svelte`

### Device Control

- [Go HTTP Server](https://github.com/latifangren/bfr-webui-go/blob/dev/main.go): `main.go`
- [API Handlers](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/handlers): `internal/handlers`
- [File Operations](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/filemanager): `internal/filemanager`
- [Partitions](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/partition): `internal/partition`
- [Kernel Tuning](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/kernel): `internal/kernel`
- [Power Controls](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/power): `internal/power`
- [Charger Controls](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/charger): `internal/charger`
- [Modem Controls](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/modem): `internal/modem`
- [Qualcomm EFS](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/efs): `internal/efs`
- [Samsung Modem](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/samsung): `internal/samsung`
- [Shannon Modem](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/shannon): `internal/shannon`
- [System Telemetry](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/sysinfo): `internal/sysinfo`

### Networking

- [Network Settings](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/network): `internal/network`
- [Hotspot Routing](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/hotspot): `internal/hotspot`
- [Proxy Suite](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/proxy): `internal/proxy`
- [Traffic QoS](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/qos): `internal/qos`
- [Traffic Accounting](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/vnstat): `internal/vnstat`

### Remote Operations

- [Root Terminal](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/terminal): `internal/terminal`
- [Screen Mirroring](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/scrcpy): `internal/scrcpy`
- [SSH Service](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/ssh): `internal/ssh`
- [Telegram Bot](https://github.com/latifangren/bfr-webui-go/tree/dev/internal/telegram): `internal/telegram`

### Other components

- **Browser User**

## Connections

- Browser User → App Shell: opens (evidence: `README.md`)
- App Shell → Tab Registry: loads tabs (evidence: `frontend/src/App.svelte`)
- Dual-Pane Files → HTTP API Client: calls (evidence: `frontend/src/components/tabs/files/TabFileManager.svelte`)
- HTTP API Client → Go HTTP Server: HTTP requests (evidence: `frontend/src/api/client.ts`)
- App Shell → Appearance Studio: opens settings
