# saiakashneela/mackitty architecture

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

- Interactive diagram: https://gitdiagram.com/saiakashneela/mackitty
- Repository: https://github.com/saiakashneela/mackitty

## Overview

MacKitty is a native macOS cleaner and hardware-monitoring app, with both a desktop dashboard and a menu-bar companion. The main workflow is scan/preview, review cleanup categories and warnings, then clean selected areas; the README also documents app management and automatic updates. Sampled code confirms the dashboard’s Mole preview and native cleanup paths, system telemetry sampling, and menu-bar popover wiring. Some feature wiring is documented but unsampled, so those relationships are omitted or marked as documented capabilities.

Main entry points: [`Sources/MoleMate/Stores/DashboardModel.swift`](https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Stores/DashboardModel.swift) (Dashboard model), [`Sources/MoleMate/App/MoleMateApp.swift`](https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/App/MoleMateApp.swift) (MacKitty app), [`Sources/MoleMate/Views/ContentView.swift`](https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Views/ContentView.swift) (Main window), [`Sources/MoleMate/Support/StatusBarController.swift`](https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Support/StatusBarController.swift) (Menu bar controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Experience"]
  node_app["MacKitty app<br/>[MoleMateApp.swift]"]
  node_content["Main window<br/>[ContentView.swift]"]
  node_dashboard["Dashboard views"]
  node_traycontroller["Menu bar controller"]
  node_trayview["Tray dashboard"]
end

subgraph group_cleanup["Cleanup Workflow"]
  node_model["Dashboard model"]
  node_cleanupview["Cleanup review<br/>[CleanupView.swift]"]
  node_nativecleaner["Native cleaner"]
  node_moleservice["Mole command service<br/>[MoleService.swift]"]
  node_mole["Mole CLI"]
  node_files[("User cache files")]
  node_runningapps["Running apps"]
end

subgraph group_system["System Insights"]
  node_monitor["Hardware monitor"]
  node_macmetrics["macOS metrics"]
  node_appmanager["Apps manager surface"]
end

subgraph group_support["Updates &amp; Support"]
  node_updater["Update checker"]
  node_updatehosts["Update endpoints"]
end

node_user(("Mac user"))

node_user -->|"uses"| node_content
node_app -->|"shows"| node_content
node_app -->|"creates"| node_model
node_content -->|"presents"| node_dashboard
node_content -->|"shares state"| node_model
node_dashboard -->|"presents"| node_cleanupview
node_cleanupview -->|"requests actions"| node_model
node_model -->|"previews cleanup"| node_moleservice
node_moleservice -->|"runs commands"| node_mole
node_model -->|"cleans categories"| node_nativecleaner
node_nativecleaner -->|"inspects / cleans"| node_files
node_model -->|"checks active apps"| node_runningapps
node_app -->|"sets up"| node_traycontroller
node_traycontroller -->|"hosts popover"| node_trayview
node_traycontroller -->|"shares state"| node_model
node_model -->|"samples telemetry"| node_monitor
node_monitor -->|"reads metrics"| node_macmetrics
node_user -.->|"browses apps"| node_appmanager
node_app -->|"checks updates"| node_updater
node_updater -->|"queries / downloads"| node_updatehosts

click node_app "https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/App/MoleMateApp.swift"
click node_content "https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Views/ContentView.swift"
click node_dashboard "https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Views/DashboardView.swift"
click node_traycontroller "https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Support/StatusBarController.swift"
click node_trayview "https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Views/TrayMiniDashboardView.swift"
click node_model "https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Stores/DashboardModel.swift"
click node_cleanupview "https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Views/CleanupView.swift"
click node_nativecleaner "https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Services/NativeCleanerService.swift"
click node_moleservice "https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Services/MoleService.swift"
click node_monitor "https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Services/SystemMonitorService.swift"
click node_appmanager "https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Views/PlaceholderFeatureView.swift"
click node_updater "https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Services/UpdateCheckerService.swift"

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_content,node_dashboard,node_traycontroller,node_trayview,node_user toneBlue
class node_model,node_cleanupview,node_nativecleaner,node_moleservice,node_mole,node_files,node_runningapps toneAmber
class node_monitor,node_macmetrics,node_appmanager toneMint
class node_updater,node_updatehosts toneRose
```

## Components

### App Experience

- [MacKitty app](https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/App/MoleMateApp.swift): `Sources/MoleMate/App/MoleMateApp.swift`
- [Main window](https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Views/ContentView.swift): `Sources/MoleMate/Views/ContentView.swift`
- [Dashboard views](https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Views/DashboardView.swift): `Sources/MoleMate/Views/DashboardView.swift`
- [Menu bar controller](https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Support/StatusBarController.swift): `Sources/MoleMate/Support/StatusBarController.swift`
- [Tray dashboard](https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Views/TrayMiniDashboardView.swift): `Sources/MoleMate/Views/TrayMiniDashboardView.swift`

### Cleanup Workflow

- [Dashboard model](https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Stores/DashboardModel.swift): `Sources/MoleMate/Stores/DashboardModel.swift`
- [Cleanup review](https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Views/CleanupView.swift): `Sources/MoleMate/Views/CleanupView.swift`
- [Native cleaner](https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Services/NativeCleanerService.swift): `Sources/MoleMate/Services/NativeCleanerService.swift`
- [Mole command service](https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Services/MoleService.swift): `Sources/MoleMate/Services/MoleService.swift`
- **Mole CLI**
- **User cache files**
- **Running apps**

### System Insights

- [Hardware monitor](https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Services/SystemMonitorService.swift): `Sources/MoleMate/Services/SystemMonitorService.swift`
- **macOS metrics**
- [Apps manager surface](https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Views/PlaceholderFeatureView.swift): `Sources/MoleMate/Views/PlaceholderFeatureView.swift`

### Updates & Support

- [Update checker](https://github.com/saiakashneela/mackitty/blob/main/Sources/MoleMate/Services/UpdateCheckerService.swift): `Sources/MoleMate/Services/UpdateCheckerService.swift`
- **Update endpoints**

### Other components

- **Mac user**

## Connections

- Mac user → Main window: uses
- MacKitty app → Main window: shows
- MacKitty app → Dashboard model: creates
- Main window → Dashboard views: presents
- Main window → Dashboard model: shares state
- Dashboard views → Cleanup review: presents
- Cleanup review → Dashboard model: requests actions
- Dashboard model → Mole command service: previews cleanup
- Mole command service → Mole CLI: runs commands
- Dashboard model → Native cleaner: cleans categories
- Native cleaner → User cache files: inspects / cleans
- Dashboard model → Running apps: checks active apps
- MacKitty app → Menu bar controller: sets up
- Menu bar controller → Tray dashboard: hosts popover
- Menu bar controller → Dashboard model: shares state
- Dashboard model → Hardware monitor: samples telemetry
- Hardware monitor → macOS metrics: reads metrics
- Mac user → Apps manager surface: browses apps
- MacKitty app → Update checker: checks updates
- Update checker → Update endpoints: queries / downloads
