# coding-sparrow/omarchy-cloudflare-warp architecture

> Architecture diagram of the GitHub repository coding-sparrow/omarchy-cloudflare-warp, 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/coding-sparrow/omarchy-cloudflare-warp
- Repository: https://github.com/coding-sparrow/omarchy-cloudflare-warp

## Overview

This Omarchy shell plugin provides a bar panel for installing, registering, monitoring, and controlling Cloudflare WARP. The documented flow is: open the bar panel, collect CLI state, transform it for display, then run user-requested actions. The README assigns polling and actions to Service.qml, presentation to Widget.qml, state collection to scripts/state.sh, and state interpretation to Model.js. Other capability links reflect README descriptions; unsampled implementation details are not inferred.

Main entry points: [`Widget.qml`](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Widget.qml) (Panel view), [`Service.qml`](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Service.qml) (Panel service), [`scripts/state.sh`](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/scripts/state.sh) (State collector), [`scripts/warp-setup`](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/scripts/warp-setup) (Install and start)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_panel["Bar panel"]
  node_bar["Bar icon<br/>[Widget.qml]"]
  node_panel_view["Panel view<br/>[Widget.qml]"]
  node_keyboard["Keyboard controls<br/>[Widget.qml]"]
end

subgraph group_runtime["State and actions"]
  node_service["Panel service<br/>[Service.qml]"]
  node_collector["State collector<br/>[state.sh]"]
  node_model["State model<br/>[Model.js]"]
end

subgraph group_lifecycle["WARP lifecycle"]
  node_installer["Install and start"]
  node_registration["Team or free sign-in<br/>[Service.qml]"]
  node_device["Device management<br/>[Service.qml]"]
end

subgraph group_controls["Connection controls"]
  node_connection["Connection toggle<br/>[Service.qml]"]
  node_mode["Mode selection<br/>[Service.qml]"]
  node_networks["Virtual networks<br/>[Service.qml]"]
  node_local_access["Local access<br/>[Service.qml]"]
  node_routes["Split tunnel routes<br/>[Service.qml]"]
  node_diagnostics["Connection details<br/>[Widget.qml]"]
end

node_user(("User"))
node_warp_cli["warp-cli"]
node_warp_service["warp-svc"]
node_aur["AUR package"]
node_browser["Login browser"]

node_user -->|"opens or toggles"| node_bar
node_user -->|"uses"| node_panel_view
node_bar -->|"opens panel"| node_panel_view
node_user -->|"navigates"| node_keyboard
node_service -->|"polls state"| node_collector
node_collector -->|"collects JSON"| node_warp_cli
node_collector -->|"passes JSON"| node_model
node_model -->|"provides display values"| node_panel_view
node_panel_view -->|"offers controls"| node_connection
node_panel_view -->|"offers sign-in"| node_registration
node_panel_view -->|"offers mode choice"| node_mode
node_panel_view -->|"offers network choice"| node_networks
node_panel_view -->|"offers access toggle"| node_local_access
node_panel_view -->|"shows and copies"| node_routes
node_panel_view -->|"shows status"| node_diagnostics
node_panel_view -->|"offers management"| node_device
node_service -->|"runs actions"| node_connection
node_service -->|"runs actions"| node_registration
node_service -->|"runs actions"| node_mode
node_service -->|"runs actions"| node_networks
node_service -->|"runs actions"| node_local_access
node_service -->|"runs actions"| node_device
node_installer -->|"installs package"| node_aur
node_installer -->|"enables service"| node_warp_service
node_registration -->|"finishes login"| node_browser
node_service -.->|"installation action"| node_installer

click node_bar "https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Widget.qml"
click node_panel_view "https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Widget.qml"
click node_keyboard "https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Widget.qml"
click node_service "https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Service.qml"
click node_collector "https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/scripts/state.sh"
click node_model "https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Model.js"
click node_installer "https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/scripts/warp-setup"
click node_registration "https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Service.qml"
click node_connection "https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Service.qml"
click node_mode "https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Service.qml"
click node_networks "https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Service.qml"
click node_local_access "https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Service.qml"
click node_routes "https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Service.qml"
click node_diagnostics "https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Widget.qml"
click node_device "https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Service.qml"

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_bar,node_panel_view,node_keyboard,node_user,node_browser toneBlue
class node_service,node_collector,node_model toneAmber
class node_installer,node_registration,node_device toneMint
class node_connection,node_mode,node_networks,node_local_access,node_routes,node_diagnostics toneRose
class node_warp_cli,node_warp_service,node_aur toneIndigo
```

## Components

### Bar panel

- [Bar icon](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Widget.qml): `Widget.qml`
- [Panel view](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Widget.qml): `Widget.qml`
- [Keyboard controls](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Widget.qml): `Widget.qml`

### State and actions

- [Panel service](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Service.qml): `Service.qml`
- [State collector](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/scripts/state.sh): `scripts/state.sh`
- [State model](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Model.js): `Model.js`

### WARP lifecycle

- [Install and start](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/scripts/warp-setup): `scripts/warp-setup`
- [Team or free sign-in](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Service.qml): `Service.qml`
- [Device management](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Service.qml): `Service.qml`

### Connection controls

- [Connection toggle](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Service.qml): `Service.qml`
- [Mode selection](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Service.qml): `Service.qml`
- [Virtual networks](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Service.qml): `Service.qml`
- [Local access](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Service.qml): `Service.qml`
- [Split tunnel routes](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Service.qml): `Service.qml`
- [Connection details](https://github.com/coding-sparrow/omarchy-cloudflare-warp/blob/main/Widget.qml): `Widget.qml`

### Other components

- **User**
- **warp-cli**
- **warp-svc**
- **AUR package**
- **Login browser**

## Connections

- User → Bar icon: opens or toggles (evidence: `README.md`)
- User → Panel view: uses (evidence: `README.md`)
- Bar icon → Panel view: opens panel (evidence: `README.md`)
- User → Keyboard controls: navigates (evidence: `README.md`)
- Panel service → State collector: polls state (evidence: `README.md`)
- State collector → warp-cli: collects JSON (evidence: `README.md`)
- State collector → State model: passes JSON (evidence: `README.md`)
- State model → Panel view: provides display values (evidence: `README.md`)
- Panel view → Connection toggle: offers controls (evidence: `README.md`)
- Panel view → Team or free sign-in: offers sign-in (evidence: `README.md`)
- Panel view → Mode selection: offers mode choice (evidence: `README.md`)
- Panel view → Virtual networks: offers network choice (evidence: `README.md`)
- Panel view → Local access: offers access toggle (evidence: `README.md`)
- Panel view → Split tunnel routes: shows and copies (evidence: `README.md`)
- Panel view → Connection details: shows status (evidence: `README.md`)
- Panel view → Device management: offers management (evidence: `README.md`)
- Panel service → Connection toggle: runs actions (evidence: `README.md`)
- Panel service → Team or free sign-in: runs actions (evidence: `README.md`)
- Panel service → Mode selection: runs actions (evidence: `README.md`)
- Panel service → Virtual networks: runs actions (evidence: `README.md`)
- Panel service → Local access: runs actions (evidence: `README.md`)
- Panel service → Device management: runs actions (evidence: `README.md`)
- Install and start → AUR package: installs package (evidence: `README.md`)
- Install and start → warp-svc: enables service (evidence: `README.md`)
- Team or free sign-in → Login browser: finishes login (evidence: `README.md`)
- Panel service → Install and start: installation action
