# notdeathcookie/glasspulse-ios26 architecture

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

## Overview

GlassPulse is a native iOS focus timer with Pomodoro cycles, ambient sound, session statistics, Liquid Glass experiments, and LiveContainer backup/automation tools. The main workflow is to configure and run a focus session, optionally play a soundscape, then persist completed focus sessions for statistics and backup. The app shell coordinates the tabs, mini-timer, and deep links. Source excerpts support the main timer, audio, motion, and persistence relationships; some view wiring and the backup flow are documented but not fully sampled.

Main entry points: [`Sources/ContentView.swift`](https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/ContentView.swift) (Tab Shell), [`Sources/RuntimeInspectorView.swift`](https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/RuntimeInspectorView.swift) (Runtime Tools), [`Sources/LiquidGlassLabView.swift`](https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/LiquidGlassLabView.swift) (Liquid Lab), [`Sources/FocusEngine.swift`](https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/FocusEngine.swift) (Pomodoro Engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Shell"]
  node_app_entry["App Entry"]
  node_shell["Tab Shell<br/>[ContentView.swift]"]
end

subgraph group_focus["Focus Sessions"]
  node_focus_view["Focus Screen"]
  node_timer["Pomodoro Engine<br/>[FocusEngine.swift]"]
  node_audio["Sound Engine"]
end

subgraph group_insights["History and Tools"]
  node_session_model[("Session Records")]
  node_stats["Stats View<br/>[StatsView.swift]"]
  node_runtime["Runtime Tools"]
  node_backup["Backup Format"]
end

subgraph group_visuals["Interactive Visuals"]
  node_motion["Motion Manager"]
  node_lab["Liquid Lab"]
  node_backdrop["Aurora Backdrop"]
  node_shaders["Metal Shaders"]
end

node_user(("iOS User"))
node_shortcuts(("Shortcuts"))
node_audio_output["Audio Output"]
node_motion_sensor["Device Motion"]

node_user -.->|"opens"| node_app_entry
node_app_entry -->|"shows"| node_shell
node_shell -->|"shows"| node_focus_view
node_shell -->|"configures"| node_timer
node_shell -->|"configures"| node_audio
node_shell -->|"configures"| node_motion
node_shell -->|"shows"| node_lab
node_shell -->|"shows"| node_stats
node_shell -->|"shows"| node_runtime
node_shortcuts -->|"opens links"| node_shell
node_focus_view -->|"controls"| node_timer
node_focus_view -->|"controls"| node_audio
node_timer -->|"writes"| node_session_model
node_stats -->|"reads"| node_session_model
node_runtime -->|"restores"| node_session_model
node_runtime -->|"encodes"| node_backup
node_runtime -->|"backs up presets"| node_timer
node_audio -->|"renders sound"| node_audio_output
node_motion -->|"reads motion"| node_motion_sensor
node_lab -->|"uses tilt"| node_motion
node_lab -->|"renders"| node_backdrop
node_stats -->|"renders"| node_backdrop
node_runtime -->|"renders"| node_backdrop
node_lab -->|"invokes"| node_shaders

click node_app_entry "https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/GlassPulseApp.swift"
click node_shell "https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/ContentView.swift"
click node_focus_view "https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/PulseFocusView.swift"
click node_timer "https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/FocusEngine.swift"
click node_audio "https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/AmbientSoundEngine.swift"
click node_session_model "https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/SessionModels.swift"
click node_stats "https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/StatsView.swift"
click node_runtime "https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/RuntimeInspectorView.swift"
click node_backup "https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/SessionModels.swift"
click node_motion "https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/MotionManager.swift"
click node_lab "https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/LiquidGlassLabView.swift"
click node_backdrop "https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/AnimatedAuroraBackdrop.swift"
click node_shaders "https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/LiquidShaders.metal"

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_entry,node_shell,node_user toneBlue
class node_focus_view,node_timer,node_audio toneAmber
class node_session_model,node_stats,node_runtime,node_backup toneMint
class node_motion,node_lab,node_backdrop,node_shaders toneRose
class node_shortcuts,node_audio_output,node_motion_sensor toneIndigo
```

## Components

### App Shell

- [App Entry](https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/GlassPulseApp.swift): `Sources/GlassPulseApp.swift`
- [Tab Shell](https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/ContentView.swift): `Sources/ContentView.swift`

### Focus Sessions

- [Focus Screen](https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/PulseFocusView.swift): `Sources/PulseFocusView.swift`
- [Pomodoro Engine](https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/FocusEngine.swift): `Sources/FocusEngine.swift`
- [Sound Engine](https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/AmbientSoundEngine.swift): `Sources/AmbientSoundEngine.swift`

### History and Tools

- [Session Records](https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/SessionModels.swift): `Sources/SessionModels.swift`
- [Stats View](https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/StatsView.swift): `Sources/StatsView.swift`
- [Runtime Tools](https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/RuntimeInspectorView.swift): `Sources/RuntimeInspectorView.swift`
- [Backup Format](https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/SessionModels.swift): `Sources/SessionModels.swift`

### Interactive Visuals

- [Motion Manager](https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/MotionManager.swift): `Sources/MotionManager.swift`
- [Liquid Lab](https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/LiquidGlassLabView.swift): `Sources/LiquidGlassLabView.swift`
- [Aurora Backdrop](https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/AnimatedAuroraBackdrop.swift): `Sources/AnimatedAuroraBackdrop.swift`
- [Metal Shaders](https://github.com/notdeathcookie/glasspulse-ios26/blob/main/Sources/LiquidShaders.metal): `Sources/LiquidShaders.metal`

### Other components

- **iOS User**
- **Shortcuts**
- **Audio Output**
- **Device Motion**

## Connections

- iOS User → App Entry: opens
- App Entry → Tab Shell: shows (evidence: `Sources/GlassPulseApp.swift`)
- Tab Shell → Focus Screen: shows (evidence: `Sources/ContentView.swift`)
- Tab Shell → Pomodoro Engine: configures (evidence: `Sources/ContentView.swift`)
- Tab Shell → Sound Engine: configures (evidence: `Sources/ContentView.swift`)
- Tab Shell → Motion Manager: configures (evidence: `Sources/ContentView.swift`)
- Tab Shell → Liquid Lab: shows (evidence: `Sources/ContentView.swift`)
- Tab Shell → Stats View: shows (evidence: `Sources/ContentView.swift`)
- Tab Shell → Runtime Tools: shows (evidence: `Sources/ContentView.swift`)
- Shortcuts → Tab Shell: opens links (evidence: `README.md`)
- Focus Screen → Pomodoro Engine: controls (evidence: `Sources/PulseFocusView.swift`)
- Focus Screen → Sound Engine: controls (evidence: `Sources/PulseFocusView.swift`)
- Pomodoro Engine → Session Records: writes (evidence: `Sources/FocusEngine.swift`)
- Stats View → Session Records: reads (evidence: `Sources/StatsView.swift`)
- Runtime Tools → Session Records: restores (evidence: `Sources/RuntimeInspectorView.swift`)
- Runtime Tools → Backup Format: encodes (evidence: `README.md`)
- Runtime Tools → Pomodoro Engine: backs up presets (evidence: `README.md`)
- Sound Engine → Audio Output: renders sound (evidence: `Sources/AmbientSoundEngine.swift`)
- Motion Manager → Device Motion: reads motion (evidence: `Sources/MotionManager.swift`)
- Liquid Lab → Motion Manager: uses tilt (evidence: `Sources/LiquidGlassLabView.swift`)
- Liquid Lab → Aurora Backdrop: renders (evidence: `Sources/LiquidGlassLabView.swift`)
- Stats View → Aurora Backdrop: renders (evidence: `Sources/StatsView.swift`)
- Runtime Tools → Aurora Backdrop: renders (evidence: `Sources/RuntimeInspectorView.swift`)
- Liquid Lab → Metal Shaders: invokes (evidence: `Sources/LiquidGlassLabView.swift`)
