Applite

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

Applite is a native macOS GUI application for Homebrew Casks, designed as an “app store for third-party apps” rather than a full Homebrew wrapper. Target audience is non-technical users who want simple app installation/management.

Build & Run

Open Applite.xcodeproj in Xcode and build/run (⌘R). Dependencies resolve automatically via SPM.

Architecture

Data Flow

  1. App Launch: ContentView.task(id: bootstrap.attempt) calls caskManager.bootstrapAndLoad()
  2. First Run: HomebrewBootstrap installs/validates brew; while bootstrap.needsSetupOverlay is true, ContentView covers the window with the non-dismissable ComponentsInstallView modal (Features/Bootstrap/). There is no separate onboarding flow — the app opens straight into the main UI
  3. Main UI: ContentView with NavigationSplitView sidebar navigation
  4. Data Loading: CaskManager.loadData() runs in two stages — catalog (DB-only, instant) then brew CLI state (slow). The UI lights up after stage 1; installed/outdated state arrives reactively as stage 2 completes.

Key Components

The shared cask/brew engine lives under Applite/Core/, split into focused subfolders:

Persistence (Applite/Core/Database/)

Cask engine (Applite/Core/CaskCore/) — the @Observable runtime layer

Plain models (Applite/Core/Models/)

Other Core/ subfolders: Core/Brew/ (brew CLI services + BrewPaths, Shell, Installation/), Core/Preferences/, Core/Infrastructure/ (AlertManager, AppPaths, SendNotification, MirrorEnvironment, NetworkProxyManager, …).

CaskManager (Applite/Core/CaskCore/CaskManager.swift)

Brew services (Applite/Core/Brew/)

Views — split across App/ (entry + Commands), Navigation/ (shell), Components/ (generic reusable views), AppViews/ (the shared cask “app card” cluster), Features/<Screen>/ (one folder per screen), and Windows/ (standalone windows)

External Data Sources

Preferences

User settings stored via @AppStorage with keys defined in Applite/Core/Preferences/Preferences.swift.

Dependencies

Code Patterns

Contributing Notes