# xhuriken/osauce architecture

> Architecture diagram of the GitHub repository xhuriken/osauce, 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/xhuriken/osauce
- Repository: https://github.com/xhuriken/osauce

## Overview

OSauce is a minimal mobile-shell simulator: the user interacts with a Slint interface, while the Rust entry point initializes the window, supplies clock and battery state, and handles lock/unlock callbacks. The README describes a postmarketOS base and Waydroid app launching as product goals, but the sampled runtime code does not implement those integrations. UI composition details are based on the README and file tree; unsampled Slint relationships are therefore not asserted as source-verified calls.

Main entry points: [`ui/shell.slint`](https://github.com/xhuriken/osauce/blob/main/ui/shell.slint) (Shell layout), [`src/main.rs`](https://github.com/xhuriken/osauce/blob/main/src/main.rs) (Shell entry), [`src/lib.rs`](https://github.com/xhuriken/osauce/blob/main/src/lib.rs) (Window bootstrap), [`ui/views/home_screen.slint`](https://github.com/xhuriken/osauce/blob/main/ui/views/home_screen.slint) (Home screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Rust runtime"]
  node_entry["Shell entry<br/>[main.rs]"]
  node_telemetry["System telemetry<br/>[main.rs]"]
  node_window["Window bootstrap<br/>[lib.rs]"]
end

subgraph group_interface["Slint interface"]
  node_shell["Shell layout<br/>[shell.slint]"]
  node_home["Home screen<br/>[home_screen.slint]"]
  node_dock["App dock<br/>[dock.slint]"]
  node_status["Status bar<br/>[status_bar.slint]"]
  node_theme["Visual theme<br/>[theme.slint]"]
end

subgraph group_platform["Platform integrations"]
  node_linux[("Linux sysfs")]
  node_waydroid["Waydroid"]
  node_postmarket["postmarketOS"]
end

node_user(("User"))

node_user -->|"interacts with"| node_shell
node_shell -->|"sends callbacks"| node_entry
node_entry -->|"creates window"| node_window
node_entry -->|"updates state"| node_telemetry
node_telemetry -->|"reads battery"| node_linux
node_entry -->|"sets UI properties"| node_shell
node_shell -.->|"presents view"| node_home
node_shell -.->|"includes component"| node_dock
node_shell -.->|"includes component"| node_status
node_shell -.->|"uses styles"| node_theme
node_entry -.->|"planned app launch"| node_waydroid
node_postmarket -.->|"planned platform"| node_shell

click node_entry "https://github.com/xhuriken/osauce/blob/main/src/main.rs"
click node_telemetry "https://github.com/xhuriken/osauce/blob/main/src/main.rs"
click node_window "https://github.com/xhuriken/osauce/blob/main/src/lib.rs"
click node_shell "https://github.com/xhuriken/osauce/blob/main/ui/shell.slint"
click node_home "https://github.com/xhuriken/osauce/blob/main/ui/views/home_screen.slint"
click node_dock "https://github.com/xhuriken/osauce/blob/main/ui/components/dock.slint"
click node_status "https://github.com/xhuriken/osauce/blob/main/ui/components/status_bar.slint"
click node_theme "https://github.com/xhuriken/osauce/blob/main/ui/styles/theme.slint"

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_entry,node_telemetry,node_window,node_user toneBlue
class node_shell,node_home,node_dock,node_status,node_theme toneAmber
class node_linux,node_waydroid,node_postmarket toneMint
```

## Components

### Rust runtime

- [Shell entry](https://github.com/xhuriken/osauce/blob/main/src/main.rs): `src/main.rs`
- [System telemetry](https://github.com/xhuriken/osauce/blob/main/src/main.rs): `src/main.rs`
- [Window bootstrap](https://github.com/xhuriken/osauce/blob/main/src/lib.rs): `src/lib.rs`

### Slint interface

- [Shell layout](https://github.com/xhuriken/osauce/blob/main/ui/shell.slint): `ui/shell.slint`
- [Home screen](https://github.com/xhuriken/osauce/blob/main/ui/views/home_screen.slint): `ui/views/home_screen.slint`
- [App dock](https://github.com/xhuriken/osauce/blob/main/ui/components/dock.slint): `ui/components/dock.slint`
- [Status bar](https://github.com/xhuriken/osauce/blob/main/ui/components/status_bar.slint): `ui/components/status_bar.slint`
- [Visual theme](https://github.com/xhuriken/osauce/blob/main/ui/styles/theme.slint): `ui/styles/theme.slint`

### Platform integrations

- **Linux sysfs**
- **Waydroid**
- **postmarketOS**

### Other components

- **User**

## Connections

- User → Shell layout: interacts with (evidence: `README.md`)
- Shell layout → Shell entry: sends callbacks (evidence: `README.md`)
- Shell entry → Window bootstrap: creates window (evidence: `src/main.rs`)
- Shell entry → System telemetry: updates state (evidence: `src/main.rs`)
- System telemetry → Linux sysfs: reads battery (evidence: `src/main.rs`)
- Shell entry → Shell layout: sets UI properties (evidence: `README.md`)
- Shell layout → Home screen: presents view
- Shell layout → App dock: includes component
- Shell layout → Status bar: includes component
- Shell layout → Visual theme: uses styles
- Shell entry → Waydroid: planned app launch (evidence: `README.md`)
- postmarketOS → Shell layout: planned platform (evidence: `README.md`)
