# cheipstudio-cmyk/cheip-os architecture

> Architecture diagram of the GitHub repository cheipstudio-cmyk/cheip-os, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cheipstudio-cmyk/cheip-os
- Repository: https://github.com/cheipstudio-cmyk/cheip-os

## Overview

Cheip OS is a Rust phone operating system whose shell presents the home screen and built-in apps over Linux. The main user workflow is interacting with the shell, which routes UI actions to app controllers and system services; results appear in the shell. Major branches include app distribution, web browsing, media and files, personalization, device controls, and updates. The README documents the product capabilities, while sampled excerpts show selected controller and subsystem calls. Many modules are indexed but unsampled, so their internal links are omitted rather than inferred.

Main entry points: [`shell/src/controller.rs`](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/controller.rs) (UI controller), [`shell/src/ctl_files.rs`](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_files.rs) (Files and media), [`shell/src/ctl_store.rs`](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_store.rs) (App Store), [`shell/src/ctl_browser.rs`](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_browser.rs) (Web browser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Shell and apps"]
  node_runtime["Shell runtime<br/>[lib.rs]"]
  node_controller["UI controller<br/>[controller.rs]"]
  node_settings["Settings<br/>[ctl_settings.rs]"]
  node_home["Home and windows<br/>[wl.rs]"]
  node_appopts["App options<br/>[ctl_appopts.rs]"]
end

subgraph group_content["Content and apps"]
  node_store["App Store<br/>[ctl_store.rs]"]
  node_appinfo["App metadata<br/>[appinfo.rs]"]
  node_browser["Web browser<br/>[ctl_browser.rs]"]
  node_webengine["Web engine<br/>[web.rs]"]
  node_files["Files and media<br/>[ctl_files.rs]"]
  node_fileops["File access<br/>[files.rs]"]
  node_media["Media indexing<br/>[media.rs]"]
  node_player["Audio player<br/>[player.rs]"]
  node_mail["Mail<br/>[ctl_mail.rs]"]
  node_calendar["Calendar and clock<br/>[ctl_clock.rs]"]
end

subgraph group_device["Device services"]
  node_system["System services<br/>[system.rs]"]
  node_updates["OS updates<br/>[update.rs]"]
  node_communications["Calls and messages<br/>[ctl_comm.rs]"]
  node_modem["Modem interface<br/>[modem.rs]"]
  node_voice["Voice audio<br/>[voice.rs]"]
  node_linux["Linux app integration<br/>[linux_apps.rs]"]
end

subgraph group_kernel["Linux kernel"]
  node_kernel["Linux kernel"]
  node_remoteproc["Modem remoteproc<br/>[qcom_q6v5_mss.c]"]
  node_q6voice["Q6 voice driver<br/>[q6voice.c]"]
end

node_user(("Phone user"))
node_external(("Network services"))

node_user -->|"uses"| node_runtime
node_runtime -->|"wires UI"| node_controller
node_controller -->|"routes settings"| node_settings
node_controller -->|"routes Store"| node_store
node_controller -->|"routes browser"| node_browser
node_controller -->|"routes files"| node_files
node_controller -->|"routes mail"| node_mail
node_controller -->|"updates clock"| node_calendar
node_controller -->|"reads services"| node_system
node_controller -->|"checks updates"| node_updates
node_controller -->|"routes options"| node_appopts
node_controller -->|"controls apps"| node_home
node_controller -->|"routes calls"| node_communications
node_controller -->|"reads versions"| node_appinfo
node_browser -->|"sends commands"| node_webengine
node_browser -.->|"requests web data"| node_external
node_files -->|"lists files"| node_fileops
node_files -->|"uses media index"| node_media
node_files -->|"plays media"| node_player
node_store -->|"fetches catalog"| node_external
node_store -->|"launches Linux apps"| node_linux
node_settings -->|"configures device"| node_system
node_updates -.->|"checks releases"| node_external
node_communications -->|"uses modem"| node_modem
node_communications -->|"uses voice audio"| node_voice
node_voice -.->|"uses driver"| node_q6voice
node_modem -.->|"boots subsystem"| node_remoteproc
node_kernel -.->|"includes driver"| node_remoteproc
node_kernel -.->|"includes driver"| node_q6voice

click node_runtime "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/lib.rs"
click node_controller "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/controller.rs"
click node_settings "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_settings.rs"
click node_home "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/wl.rs"
click node_appopts "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_appopts.rs"
click node_store "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_store.rs"
click node_appinfo "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/appinfo.rs"
click node_browser "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_browser.rs"
click node_webengine "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/web.rs"
click node_files "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_files.rs"
click node_fileops "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/files.rs"
click node_media "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/media.rs"
click node_player "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/player.rs"
click node_mail "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_mail.rs"
click node_calendar "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_clock.rs"
click node_system "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/system.rs"
click node_updates "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/update.rs"
click node_communications "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_comm.rs"
click node_modem "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/modem.rs"
click node_voice "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/voice.rs"
click node_linux "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/linux_apps.rs"
click node_remoteproc "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/kernel/mss/qcom_q6v5_mss.c"
click node_q6voice "https://github.com/cheipstudio-cmyk/cheip-os/blob/main/kernel/q6voice/q6voice.c"

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_runtime,node_controller,node_settings,node_home,node_appopts,node_user toneBlue
class node_store,node_appinfo,node_browser,node_webengine,node_files,node_fileops,node_media,node_player,node_mail,node_calendar toneAmber
class node_system,node_updates,node_communications,node_modem,node_voice,node_linux toneMint
class node_kernel,node_remoteproc,node_q6voice toneRose
class node_external toneIndigo
```

## Components

### Shell and apps

- [Shell runtime](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/lib.rs): `shell/src/lib.rs`
- [UI controller](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/controller.rs): `shell/src/controller.rs`
- [Settings](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_settings.rs): `shell/src/ctl_settings.rs`
- [Home and windows](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/wl.rs): `shell/src/wl.rs`
- [App options](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_appopts.rs): `shell/src/ctl_appopts.rs`

### Content and apps

- [App Store](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_store.rs): `shell/src/ctl_store.rs`
- [App metadata](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/appinfo.rs): `shell/src/appinfo.rs`
- [Web browser](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_browser.rs): `shell/src/ctl_browser.rs`
- [Web engine](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/web.rs): `shell/src/web.rs`
- [Files and media](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_files.rs): `shell/src/ctl_files.rs`
- [File access](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/files.rs): `shell/src/files.rs`
- [Media indexing](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/media.rs): `shell/src/media.rs`
- [Audio player](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/player.rs): `shell/src/player.rs`
- [Mail](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_mail.rs): `shell/src/ctl_mail.rs`
- [Calendar and clock](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_clock.rs): `shell/src/ctl_clock.rs`

### Device services

- [System services](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/system.rs): `shell/src/system.rs`
- [OS updates](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/update.rs): `shell/src/update.rs`
- [Calls and messages](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/ctl_comm.rs): `shell/src/ctl_comm.rs`
- [Modem interface](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/modem.rs): `shell/src/modem.rs`
- [Voice audio](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/voice.rs): `shell/src/voice.rs`
- [Linux app integration](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/shell/src/linux_apps.rs): `shell/src/linux_apps.rs`

### Linux kernel

- **Linux kernel**
- [Modem remoteproc](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/kernel/mss/qcom_q6v5_mss.c): `kernel/mss/qcom_q6v5_mss.c`
- [Q6 voice driver](https://github.com/cheipstudio-cmyk/cheip-os/blob/main/kernel/q6voice/q6voice.c): `kernel/q6voice/q6voice.c`

### Other components

- **Phone user**
- **Network services**

## Connections

- Phone user → Shell runtime: uses (evidence: `README.md`)
- Shell runtime → UI controller: wires UI (evidence: `shell/src/lib.rs`)
- UI controller → Settings: routes settings (evidence: `shell/src/controller.rs`)
- UI controller → App Store: routes Store (evidence: `shell/src/controller.rs`)
- UI controller → Web browser: routes browser (evidence: `shell/src/controller.rs`)
- UI controller → Files and media: routes files (evidence: `shell/src/controller.rs`)
- UI controller → Mail: routes mail (evidence: `shell/src/controller.rs`)
- UI controller → Calendar and clock: updates clock (evidence: `shell/src/controller.rs`)
- UI controller → System services: reads services (evidence: `shell/src/controller.rs`)
- UI controller → OS updates: checks updates (evidence: `shell/src/controller.rs`)
- UI controller → App options: routes options (evidence: `shell/src/ctl_appopts.rs`)
- UI controller → Home and windows: controls apps (evidence: `shell/src/ctl_wl.rs`)
- UI controller → Calls and messages: routes calls (evidence: `shell/src/ctl_comm.rs`)
- UI controller → App metadata: reads versions (evidence: `shell/src/appinfo.rs`)
- Web browser → Web engine: sends commands (evidence: `shell/src/ctl_browser.rs`)
- Web browser → Network services: requests web data
- Files and media → File access: lists files (evidence: `shell/src/ctl_files.rs`)
- Files and media → Media indexing: uses media index (evidence: `shell/src/ctl_files.rs`)
- Files and media → Audio player: plays media (evidence: `shell/src/ctl_files.rs`)
- App Store → Network services: fetches catalog (evidence: `shell/src/ctl_store.rs`)
- App Store → Linux app integration: launches Linux apps (evidence: `shell/src/ctl_store.rs`)
- Settings → System services: configures device (evidence: `shell/src/ctl_settings.rs`)
- OS updates → Network services: checks releases
- Calls and messages → Modem interface: uses modem (evidence: `shell/src/ctl_comm.rs`)
- Calls and messages → Voice audio: uses voice audio (evidence: `shell/src/ctl_comm.rs`)
- Voice audio → Q6 voice driver: uses driver
- Modem interface → Modem remoteproc: boots subsystem
- Linux kernel → Modem remoteproc: includes driver
- Linux kernel → Q6 voice driver: includes driver
