# milanvarady/applite architecture

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

- Interactive diagram: https://gitdiagram.com/milanvarady/applite
- Repository: https://github.com/milanvarady/applite

## Overview

Applite is a native macOS cask-only app store backed by Homebrew. Users discover or search the catalog, select a cask, then install, update, open, or remove it; the app also supports custom taps, Brewfile migration, and Homebrew setup. The graph emphasizes the shared CaskManager and the documented local SQLite/FTS5 catalog. README capability descriptions supplement the sampled source; links for unsampled features are kept at subsystem level, and uncertain implementation wiring is omitted.

Main entry points: [`Applite/Core/CaskCore/CaskManager.swift`](https://github.com/milanvarady/applite/blob/main/Applite/Core/CaskCore/CaskManager.swift) (Cask manager), [`Applite/Navigation/ContentView.swift`](https://github.com/milanvarady/applite/blob/main/Applite/Navigation/ContentView.swift) (Navigation views), [`Applite/Core/Brew/Shell.swift`](https://github.com/milanvarady/applite/blob/main/Applite/Core/Brew/Shell.swift) (Brew command runner), [`Applite/Features/Search/SearchView.swift`](https://github.com/milanvarady/applite/blob/main/Applite/Features/Search/SearchView.swift) (Catalog search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["App shell<br/>[AppliteApp.swift]"]
  node_navigation["Navigation views<br/>[ContentView.swift]"]
  node_appviews["Cask actions<br/>[AppView.swift]"]
end

subgraph group_catalog["Cask catalog"]
  node_discover["Discover gallery<br/>[DiscoverView.swift]"]
  node_search["Catalog search<br/>[SearchView.swift]"]
  node_categories["Categories and taps<br/>[CategoryView.swift]"]
  node_caskmanager["Cask manager<br/>[CaskManager.swift]"]
  node_loader["Catalog loader"]
  node_dbservice["Catalog data service"]
  node_database[("SQLite FTS5 catalog<br/>[AppDatabase.swift]")]
end

subgraph group_brew["Homebrew operations"]
  node_brewops["Install and update<br/>[BrewService.swift]"]
  node_installed["Installed app state"]
  node_shell["Brew command runner<br/>[Shell.swift]"]
  node_bootstrap["Homebrew setup"]
  node_annex["Bundled Homebrew"]
  node_settings["Brew settings"]
  node_installedview["Installed apps"]
  node_updates["App updates<br/>[UpdateView.swift]"]
  node_tasks["Active tasks"]
end

subgraph group_migration["Migration and settings"]
  node_migration["Brewfile migration"]
  node_settingsviews["App preferences<br/>[SettingsView.swift]"]
end

subgraph group_platform["System services"]
  node_proxy["System proxy settings"]
end

node_user(("Mac user"))
node_catalogapi["Homebrew JSON API"]
node_brewcli["Homebrew CLI"]
node_systemproxy["macOS proxy configuration"]

node_user -->|"launches"| node_app
node_app -->|"shows"| node_navigation
node_navigation -->|"routes to"| node_discover
node_navigation -->|"routes to"| node_search
node_navigation -->|"routes to"| node_categories
node_navigation -->|"routes to"| node_installedview
node_navigation -->|"routes to"| node_updates
node_navigation -->|"routes to"| node_tasks
node_discover -->|"requests casks"| node_caskmanager
node_search -->|"searches via"| node_caskmanager
node_categories -->|"requests casks"| node_caskmanager
node_caskmanager -->|"loads catalog"| node_loader
node_loader -->|"syncs catalog"| node_catalogapi
node_loader -->|"stores and reads"| node_dbservice
node_dbservice -->|"queries and writes"| node_database
node_search -->|"displays results"| node_appviews
node_installedview -->|"reads app state"| node_caskmanager
node_updates -->|"reads update state"| node_caskmanager
node_tasks -->|"reads task state"| node_caskmanager
node_appviews -->|"requests actions"| node_caskmanager
node_caskmanager -->|"forwards operations"| node_brewops
node_caskmanager -->|"recovers brew"| node_bootstrap
node_caskmanager -->|"refreshes state"| node_installed
node_brewops -->|"runs commands"| node_shell
node_installed -->|"lists casks"| node_shell
node_shell -->|"invokes"| node_brewcli
node_bootstrap -->|"sets up bundled brew"| node_annex
node_annex -->|"downloads and verifies"| node_shell
node_settings -->|"configures brew"| node_bootstrap
node_migration -.->|"resolves casks"| node_caskmanager
node_user -->|"imports or exports"| node_migration
node_user -->|"configures"| node_settingsviews
node_settingsviews -.->|"sets proxy options"| node_proxy
node_proxy -->|"reads configuration"| node_systemproxy

click node_app "https://github.com/milanvarady/applite/blob/main/Applite/App/AppliteApp.swift"
click node_navigation "https://github.com/milanvarady/applite/blob/main/Applite/Navigation/ContentView.swift"
click node_discover "https://github.com/milanvarady/applite/blob/main/Applite/Features/Discover/DiscoverView.swift"
click node_search "https://github.com/milanvarady/applite/blob/main/Applite/Features/Search/SearchView.swift"
click node_categories "https://github.com/milanvarady/applite/blob/main/Applite/Features/Categories/CategoryView.swift"
click node_caskmanager "https://github.com/milanvarady/applite/blob/main/Applite/Core/CaskCore/CaskManager.swift"
click node_loader "https://github.com/milanvarady/applite/blob/main/Applite/Core/CaskCore/CaskDataLoader.swift"
click node_dbservice "https://github.com/milanvarady/applite/blob/main/Applite/Core/Database/CaskDatabaseService.swift"
click node_database "https://github.com/milanvarady/applite/blob/main/Applite/Core/Database/AppDatabase.swift"
click node_brewops "https://github.com/milanvarady/applite/blob/main/Applite/Core/Brew/BrewService.swift"
click node_installed "https://github.com/milanvarady/applite/blob/main/Applite/Core/Brew/InstalledCaskService.swift"
click node_shell "https://github.com/milanvarady/applite/blob/main/Applite/Core/Brew/Shell.swift"
click node_bootstrap "https://github.com/milanvarady/applite/blob/main/Applite/Core/Brew/Installation/HomebrewBootstrap.swift"
click node_annex "https://github.com/milanvarady/applite/blob/main/Applite/Core/Brew/Installation/AnnexBrewManager.swift"
click node_settings "https://github.com/milanvarady/applite/blob/main/Applite/Features/Settings/BrewSettingsView.swift"
click node_installedview "https://github.com/milanvarady/applite/blob/main/Applite/Features/Installed/InstalledView.swift"
click node_updates "https://github.com/milanvarady/applite/blob/main/Applite/Features/Updates/UpdateView.swift"
click node_tasks "https://github.com/milanvarady/applite/blob/main/Applite/Features/ActiveTasks/ActiveTasksView.swift"
click node_migration "https://github.com/milanvarady/applite/blob/main/Applite/Features/AppMigration/ImportAppsView.swift"
click node_settingsviews "https://github.com/milanvarady/applite/blob/main/Applite/Features/Settings/SettingsView.swift"
click node_proxy "https://github.com/milanvarady/applite/blob/main/Applite/Core/Infrastructure/NetworkProxyManager.swift"
click node_appviews "https://github.com/milanvarady/applite/blob/main/Applite/AppViews/AppView.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_navigation,node_appviews,node_user toneBlue
class node_discover,node_search,node_categories,node_caskmanager,node_loader,node_dbservice,node_database toneAmber
class node_brewops,node_installed,node_shell,node_bootstrap,node_annex,node_settings,node_installedview,node_updates,node_tasks,node_catalogapi toneMint
class node_migration,node_settingsviews toneRose
class node_proxy,node_brewcli,node_systemproxy toneIndigo
```

## Components

### App navigation

- [App shell](https://github.com/milanvarady/applite/blob/main/Applite/App/AppliteApp.swift): `Applite/App/AppliteApp.swift`
- [Navigation views](https://github.com/milanvarady/applite/blob/main/Applite/Navigation/ContentView.swift): `Applite/Navigation/ContentView.swift`
- [Cask actions](https://github.com/milanvarady/applite/blob/main/Applite/AppViews/AppView.swift): `Applite/AppViews/AppView.swift`

### Cask catalog

- [Discover gallery](https://github.com/milanvarady/applite/blob/main/Applite/Features/Discover/DiscoverView.swift): `Applite/Features/Discover/DiscoverView.swift`
- [Catalog search](https://github.com/milanvarady/applite/blob/main/Applite/Features/Search/SearchView.swift): `Applite/Features/Search/SearchView.swift`
- [Categories and taps](https://github.com/milanvarady/applite/blob/main/Applite/Features/Categories/CategoryView.swift): `Applite/Features/Categories/CategoryView.swift`
- [Cask manager](https://github.com/milanvarady/applite/blob/main/Applite/Core/CaskCore/CaskManager.swift): `Applite/Core/CaskCore/CaskManager.swift`
- [Catalog loader](https://github.com/milanvarady/applite/blob/main/Applite/Core/CaskCore/CaskDataLoader.swift): `Applite/Core/CaskCore/CaskDataLoader.swift`
- [Catalog data service](https://github.com/milanvarady/applite/blob/main/Applite/Core/Database/CaskDatabaseService.swift): `Applite/Core/Database/CaskDatabaseService.swift`
- [SQLite FTS5 catalog](https://github.com/milanvarady/applite/blob/main/Applite/Core/Database/AppDatabase.swift): `Applite/Core/Database/AppDatabase.swift`

### Homebrew operations

- [Install and update](https://github.com/milanvarady/applite/blob/main/Applite/Core/Brew/BrewService.swift): `Applite/Core/Brew/BrewService.swift`
- [Installed app state](https://github.com/milanvarady/applite/blob/main/Applite/Core/Brew/InstalledCaskService.swift): `Applite/Core/Brew/InstalledCaskService.swift`
- [Brew command runner](https://github.com/milanvarady/applite/blob/main/Applite/Core/Brew/Shell.swift): `Applite/Core/Brew/Shell.swift`
- [Homebrew setup](https://github.com/milanvarady/applite/blob/main/Applite/Core/Brew/Installation/HomebrewBootstrap.swift): `Applite/Core/Brew/Installation/HomebrewBootstrap.swift`
- [Bundled Homebrew](https://github.com/milanvarady/applite/blob/main/Applite/Core/Brew/Installation/AnnexBrewManager.swift): `Applite/Core/Brew/Installation/AnnexBrewManager.swift`
- [Brew settings](https://github.com/milanvarady/applite/blob/main/Applite/Features/Settings/BrewSettingsView.swift): `Applite/Features/Settings/BrewSettingsView.swift`
- [Installed apps](https://github.com/milanvarady/applite/blob/main/Applite/Features/Installed/InstalledView.swift): `Applite/Features/Installed/InstalledView.swift`
- [App updates](https://github.com/milanvarady/applite/blob/main/Applite/Features/Updates/UpdateView.swift): `Applite/Features/Updates/UpdateView.swift`
- [Active tasks](https://github.com/milanvarady/applite/blob/main/Applite/Features/ActiveTasks/ActiveTasksView.swift): `Applite/Features/ActiveTasks/ActiveTasksView.swift`

### Migration and settings

- [Brewfile migration](https://github.com/milanvarady/applite/blob/main/Applite/Features/AppMigration/ImportAppsView.swift): `Applite/Features/AppMigration/ImportAppsView.swift`
- [App preferences](https://github.com/milanvarady/applite/blob/main/Applite/Features/Settings/SettingsView.swift): `Applite/Features/Settings/SettingsView.swift`

### System services

- [System proxy settings](https://github.com/milanvarady/applite/blob/main/Applite/Core/Infrastructure/NetworkProxyManager.swift): `Applite/Core/Infrastructure/NetworkProxyManager.swift`

### Other components

- **Mac user**
- **Homebrew JSON API**
- **Homebrew CLI**
- **macOS proxy configuration**

## Connections

- Mac user → App shell: launches
- App shell → Navigation views: shows
- Navigation views → Discover gallery: routes to
- Navigation views → Catalog search: routes to
- Navigation views → Categories and taps: routes to
- Navigation views → Installed apps: routes to
- Navigation views → App updates: routes to
- Navigation views → Active tasks: routes to
- Discover gallery → Cask manager: requests casks
- Catalog search → Cask manager: searches via
- Categories and taps → Cask manager: requests casks
- Cask manager → Catalog loader: loads catalog
- Catalog loader → Homebrew JSON API: syncs catalog
- Catalog loader → Catalog data service: stores and reads
- Catalog data service → SQLite FTS5 catalog: queries and writes
- Catalog search → Cask actions: displays results
- Installed apps → Cask manager: reads app state
- App updates → Cask manager: reads update state
- Active tasks → Cask manager: reads task state
- Cask actions → Cask manager: requests actions
- Cask manager → Install and update: forwards operations
- Cask manager → Homebrew setup: recovers brew
- Cask manager → Installed app state: refreshes state
- Install and update → Brew command runner: runs commands
- Installed app state → Brew command runner: lists casks
- Brew command runner → Homebrew CLI: invokes
- Homebrew setup → Bundled Homebrew: sets up bundled brew
- Bundled Homebrew → Brew command runner: downloads and verifies
- Brew settings → Homebrew setup: configures brew
- Brewfile migration → Cask manager: resolves casks
- Mac user → Brewfile migration: imports or exports
- Mac user → App preferences: configures
- App preferences → System proxy settings: sets proxy options
- System proxy settings → macOS proxy configuration: reads configuration
