# new-sinote/rustify architecture

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

- Interactive diagram: https://gitdiagram.com/new-sinote/rustify
- Repository: https://github.com/new-sinote/rustify

## Overview

Rustify is a Windows desktop shell for Spotify’s official Web Player. The main workflow is user launch and sign-in through the embedded WebView, followed by playback in Spotify; native window, tray, and media-session features support that experience. The sampled implementation is concentrated in one Rust file, so several responsibilities share its path. README claims preserve important capabilities not fully visible in the excerpts; the separate Tauri spike is represented as a prototype, not as part of the default app.

Main entry points: [`app/src/main.rs`](https://github.com/new-sinote/rustify/blob/main/app/src/main.rs) (Rustify runtime), [`spike/src-tauri/src/main.rs`](https://github.com/new-sinote/rustify/blob/main/spike/src-tauri/src/main.rs) (Tauri spike)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Desktop shell"]
  node_app["Rustify runtime<br/>[main.rs]"]
  node_window["Native window<br/>[main.rs]"]
  node_saved_state["Window state<br/>[main.rs]"]
  node_log_file["Runtime log<br/>[main.rs]"]
end

subgraph group_player["Spotify player"]
  node_webview["WebView2 player<br/>[main.rs]"]
  node_spotify["Spotify Web Player"]
  node_ublock["Optional uBOL<br/>[main.rs]"]
end

subgraph group_windows["Windows integration"]
  node_tray["Tray controls<br/>[main.rs]"]
  node_smtc["Media session<br/>[main.rs]"]
end

subgraph group_prototype["Tauri prototype"]
  node_spike["Tauri spike<br/>[main.rs]"]
  node_spike_tray["Spike tray<br/>[main.rs]"]
end

node_user(("User"))

node_user -->|"launches"| node_app
node_app -->|"creates"| node_window
node_window -->|"hosts"| node_webview
node_webview -->|"loads"| node_spotify
node_user -->|"signs in"| node_spotify
node_app -->|"saves position"| node_saved_state
node_app -->|"writes"| node_log_file
node_user -->|"controls"| node_tray
node_tray -->|"shows or hides"| node_window
node_webview -->|"integrates playback"| node_smtc
node_app -.->|"optionally loads"| node_ublock
node_user -->|"launches prototype"| node_spike
node_spike -->|"opens"| node_spotify
node_spike -->|"sets up"| node_spike_tray

click node_app "https://github.com/new-sinote/rustify/blob/main/app/src/main.rs"
click node_window "https://github.com/new-sinote/rustify/blob/main/app/src/main.rs"
click node_tray "https://github.com/new-sinote/rustify/blob/main/app/src/main.rs"
click node_saved_state "https://github.com/new-sinote/rustify/blob/main/app/src/main.rs"
click node_log_file "https://github.com/new-sinote/rustify/blob/main/app/src/main.rs"
click node_webview "https://github.com/new-sinote/rustify/blob/main/app/src/main.rs"
click node_smtc "https://github.com/new-sinote/rustify/blob/main/app/src/main.rs"
click node_ublock "https://github.com/new-sinote/rustify/blob/main/app/src/main.rs"
click node_spike "https://github.com/new-sinote/rustify/blob/main/spike/src-tauri/src/main.rs"
click node_spike_tray "https://github.com/new-sinote/rustify/blob/main/spike/src-tauri/src/main.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_app,node_window,node_saved_state,node_log_file,node_user toneBlue
class node_webview,node_spotify,node_ublock toneAmber
class node_tray,node_smtc toneMint
class node_spike,node_spike_tray toneRose
```

## Components

### Desktop shell

- [Rustify runtime](https://github.com/new-sinote/rustify/blob/main/app/src/main.rs): `app/src/main.rs`
- [Native window](https://github.com/new-sinote/rustify/blob/main/app/src/main.rs): `app/src/main.rs`
- [Window state](https://github.com/new-sinote/rustify/blob/main/app/src/main.rs): `app/src/main.rs`
- [Runtime log](https://github.com/new-sinote/rustify/blob/main/app/src/main.rs): `app/src/main.rs`

### Spotify player

- [WebView2 player](https://github.com/new-sinote/rustify/blob/main/app/src/main.rs): `app/src/main.rs`
- **Spotify Web Player**
- [Optional uBOL](https://github.com/new-sinote/rustify/blob/main/app/src/main.rs): `app/src/main.rs`

### Windows integration

- [Tray controls](https://github.com/new-sinote/rustify/blob/main/app/src/main.rs): `app/src/main.rs`
- [Media session](https://github.com/new-sinote/rustify/blob/main/app/src/main.rs): `app/src/main.rs`

### Tauri prototype

- [Tauri spike](https://github.com/new-sinote/rustify/blob/main/spike/src-tauri/src/main.rs): `spike/src-tauri/src/main.rs`
- [Spike tray](https://github.com/new-sinote/rustify/blob/main/spike/src-tauri/src/main.rs): `spike/src-tauri/src/main.rs`

### Other components

- **User**

## Connections

- User → Rustify runtime: launches (evidence: `README.md`)
- Rustify runtime → Native window: creates (evidence: `README.md`)
- Native window → WebView2 player: hosts (evidence: `README.md`)
- WebView2 player → Spotify Web Player: loads (evidence: `README.md`)
- User → Spotify Web Player: signs in (evidence: `README.md`)
- Rustify runtime → Window state: saves position (evidence: `app/src/main.rs`)
- Rustify runtime → Runtime log: writes (evidence: `app/src/main.rs`)
- User → Tray controls: controls (evidence: `README.md`)
- Tray controls → Native window: shows or hides (evidence: `README.md`)
- WebView2 player → Media session: integrates playback (evidence: `README.md`)
- Rustify runtime → Optional uBOL: optionally loads (evidence: `README.md`)
- User → Tauri spike: launches prototype (evidence: `spike/src-tauri/src/main.rs`)
- Tauri spike → Spotify Web Player: opens (evidence: `spike/src-tauri/src/main.rs`)
- Tauri spike → Spike tray: sets up (evidence: `spike/src-tauri/src/main.rs`)
