# wegoingprobyn/quiet architecture

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

- Interactive diagram: https://gitdiagram.com/wegoingprobyn/quiet
- Repository: https://github.com/wegoingprobyn/quiet

## Overview

Quiet is a Rust workspace for head-unit services: projection connects phones and supplies video to the UI, while powerd manages power policy and ledger records activity and answers queries. The graph highlights those service workflows and shared runtime support. Source evidence is partial; the README is empty, so links are limited to relationships visible in excerpts or the source index.

Main entry points: [`crates/projection/runtime/main.rs`](https://github.com/wegoingprobyn/quiet/blob/main/crates/projection/runtime/main.rs) (Projection service), [`crates/powerd/runtime/main.rs`](https://github.com/wegoingprobyn/quiet/blob/main/crates/powerd/runtime/main.rs) (Power service), [`crates/ledger/runtime/main.rs`](https://github.com/wegoingprobyn/quiet/blob/main/crates/ledger/runtime/main.rs) (Ledger service), [`crates/projection/runtime/shell.rs`](https://github.com/wegoingprobyn/quiet/blob/main/crates/projection/runtime/shell.rs) (Session shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_projection["Phone projection"]
  node_projection_service["Projection service<br/>[main.rs]"]
  node_projection_shell["Session shell<br/>[shell.rs]"]
  node_phone_links["Phone links<br/>[phone.rs]"]
  node_aa_session["Auto session<br/>[session.rs]"]
  node_aa_frames["Frame protocol<br/>[frame.rs]"]
  node_video["Video decode<br/>[video.rs]"]
  node_frame_server["UI frame link<br/>[frames.rs]"]
  node_recording["Video recording<br/>[recorder.rs]"]
end

subgraph group_services["Background services"]
  node_powerd["Power service<br/>[main.rs]"]
  node_power_shell["Power shell<br/>[shell.rs]"]
  node_power_core["Power policy<br/>[machine.rs]"]
  node_power_store[("Power persistence<br/>[store.rs]")]
  node_ledger["Ledger service<br/>[main.rs]"]
  node_ledger_shell["Ledger shell<br/>[shell.rs]"]
  node_ledger_store[("Ledger storage<br/>[store.rs]")]
end

subgraph group_ui["Head-unit UI"]
  node_ui["UI service<br/>[main.rs]"]
  node_screen["Screen state<br/>[screen.rs]"]
  node_panels["App panels<br/>[panels.rs]"]
end

subgraph group_shared["Shared runtime"]
  node_bus["Bus contracts<br/>[envelope.rs]"]
  node_service_runtime["Service runtime<br/>[time.rs]"]
end

node_phone(("Phone"))
node_broker(("MQTT broker"))
node_power_node(("Power node"))

node_phone -.->|"connects to"| node_projection_service
node_projection_service -->|"runs"| node_projection_shell
node_projection_service -->|"configures"| node_phone_links
node_projection_shell -->|"drives"| node_aa_session
node_aa_session -->|"uses"| node_aa_frames
node_projection_shell -->|"decodes video"| node_video
node_projection_shell -->|"sends frames"| node_frame_server
node_projection_shell -->|"records video"| node_recording
node_ui -->|"uses"| node_screen
node_ui -->|"loads panels"| node_panels
node_projection_service -.->|"connects through"| node_broker
node_powerd -->|"runs"| node_power_shell
node_powerd -->|"loads"| node_power_store
node_power_shell -->|"feeds decisions"| node_power_core
node_powerd -.->|"connects through"| node_broker
node_power_node -.->|"reports state"| node_powerd
node_ledger -->|"runs"| node_ledger_shell
node_ledger -->|"loads"| node_ledger_store
node_ledger -.->|"connects through"| node_broker
node_ledger -->|"starts time"| node_service_runtime
node_powerd -->|"starts time"| node_service_runtime
node_projection_service -->|"drives service"| node_service_runtime
node_projection_service -->|"routes messages"| node_bus
node_powerd -.->|"uses contracts"| node_bus
node_ledger -->|"uses contracts"| node_bus

click node_projection_service "https://github.com/wegoingprobyn/quiet/blob/main/crates/projection/runtime/main.rs"
click node_projection_shell "https://github.com/wegoingprobyn/quiet/blob/main/crates/projection/runtime/shell.rs"
click node_phone_links "https://github.com/wegoingprobyn/quiet/blob/main/crates/projection/runtime/phone.rs"
click node_aa_session "https://github.com/wegoingprobyn/quiet/blob/main/crates/android-auto/src/session.rs"
click node_aa_frames "https://github.com/wegoingprobyn/quiet/blob/main/crates/android-auto/src/frame.rs"
click node_video "https://github.com/wegoingprobyn/quiet/blob/main/crates/projection/runtime/video.rs"
click node_frame_server "https://github.com/wegoingprobyn/quiet/blob/main/crates/projection/runtime/frames.rs"
click node_recording "https://github.com/wegoingprobyn/quiet/blob/main/crates/projection/runtime/recorder.rs"
click node_ui "https://github.com/wegoingprobyn/quiet/blob/main/crates/ui/runtime/main.rs"
click node_screen "https://github.com/wegoingprobyn/quiet/blob/main/crates/ui/core/screen.rs"
click node_panels "https://github.com/wegoingprobyn/quiet/blob/main/crates/ui/core/panels.rs"
click node_powerd "https://github.com/wegoingprobyn/quiet/blob/main/crates/powerd/runtime/main.rs"
click node_power_shell "https://github.com/wegoingprobyn/quiet/blob/main/crates/powerd/runtime/shell.rs"
click node_power_core "https://github.com/wegoingprobyn/quiet/blob/main/crates/powerd/core/machine.rs"
click node_power_store "https://github.com/wegoingprobyn/quiet/blob/main/crates/powerd/runtime/store.rs"
click node_ledger "https://github.com/wegoingprobyn/quiet/blob/main/crates/ledger/runtime/main.rs"
click node_ledger_shell "https://github.com/wegoingprobyn/quiet/blob/main/crates/ledger/runtime/shell.rs"
click node_ledger_store "https://github.com/wegoingprobyn/quiet/blob/main/crates/ledger/runtime/store.rs"
click node_bus "https://github.com/wegoingprobyn/quiet/blob/main/crates/bus/src/envelope.rs"
click node_service_runtime "https://github.com/wegoingprobyn/quiet/blob/main/crates/service/src/time.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_projection_service,node_projection_shell,node_phone_links,node_aa_session,node_aa_frames,node_video,node_frame_server,node_recording toneBlue
class node_powerd,node_power_shell,node_power_core,node_power_store,node_ledger,node_ledger_shell,node_ledger_store toneAmber
class node_ui,node_screen,node_panels toneMint
class node_bus,node_service_runtime toneRose
class node_phone,node_broker,node_power_node toneIndigo
```

## Components

### Phone projection

- [Projection service](https://github.com/wegoingprobyn/quiet/blob/main/crates/projection/runtime/main.rs): `crates/projection/runtime/main.rs`
- [Session shell](https://github.com/wegoingprobyn/quiet/blob/main/crates/projection/runtime/shell.rs): `crates/projection/runtime/shell.rs`
- [Phone links](https://github.com/wegoingprobyn/quiet/blob/main/crates/projection/runtime/phone.rs): `crates/projection/runtime/phone.rs`
- [Auto session](https://github.com/wegoingprobyn/quiet/blob/main/crates/android-auto/src/session.rs): `crates/android-auto/src/session.rs`
- [Frame protocol](https://github.com/wegoingprobyn/quiet/blob/main/crates/android-auto/src/frame.rs): `crates/android-auto/src/frame.rs`
- [Video decode](https://github.com/wegoingprobyn/quiet/blob/main/crates/projection/runtime/video.rs): `crates/projection/runtime/video.rs`
- [UI frame link](https://github.com/wegoingprobyn/quiet/blob/main/crates/projection/runtime/frames.rs): `crates/projection/runtime/frames.rs`
- [Video recording](https://github.com/wegoingprobyn/quiet/blob/main/crates/projection/runtime/recorder.rs): `crates/projection/runtime/recorder.rs`

### Background services

- [Power service](https://github.com/wegoingprobyn/quiet/blob/main/crates/powerd/runtime/main.rs): `crates/powerd/runtime/main.rs`
- [Power shell](https://github.com/wegoingprobyn/quiet/blob/main/crates/powerd/runtime/shell.rs): `crates/powerd/runtime/shell.rs`
- [Power policy](https://github.com/wegoingprobyn/quiet/blob/main/crates/powerd/core/machine.rs): `crates/powerd/core/machine.rs`
- [Power persistence](https://github.com/wegoingprobyn/quiet/blob/main/crates/powerd/runtime/store.rs): `crates/powerd/runtime/store.rs`
- [Ledger service](https://github.com/wegoingprobyn/quiet/blob/main/crates/ledger/runtime/main.rs): `crates/ledger/runtime/main.rs`
- [Ledger shell](https://github.com/wegoingprobyn/quiet/blob/main/crates/ledger/runtime/shell.rs): `crates/ledger/runtime/shell.rs`
- [Ledger storage](https://github.com/wegoingprobyn/quiet/blob/main/crates/ledger/runtime/store.rs): `crates/ledger/runtime/store.rs`

### Head-unit UI

- [UI service](https://github.com/wegoingprobyn/quiet/blob/main/crates/ui/runtime/main.rs): `crates/ui/runtime/main.rs`
- [Screen state](https://github.com/wegoingprobyn/quiet/blob/main/crates/ui/core/screen.rs): `crates/ui/core/screen.rs`
- [App panels](https://github.com/wegoingprobyn/quiet/blob/main/crates/ui/core/panels.rs): `crates/ui/core/panels.rs`

### Shared runtime

- [Bus contracts](https://github.com/wegoingprobyn/quiet/blob/main/crates/bus/src/envelope.rs): `crates/bus/src/envelope.rs`
- [Service runtime](https://github.com/wegoingprobyn/quiet/blob/main/crates/service/src/time.rs): `crates/service/src/time.rs`

### Other components

- **Phone**
- **MQTT broker**
- **Power node**

## Connections

- Phone → Projection service: connects to
- Projection service → Session shell: runs (evidence: `crates/projection/runtime/main.rs`)
- Projection service → Phone links: configures (evidence: `crates/projection/runtime/main.rs`)
- Session shell → Auto session: drives (evidence: `crates/projection/runtime/shell.rs`)
- Auto session → Frame protocol: uses (evidence: `crates/android-auto/src/session.rs`)
- Session shell → Video decode: decodes video (evidence: `crates/projection/runtime/shell.rs`)
- Session shell → UI frame link: sends frames (evidence: `crates/projection/runtime/shell.rs`)
- Session shell → Video recording: records video (evidence: `crates/projection/runtime/shell.rs`)
- UI service → Screen state: uses (evidence: `crates/ui/runtime/main.rs`)
- UI service → App panels: loads panels (evidence: `crates/ui/runtime/main.rs`)
- Projection service → MQTT broker: connects through
- Power service → Power shell: runs (evidence: `crates/powerd/runtime/main.rs`)
- Power service → Power persistence: loads (evidence: `crates/powerd/runtime/main.rs`)
- Power shell → Power policy: feeds decisions (evidence: `crates/powerd/core/machine.rs`)
- Power service → MQTT broker: connects through
- Power node → Power service: reports state
- Ledger service → Ledger shell: runs (evidence: `crates/ledger/runtime/main.rs`)
- Ledger service → Ledger storage: loads (evidence: `crates/ledger/runtime/main.rs`)
- Ledger service → MQTT broker: connects through
- Ledger service → Service runtime: starts time (evidence: `crates/ledger/runtime/main.rs`)
- Power service → Service runtime: starts time (evidence: `crates/powerd/runtime/main.rs`)
- Projection service → Service runtime: drives service (evidence: `crates/projection/runtime/main.rs`)
- Projection service → Bus contracts: routes messages (evidence: `crates/projection/runtime/main.rs`)
- Power service → Bus contracts: uses contracts
- Ledger service → Bus contracts: uses contracts (evidence: `crates/ledger/runtime/main.rs`)
