# alejandrobast/itsukimanager architecture

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

- Interactive diagram: https://gitdiagram.com/alejandrobast/itsukimanager
- Repository: https://github.com/alejandrobast/itsukimanager

## Overview

ItsukiManager is a Windows disk-usage and cleanup product, exposed through a Tauri desktop app and the `itsuki` CLI. The main workflow scans a drive, builds a compact size tree, and presents folder, large-file, type, and report views; users can then inspect duplicates or safely clean selected items. History and drive-space alerts are additional product branches. The graph preserves documented capabilities, but some backend command wiring and unsampled modules are shown only as unverified links because their call sites were not excerpted.

Main entry points: [`app/src/api.ts`](https://github.com/alejandrobast/itsukimanager/blob/main/app/src/api.ts) (Tauri API), [`app/src/App.tsx`](https://github.com/alejandrobast/itsukimanager/blob/main/app/src/App.tsx) (App shell), [`crates/itsuki-core/src/scan/mod.rs`](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/scan/mod.rs) (Scan engines), [`crates/itsuki-cli/src/main.rs`](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-cli/src/main.rs) (CLI commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop app"]
  node_app_shell["App shell<br/>[App.tsx]"]
  node_frontend_api["Tauri API<br/>[api.ts]"]
  node_job_hooks["Job hooks<br/>[hooks.ts]"]
  node_analysis_views["Analysis views<br/>[AnalyzeView.tsx]"]
  node_large_files["Large files<br/>[LargeFilesView.tsx]"]
  node_duplicates_view["Duplicates view<br/>[DuplicatesView.tsx]"]
  node_cleanup_view["Cleanup view<br/>[CleanupView.tsx]"]
  node_ui_primitives["UI primitives<br/>[ui.tsx]"]
  node_icon_set["Icon set<br/>[Icon.tsx]"]
  node_desktop_state["App state<br/>[state.rs]"]
end

subgraph group_scan["Scanning and analysis"]
  node_scan_engines["Scan engines<br/>[mod.rs]"]
  node_mft_parser["MFT parser<br/>[parse.rs]"]
  node_directory_walk["Directory walker<br/>[walk.rs]"]
  node_size_tree["Size tree<br/>[tree.rs]"]
  node_system_info["System info<br/>[system.rs]"]
  node_query_analysis["Tree queries<br/>[query.rs]"]
  node_duplicate_engine["Duplicate finder<br/>[dupes.rs]"]
end

subgraph group_cleanup["Safe cleanup"]
  node_cleanup_rules["Cleanup rules<br/>[rules.rs]"]
  node_cleanup_engine["Cleanup engine<br/>[mod.rs]"]
  node_safe_delete["Safe deletion<br/>[delete.rs]"]
end

subgraph group_history["History and alerts"]
  node_history_store[("Scan history<br/>[history.rs]")]
  node_drive_alerts["Drive alerts<br/>[alerts.rs]"]
end

subgraph group_cli["Command line"]
  node_cli_commands["CLI commands<br/>[main.rs]"]
  node_cli_cleanup["CLI cleanup<br/>[limpieza.rs]"]
  node_cli_history["CLI history<br/>[historial.rs]"]
  node_cli_output["CLI output<br/>[ui.rs]"]
end

node_desktop_user(("Desktop user"))
node_cli_user(("CLI user"))

node_desktop_user -->|"uses"| node_app_shell
node_app_shell -->|"renders"| node_analysis_views
node_app_shell -->|"renders"| node_large_files
node_app_shell -->|"renders"| node_duplicates_view
node_app_shell -->|"renders"| node_cleanup_view
node_analysis_views -->|"requests data"| node_frontend_api
node_large_files -->|"requests data"| node_frontend_api
node_duplicates_view -->|"requests data"| node_frontend_api
node_cleanup_view -.->|"requests cleanup"| node_frontend_api
node_job_hooks -->|"listens progress"| node_frontend_api
node_ui_primitives -->|"renders icons"| node_icon_set
node_app_shell -->|"calls settings"| node_frontend_api
node_frontend_api -.->|"invokes commands"| node_desktop_state
node_desktop_state -.->|"scans and caches"| node_scan_engines
node_scan_engines -->|"parses MFT"| node_mft_parser
node_scan_engines -->|"walks directories"| node_directory_walk
node_directory_walk -->|"builds entries"| node_size_tree
node_scan_engines -->|"returns tree"| node_size_tree
node_scan_engines -->|"reads system"| node_system_info
node_analysis_views -.->|"shows insights"| node_query_analysis
node_duplicates_view -.->|"finds duplicates"| node_duplicate_engine
node_cleanup_view -.->|"requests scan"| node_cleanup_engine
node_cleanup_engine -->|"applies rules"| node_cleanup_rules
node_cleanup_engine -->|"deletes selected"| node_safe_delete
node_cli_user -->|"runs commands"| node_cli_commands
node_cli_commands -->|"dispatches cleanup"| node_cli_cleanup
node_cli_commands -->|"dispatches history"| node_cli_history
node_cli_commands -->|"formats output"| node_cli_output
node_cli_cleanup -.->|"uses cleanup"| node_cleanup_engine
node_cli_history -.->|"uses history"| node_history_store
node_history_store -->|"compares snapshots"| node_size_tree
node_drive_alerts -.->|"reads growth data"| node_history_store
node_desktop_state -.->|"provides alerts"| node_drive_alerts

click node_app_shell "https://github.com/alejandrobast/itsukimanager/blob/main/app/src/App.tsx"
click node_frontend_api "https://github.com/alejandrobast/itsukimanager/blob/main/app/src/api.ts"
click node_job_hooks "https://github.com/alejandrobast/itsukimanager/blob/main/app/src/hooks.ts"
click node_analysis_views "https://github.com/alejandrobast/itsukimanager/blob/main/app/src/components/AnalyzeView.tsx"
click node_large_files "https://github.com/alejandrobast/itsukimanager/blob/main/app/src/components/LargeFilesView.tsx"
click node_duplicates_view "https://github.com/alejandrobast/itsukimanager/blob/main/app/src/components/DuplicatesView.tsx"
click node_cleanup_view "https://github.com/alejandrobast/itsukimanager/blob/main/app/src/components/CleanupView.tsx"
click node_ui_primitives "https://github.com/alejandrobast/itsukimanager/blob/main/app/src/components/ui.tsx"
click node_icon_set "https://github.com/alejandrobast/itsukimanager/blob/main/app/src/components/Icon.tsx"
click node_scan_engines "https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/scan/mod.rs"
click node_mft_parser "https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/scan/mft/parse.rs"
click node_directory_walk "https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/scan/walk.rs"
click node_size_tree "https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/tree.rs"
click node_system_info "https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/system.rs"
click node_query_analysis "https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/query.rs"
click node_duplicate_engine "https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/dupes.rs"
click node_desktop_state "https://github.com/alejandrobast/itsukimanager/blob/main/app/src-tauri/src/state.rs"
click node_cleanup_rules "https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/clean/rules.rs"
click node_cleanup_engine "https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/clean/mod.rs"
click node_safe_delete "https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/clean/delete.rs"
click node_history_store "https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/history.rs"
click node_drive_alerts "https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/alerts.rs"
click node_cli_commands "https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-cli/src/main.rs"
click node_cli_cleanup "https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-cli/src/limpieza.rs"
click node_cli_history "https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-cli/src/historial.rs"
click node_cli_output "https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-cli/src/ui.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_shell,node_frontend_api,node_job_hooks,node_analysis_views,node_large_files,node_duplicates_view,node_cleanup_view,node_ui_primitives,node_icon_set,node_desktop_state,node_desktop_user,node_cli_user toneBlue
class node_scan_engines,node_mft_parser,node_directory_walk,node_size_tree,node_system_info,node_query_analysis,node_duplicate_engine toneAmber
class node_cleanup_rules,node_cleanup_engine,node_safe_delete toneMint
class node_history_store,node_drive_alerts toneRose
class node_cli_commands,node_cli_cleanup,node_cli_history,node_cli_output toneIndigo
```

## Components

### Desktop app

- [App shell](https://github.com/alejandrobast/itsukimanager/blob/main/app/src/App.tsx): `app/src/App.tsx`
- [Tauri API](https://github.com/alejandrobast/itsukimanager/blob/main/app/src/api.ts): `app/src/api.ts`
- [Job hooks](https://github.com/alejandrobast/itsukimanager/blob/main/app/src/hooks.ts): `app/src/hooks.ts`
- [Analysis views](https://github.com/alejandrobast/itsukimanager/blob/main/app/src/components/AnalyzeView.tsx): `app/src/components/AnalyzeView.tsx`
- [Large files](https://github.com/alejandrobast/itsukimanager/blob/main/app/src/components/LargeFilesView.tsx): `app/src/components/LargeFilesView.tsx`
- [Duplicates view](https://github.com/alejandrobast/itsukimanager/blob/main/app/src/components/DuplicatesView.tsx): `app/src/components/DuplicatesView.tsx`
- [Cleanup view](https://github.com/alejandrobast/itsukimanager/blob/main/app/src/components/CleanupView.tsx): `app/src/components/CleanupView.tsx`
- [UI primitives](https://github.com/alejandrobast/itsukimanager/blob/main/app/src/components/ui.tsx): `app/src/components/ui.tsx`
- [Icon set](https://github.com/alejandrobast/itsukimanager/blob/main/app/src/components/Icon.tsx): `app/src/components/Icon.tsx`
- [App state](https://github.com/alejandrobast/itsukimanager/blob/main/app/src-tauri/src/state.rs): `app/src-tauri/src/state.rs`

### Scanning and analysis

- [Scan engines](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/scan/mod.rs): `crates/itsuki-core/src/scan/mod.rs`
- [MFT parser](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/scan/mft/parse.rs): `crates/itsuki-core/src/scan/mft/parse.rs`
- [Directory walker](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/scan/walk.rs): `crates/itsuki-core/src/scan/walk.rs`
- [Size tree](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/tree.rs): `crates/itsuki-core/src/tree.rs`
- [System info](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/system.rs): `crates/itsuki-core/src/system.rs`
- [Tree queries](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/query.rs): `crates/itsuki-core/src/query.rs`
- [Duplicate finder](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/dupes.rs): `crates/itsuki-core/src/dupes.rs`

### Safe cleanup

- [Cleanup rules](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/clean/rules.rs): `crates/itsuki-core/src/clean/rules.rs`
- [Cleanup engine](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/clean/mod.rs): `crates/itsuki-core/src/clean/mod.rs`
- [Safe deletion](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/clean/delete.rs): `crates/itsuki-core/src/clean/delete.rs`

### History and alerts

- [Scan history](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/history.rs): `crates/itsuki-core/src/history.rs`
- [Drive alerts](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-core/src/alerts.rs): `crates/itsuki-core/src/alerts.rs`

### Command line

- [CLI commands](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-cli/src/main.rs): `crates/itsuki-cli/src/main.rs`
- [CLI cleanup](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-cli/src/limpieza.rs): `crates/itsuki-cli/src/limpieza.rs`
- [CLI history](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-cli/src/historial.rs): `crates/itsuki-cli/src/historial.rs`
- [CLI output](https://github.com/alejandrobast/itsukimanager/blob/main/crates/itsuki-cli/src/ui.rs): `crates/itsuki-cli/src/ui.rs`

### Other components

- **Desktop user**
- **CLI user**

## Connections

- Desktop user → App shell: uses (evidence: `README.md`)
- App shell → Analysis views: renders (evidence: `app/src/App.tsx`)
- App shell → Large files: renders (evidence: `app/src/App.tsx`)
- App shell → Duplicates view: renders (evidence: `app/src/App.tsx`)
- App shell → Cleanup view: renders (evidence: `app/src/App.tsx`)
- Analysis views → Tauri API: requests data (evidence: `app/src/components/AnalyzeView.tsx`)
- Large files → Tauri API: requests data (evidence: `app/src/components/LargeFilesView.tsx`)
- Duplicates view → Tauri API: requests data (evidence: `app/src/components/DuplicatesView.tsx`)
- Cleanup view → Tauri API: requests cleanup (evidence: `app/src/components/CleanupView.tsx`)
- Job hooks → Tauri API: listens progress (evidence: `app/src/hooks.ts`)
- UI primitives → Icon set: renders icons (evidence: `app/src/components/ui.tsx`)
- App shell → Tauri API: calls settings (evidence: `app/src/App.tsx`)
- Tauri API → App state: invokes commands
- App state → Scan engines: scans and caches
- Scan engines → MFT parser: parses MFT (evidence: `crates/itsuki-core/src/scan/mft/volume.rs`)
- Scan engines → Directory walker: walks directories (evidence: `crates/itsuki-core/src/scan/mod.rs`)
- Directory walker → Size tree: builds entries (evidence: `crates/itsuki-core/src/scan/walk.rs`)
- Scan engines → Size tree: returns tree (evidence: `crates/itsuki-core/src/scan/mod.rs`)
- Scan engines → System info: reads system (evidence: `crates/itsuki-core/src/scan/mft/volume.rs`)
- Analysis views → Tree queries: shows insights
- Duplicates view → Duplicate finder: finds duplicates
- Cleanup view → Cleanup engine: requests scan
- Cleanup engine → Cleanup rules: applies rules (evidence: `crates/itsuki-core/src/clean/mod.rs`)
- Cleanup engine → Safe deletion: deletes selected (evidence: `crates/itsuki-core/src/clean/mod.rs`)
- CLI user → CLI commands: runs commands (evidence: `README.md`)
- CLI commands → CLI cleanup: dispatches cleanup (evidence: `crates/itsuki-cli/src/main.rs`)
- CLI commands → CLI history: dispatches history (evidence: `crates/itsuki-cli/src/main.rs`)
- CLI commands → CLI output: formats output (evidence: `crates/itsuki-cli/src/main.rs`)
- CLI cleanup → Cleanup engine: uses cleanup
- CLI history → Scan history: uses history
- Scan history → Size tree: compares snapshots (evidence: `crates/itsuki-core/src/history.rs`)
- Drive alerts → Scan history: reads growth data
- App state → Drive alerts: provides alerts
