# yordindia/tidybyte architecture

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

- Interactive diagram: https://gitdiagram.com/yordindia/tidybyte
- Repository: https://github.com/yordindia/tidybyte

## Overview

TidyByte is a local-first product spanning an iOS photo cleaner, a macOS disk cleaner, and a multilingual marketing site. The user-facing pattern is to inspect reclaimable items, review proposed cleanup, and approve changes; on Mac, removed files go to Trash and History can restore them. The graph preserves the documented product areas and major iOS cleanup tools. Edges are limited to README statements and source-index references; unsampled implementation details are not inferred.

Main entry points: [`ios/Tidybyte/Features/Storage/StorageDashboardViewModel.swift`](https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/Features/Storage/StorageDashboardViewModel.swift) (Storage Dashboard Logic), [`ios/Tidybyte/Features/Cleanup/CleanupTool.swift`](https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/Features/Cleanup/CleanupTool.swift) (Cleanup Tools), [`website/src/lib/llms.ts`](https://github.com/yordindia/tidybyte/blob/main/website/src/lib/llms.ts) (Machine-readable Routes), [`ios/Tidybyte/App/TidybyteApp.swift`](https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/App/TidybyteApp.swift) (iOS App)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ios["iOS Photo Cleaner"]
  node_ios_app["iOS App<br/>[TidybyteApp.swift]"]
  node_cleanup_tools["Cleanup Tools<br/>[CleanupTool.swift]"]
  node_photo_library["Photo Library"]
  node_cleanup_models["Asset Summaries<br/>[AssetSummary.swift]"]
  node_swipe_review["Swipe Review"]
end

subgraph group_ios_storage["Storage and Shared"]
  node_storage_view["Storage Dashboard"]
  node_storage_model["Storage Dashboard Logic"]
  node_storage_history[("Storage Snapshots")]
  node_widget["Storage Widget"]
end

subgraph group_mac["Mac Disk Cleaner"]
  node_mac_app["Mac App"]
  node_mac_scan["File Scanning"]
  node_mac_rules["Cleanup Rules"]
  node_mac_review["Review Workspace"]
  node_mac_execute["Cleanup Execution"]
  node_mac_undo["History and Restore"]
  node_mac_store[("SQLite Store<br/>[SQLiteStore.swift]")]
end

subgraph group_monitor["Mac Monitoring"]
  node_monitor_engine["Monitoring Engine"]
  node_monitor_snapshot["System Snapshot"]
end

subgraph group_web["Marketing Site"]
  node_site_content["Site Content<br/>[pages.ts]"]
  node_site_tools["Tool Pages<br/>[tools.ts]"]
  node_site_routes["Machine-readable Routes<br/>[llms.ts]"]
end

node_user(("User"))

node_user -->|"uses"| node_ios_app
node_ios_app -.->|"offers tools"| node_cleanup_tools
node_cleanup_tools -.->|"reviews library"| node_photo_library
node_photo_library -->|"creates summaries"| node_cleanup_models
node_user -->|"reviews photos"| node_swipe_review
node_user -.->|"checks storage"| node_storage_view
node_storage_view -->|"renders"| node_storage_model
node_storage_model -->|"reads history"| node_storage_history
node_storage_model -->|"maps actions"| node_cleanup_tools
node_widget -.->|"shows snapshot"| node_storage_history
node_user -->|"uses"| node_mac_app
node_mac_app -.->|"scans files"| node_mac_scan
node_mac_scan -->|"applies rules"| node_mac_rules
node_user -->|"reviews findings"| node_mac_review
node_mac_review -.->|"approves cleanup"| node_mac_execute
node_mac_execute -.->|"records changes"| node_mac_undo
node_mac_undo -->|"uses persistence"| node_mac_store
node_user -.->|"monitors Mac"| node_monitor_engine
node_monitor_engine -->|"builds snapshot"| node_monitor_snapshot
node_site_content -->|"includes pages"| node_site_tools
node_site_routes -->|"reads page data"| node_site_content
node_site_routes -->|"uses tool data"| node_site_tools

click node_ios_app "https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/App/TidybyteApp.swift"
click node_cleanup_tools "https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/Features/Cleanup/CleanupTool.swift"
click node_photo_library "https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/Services/PhotoLibraryService.swift"
click node_cleanup_models "https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/Models/AssetSummary.swift"
click node_swipe_review "https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/Features/Swipe/SwipeSessionViewModel.swift"
click node_storage_view "https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/Features/Storage/StorageDashboardView.swift"
click node_storage_model "https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/Features/Storage/StorageDashboardViewModel.swift"
click node_storage_history "https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/Models/StorageSnapshot.swift"
click node_widget "https://github.com/yordindia/tidybyte/blob/main/ios/TidybyteWidget/StorageWidgetView.swift"
click node_mac_app "https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerAppKit/App/MacOSCleanerApp.swift"
click node_mac_scan "https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerCore/Services/ScanOrchestrator.swift"
click node_mac_rules "https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerCore/Services/CleanerRuleEngine.swift"
click node_mac_review "https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerAppKit/UI/Cleanup/CleanupWorkspace.swift"
click node_mac_execute "https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerCore/Services/ActionExecutor.swift"
click node_mac_undo "https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerCore/Services/UndoManagerService.swift"
click node_mac_store "https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerCore/Services/SQLiteStore.swift"
click node_monitor_engine "https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerCore/Services/Monitoring/MonitoringEngine.swift"
click node_monitor_snapshot "https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerCore/Services/Monitoring/SystemSnapshot.swift"
click node_site_content "https://github.com/yordindia/tidybyte/blob/main/website/src/data/pages.ts"
click node_site_tools "https://github.com/yordindia/tidybyte/blob/main/website/src/data/tools.ts"
click node_site_routes "https://github.com/yordindia/tidybyte/blob/main/website/src/lib/llms.ts"

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_ios_app,node_cleanup_tools,node_photo_library,node_cleanup_models,node_swipe_review,node_user toneBlue
class node_storage_view,node_storage_model,node_storage_history,node_widget toneAmber
class node_mac_app,node_mac_scan,node_mac_rules,node_mac_review,node_mac_execute,node_mac_undo,node_mac_store toneMint
class node_monitor_engine,node_monitor_snapshot toneRose
class node_site_content,node_site_tools,node_site_routes toneIndigo
```

## Components

### iOS Photo Cleaner

- [iOS App](https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/App/TidybyteApp.swift): `ios/Tidybyte/App/TidybyteApp.swift`
- [Cleanup Tools](https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/Features/Cleanup/CleanupTool.swift): `ios/Tidybyte/Features/Cleanup/CleanupTool.swift`
- [Photo Library](https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/Services/PhotoLibraryService.swift): `ios/Tidybyte/Services/PhotoLibraryService.swift`
- [Asset Summaries](https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/Models/AssetSummary.swift): `ios/Tidybyte/Models/AssetSummary.swift`
- [Swipe Review](https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/Features/Swipe/SwipeSessionViewModel.swift): `ios/Tidybyte/Features/Swipe/SwipeSessionViewModel.swift`

### Storage and Shared

- [Storage Dashboard](https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/Features/Storage/StorageDashboardView.swift): `ios/Tidybyte/Features/Storage/StorageDashboardView.swift`
- [Storage Dashboard Logic](https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/Features/Storage/StorageDashboardViewModel.swift): `ios/Tidybyte/Features/Storage/StorageDashboardViewModel.swift`
- [Storage Snapshots](https://github.com/yordindia/tidybyte/blob/main/ios/Tidybyte/Models/StorageSnapshot.swift): `ios/Tidybyte/Models/StorageSnapshot.swift`
- [Storage Widget](https://github.com/yordindia/tidybyte/blob/main/ios/TidybyteWidget/StorageWidgetView.swift): `ios/TidybyteWidget/StorageWidgetView.swift`

### Mac Disk Cleaner

- [Mac App](https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerAppKit/App/MacOSCleanerApp.swift): `macos/Sources/MacOSCleanerAppKit/App/MacOSCleanerApp.swift`
- [File Scanning](https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerCore/Services/ScanOrchestrator.swift): `macos/Sources/MacOSCleanerCore/Services/ScanOrchestrator.swift`
- [Cleanup Rules](https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerCore/Services/CleanerRuleEngine.swift): `macos/Sources/MacOSCleanerCore/Services/CleanerRuleEngine.swift`
- [Review Workspace](https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerAppKit/UI/Cleanup/CleanupWorkspace.swift): `macos/Sources/MacOSCleanerAppKit/UI/Cleanup/CleanupWorkspace.swift`
- [Cleanup Execution](https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerCore/Services/ActionExecutor.swift): `macos/Sources/MacOSCleanerCore/Services/ActionExecutor.swift`
- [History and Restore](https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerCore/Services/UndoManagerService.swift): `macos/Sources/MacOSCleanerCore/Services/UndoManagerService.swift`
- [SQLite Store](https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerCore/Services/SQLiteStore.swift): `macos/Sources/MacOSCleanerCore/Services/SQLiteStore.swift`

### Mac Monitoring

- [Monitoring Engine](https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerCore/Services/Monitoring/MonitoringEngine.swift): `macos/Sources/MacOSCleanerCore/Services/Monitoring/MonitoringEngine.swift`
- [System Snapshot](https://github.com/yordindia/tidybyte/blob/main/macos/Sources/MacOSCleanerCore/Services/Monitoring/SystemSnapshot.swift): `macos/Sources/MacOSCleanerCore/Services/Monitoring/SystemSnapshot.swift`

### Marketing Site

- [Site Content](https://github.com/yordindia/tidybyte/blob/main/website/src/data/pages.ts): `website/src/data/pages.ts`
- [Tool Pages](https://github.com/yordindia/tidybyte/blob/main/website/src/data/tools.ts): `website/src/data/tools.ts`
- [Machine-readable Routes](https://github.com/yordindia/tidybyte/blob/main/website/src/lib/llms.ts): `website/src/lib/llms.ts`

### Other components

- **User**

## Connections

- User → iOS App: uses (evidence: `README.md`)
- iOS App → Cleanup Tools: offers tools
- Cleanup Tools → Photo Library: reviews library
- Photo Library → Asset Summaries: creates summaries (evidence: `ios/Tidybyte/Services/PhotoLibraryService.swift`)
- User → Swipe Review: reviews photos (evidence: `README.md`)
- User → Storage Dashboard: checks storage
- Storage Dashboard → Storage Dashboard Logic: renders (evidence: `ios/Tidybyte/Features/Storage/StorageDashboardView.swift`)
- Storage Dashboard Logic → Storage Snapshots: reads history (evidence: `ios/Tidybyte/Features/Storage/StorageDashboardViewModel.swift`)
- Storage Dashboard Logic → Cleanup Tools: maps actions (evidence: `ios/Tidybyte/Features/Storage/StorageDashboardViewModel.swift`)
- Storage Widget → Storage Snapshots: shows snapshot
- User → Mac App: uses (evidence: `README.md`)
- Mac App → File Scanning: scans files
- File Scanning → Cleanup Rules: applies rules (evidence: `macos/Sources/MacOSCleanerCore/Services/CleanerRuleEngine.swift`)
- User → Review Workspace: reviews findings (evidence: `README.md`)
- Review Workspace → Cleanup Execution: approves cleanup
- Cleanup Execution → History and Restore: records changes
- History and Restore → SQLite Store: uses persistence (evidence: `macos/Sources/MacOSCleanerCore/Services/UndoManagerService.swift`)
- User → Monitoring Engine: monitors Mac
- Monitoring Engine → System Snapshot: builds snapshot (evidence: `macos/Sources/MacOSCleanerCore/Services/Monitoring/MonitoringEngine.swift`)
- Site Content → Tool Pages: includes pages (evidence: `website/src/data/pages.ts`)
- Machine-readable Routes → Site Content: reads page data (evidence: `website/src/lib/llms.ts`)
- Machine-readable Routes → Tool Pages: uses tool data (evidence: `website/src/pages/llms-full.txt.ts`)
