# loganthp/iconmorph architecture

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

- Interactive diagram: https://gitdiagram.com/loganthp/iconmorph
- Repository: https://github.com/loganthp/iconmorph

## Overview

IconMorph is a desktop icon-customization app: users select a folder or shortcut, design or choose an icon, preview it, apply it, and can later restore earlier designs. The React/Tauri boundary invokes a Rust engine that generates and applies native icons, with persistent history and platform-specific adapters. The README documents the product capabilities and broad runtime flow; sampled source confirms parts of the engine, IPC, and UI state behavior. Some feature implementations and command handlers were not sampled, so their internal links are limited to documented relationships.

Main entry points: [`src/App.tsx`](https://github.com/loganthp/iconmorph/blob/main/src/App.tsx) (App workspace), [`crates/iconmorph-core/src/engine.rs`](https://github.com/loganthp/iconmorph/blob/main/crates/iconmorph-core/src/engine.rs) (Engine orchestration), [`src/lib/ipc.ts`](https://github.com/loganthp/iconmorph/blob/main/src/lib/ipc.ts) (Typed IPC), [`src/features/explore`](https://github.com/loganthp/iconmorph/tree/main/src/features/explore) (Home and Explore)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_app["App workspace<br/>[App.tsx]"]
  node_browse["Home and Explore"]
  node_studio["Icon Studio"]
  node_shelf["Character Shelf<br/>[CharacterShelf.tsx]"]
  node_theatre["Desktop Theatre<br/>[DesktopTheatre.tsx]"]
  node_themes["Themes<br/>[Themes.tsx]"]
  node_capsule["Time Capsule<br/>[TimeCapsule.tsx]"]
  node_state["UI state<br/>[app.ts]"]
  node_studio_state["Design state<br/>[studio.ts]"]
  node_assets["Collections and assets<br/>[collections.ts]"]
end

subgraph group_shell["Tauri boundary"]
  node_ipc["Typed IPC<br/>[ipc.ts]"]
  node_commands["Tauri commands<br/>[commands.rs]"]
  node_live_shell["Live helper control<br/>[live.rs]"]
end

subgraph group_engine["Icon engine"]
  node_engine["Engine orchestration<br/>[engine.rs]"]
  node_compose["Icon composition<br/>[compose.rs]"]
  node_raster["Raster processing<br/>[raster.rs]"]
  node_encode["Icon encoding<br/>[encode.rs]"]
  node_store[("History and assets<br/>[store.rs]")]
  node_image_io["Image input<br/>[image_io.rs]"]
end

subgraph group_platform["Native integration"]
  node_platform_adapter["Platform adapters<br/>[mod.rs]"]
  node_windows_live["Windows live icons<br/>[windows_live.rs]"]
  node_native_os["Operating system"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_browse
node_app -->|"routes to"| node_studio
node_app -->|"routes to"| node_themes
node_app -->|"routes to"| node_capsule
node_app -->|"opens"| node_theatre
node_browse -->|"uses"| node_shelf
node_browse -->|"reads"| node_state
node_app -->|"loads"| node_state
node_studio -.->|"edits"| node_studio_state
node_studio -.->|"requests previews"| node_ipc
node_shelf -->|"browses"| node_assets
node_themes -.->|"applies batch"| node_ipc
node_capsule -.->|"requests restore"| node_ipc
node_theatre -->|"reads"| node_state
node_ipc -->|"invokes"| node_commands
node_commands -->|"dispatches"| node_engine
node_engine -->|"decodes"| node_image_io
node_engine -->|"composes"| node_compose
node_compose -->|"uses"| node_raster
node_engine -->|"encodes"| node_encode
node_encode -->|"processes"| node_raster
node_engine -->|"reads and writes"| node_store
node_engine -->|"applies icons"| node_platform_adapter
node_platform_adapter -->|"sets metadata"| node_native_os
node_ipc -.->|"controls opt-in"| node_live_shell
node_live_shell -.->|"starts helper"| node_windows_live
node_windows_live -.->|"animates icons"| node_native_os

click node_app "https://github.com/loganthp/iconmorph/blob/main/src/App.tsx"
click node_browse "https://github.com/loganthp/iconmorph/tree/main/src/features/explore"
click node_studio "https://github.com/loganthp/iconmorph/tree/main/src/features/icon-studio"
click node_shelf "https://github.com/loganthp/iconmorph/blob/main/src/features/icon-studio/CharacterShelf.tsx"
click node_theatre "https://github.com/loganthp/iconmorph/blob/main/src/features/desktop-theatre/DesktopTheatre.tsx"
click node_themes "https://github.com/loganthp/iconmorph/blob/main/src/features/theme-studio/Themes.tsx"
click node_capsule "https://github.com/loganthp/iconmorph/blob/main/src/features/time-capsule/TimeCapsule.tsx"
click node_state "https://github.com/loganthp/iconmorph/blob/main/src/stores/app.ts"
click node_studio_state "https://github.com/loganthp/iconmorph/blob/main/src/stores/studio.ts"
click node_assets "https://github.com/loganthp/iconmorph/blob/main/src/lib/collections.ts"
click node_ipc "https://github.com/loganthp/iconmorph/blob/main/src/lib/ipc.ts"
click node_commands "https://github.com/loganthp/iconmorph/blob/main/src-tauri/src/commands.rs"
click node_live_shell "https://github.com/loganthp/iconmorph/blob/main/src-tauri/src/live.rs"
click node_engine "https://github.com/loganthp/iconmorph/blob/main/crates/iconmorph-core/src/engine.rs"
click node_compose "https://github.com/loganthp/iconmorph/blob/main/crates/iconmorph-core/src/compose.rs"
click node_raster "https://github.com/loganthp/iconmorph/blob/main/crates/iconmorph-core/src/raster.rs"
click node_encode "https://github.com/loganthp/iconmorph/blob/main/crates/iconmorph-core/src/encode.rs"
click node_store "https://github.com/loganthp/iconmorph/blob/main/crates/iconmorph-core/src/store.rs"
click node_image_io "https://github.com/loganthp/iconmorph/blob/main/crates/iconmorph-core/src/image_io.rs"
click node_platform_adapter "https://github.com/loganthp/iconmorph/blob/main/crates/iconmorph-core/src/platform/mod.rs"
click node_windows_live "https://github.com/loganthp/iconmorph/blob/main/crates/iconmorph-core/src/platform/windows_live.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_browse,node_studio,node_shelf,node_theatre,node_themes,node_capsule,node_state,node_studio_state,node_assets,node_user toneBlue
class node_ipc,node_commands,node_live_shell toneAmber
class node_engine,node_compose,node_raster,node_encode,node_store,node_image_io toneMint
class node_platform_adapter,node_windows_live,node_native_os toneRose
```

## Components

### Desktop interface

- [App workspace](https://github.com/loganthp/iconmorph/blob/main/src/App.tsx): `src/App.tsx`
- [Home and Explore](https://github.com/loganthp/iconmorph/tree/main/src/features/explore): `src/features/explore`
- [Icon Studio](https://github.com/loganthp/iconmorph/tree/main/src/features/icon-studio): `src/features/icon-studio`
- [Character Shelf](https://github.com/loganthp/iconmorph/blob/main/src/features/icon-studio/CharacterShelf.tsx): `src/features/icon-studio/CharacterShelf.tsx`
- [Desktop Theatre](https://github.com/loganthp/iconmorph/blob/main/src/features/desktop-theatre/DesktopTheatre.tsx): `src/features/desktop-theatre/DesktopTheatre.tsx`
- [Themes](https://github.com/loganthp/iconmorph/blob/main/src/features/theme-studio/Themes.tsx): `src/features/theme-studio/Themes.tsx`
- [Time Capsule](https://github.com/loganthp/iconmorph/blob/main/src/features/time-capsule/TimeCapsule.tsx): `src/features/time-capsule/TimeCapsule.tsx`
- [UI state](https://github.com/loganthp/iconmorph/blob/main/src/stores/app.ts): `src/stores/app.ts`
- [Design state](https://github.com/loganthp/iconmorph/blob/main/src/stores/studio.ts): `src/stores/studio.ts`
- [Collections and assets](https://github.com/loganthp/iconmorph/blob/main/src/lib/collections.ts): `src/lib/collections.ts`

### Tauri boundary

- [Typed IPC](https://github.com/loganthp/iconmorph/blob/main/src/lib/ipc.ts): `src/lib/ipc.ts`
- [Tauri commands](https://github.com/loganthp/iconmorph/blob/main/src-tauri/src/commands.rs): `src-tauri/src/commands.rs`
- [Live helper control](https://github.com/loganthp/iconmorph/blob/main/src-tauri/src/live.rs): `src-tauri/src/live.rs`

### Icon engine

- [Engine orchestration](https://github.com/loganthp/iconmorph/blob/main/crates/iconmorph-core/src/engine.rs): `crates/iconmorph-core/src/engine.rs`
- [Icon composition](https://github.com/loganthp/iconmorph/blob/main/crates/iconmorph-core/src/compose.rs): `crates/iconmorph-core/src/compose.rs`
- [Raster processing](https://github.com/loganthp/iconmorph/blob/main/crates/iconmorph-core/src/raster.rs): `crates/iconmorph-core/src/raster.rs`
- [Icon encoding](https://github.com/loganthp/iconmorph/blob/main/crates/iconmorph-core/src/encode.rs): `crates/iconmorph-core/src/encode.rs`
- [History and assets](https://github.com/loganthp/iconmorph/blob/main/crates/iconmorph-core/src/store.rs): `crates/iconmorph-core/src/store.rs`
- [Image input](https://github.com/loganthp/iconmorph/blob/main/crates/iconmorph-core/src/image_io.rs): `crates/iconmorph-core/src/image_io.rs`

### Native integration

- [Platform adapters](https://github.com/loganthp/iconmorph/blob/main/crates/iconmorph-core/src/platform/mod.rs): `crates/iconmorph-core/src/platform/mod.rs`
- [Windows live icons](https://github.com/loganthp/iconmorph/blob/main/crates/iconmorph-core/src/platform/windows_live.rs): `crates/iconmorph-core/src/platform/windows_live.rs`
- **Operating system**

### Other components

- **User**

## Connections

- User → App workspace: uses (evidence: `README.md`)
- App workspace → Home and Explore: routes to (evidence: `src/App.tsx`)
- App workspace → Icon Studio: routes to (evidence: `src/App.tsx`)
- App workspace → Themes: routes to (evidence: `src/App.tsx`)
- App workspace → Time Capsule: routes to (evidence: `src/App.tsx`)
- App workspace → Desktop Theatre: opens (evidence: `src/App.tsx`)
- Home and Explore → Character Shelf: uses (evidence: `src/features/explore/Explore.tsx`)
- Home and Explore → UI state: reads (evidence: `src/features/explore/Explore.tsx`)
- App workspace → UI state: loads (evidence: `src/App.tsx`)
- Icon Studio → Design state: edits (evidence: `src/features/icon-studio/usePreview.ts`)
- Icon Studio → Typed IPC: requests previews (evidence: `src/features/icon-studio/usePreview.ts`)
- Character Shelf → Collections and assets: browses (evidence: `src/lib/collections.ts`)
- Themes → Typed IPC: applies batch (evidence: `src/features/theme-studio/Themes.tsx`)
- Time Capsule → Typed IPC: requests restore (evidence: `src/features/time-capsule/TimeCapsule.tsx`)
- Desktop Theatre → UI state: reads (evidence: `src/features/desktop-theatre/DesktopTheatre.tsx`)
- Typed IPC → Tauri commands: invokes (evidence: `README.md`)
- Tauri commands → Engine orchestration: dispatches (evidence: `README.md`)
- Engine orchestration → Image input: decodes (evidence: `crates/iconmorph-core/src/engine.rs`)
- Engine orchestration → Icon composition: composes (evidence: `crates/iconmorph-core/src/engine.rs`)
- Icon composition → Raster processing: uses (evidence: `crates/iconmorph-core/src/compose.rs`)
- Engine orchestration → Icon encoding: encodes (evidence: `crates/iconmorph-core/src/engine.rs`)
- Icon encoding → Raster processing: processes (evidence: `crates/iconmorph-core/src/encode.rs`)
- Engine orchestration → History and assets: reads and writes (evidence: `crates/iconmorph-core/src/engine.rs`)
- Engine orchestration → Platform adapters: applies icons (evidence: `README.md`)
- Platform adapters → Operating system: sets metadata (evidence: `README.md`)
- Typed IPC → Live helper control: controls opt-in
- Live helper control → Windows live icons: starts helper
- Windows live icons → Operating system: animates icons (evidence: `README.md`)
