# dimillian/achnbrowserui architecture

> Architecture diagram of the GitHub repository dimillian/achnbrowserui, 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/dimillian/achnbrowserui
- Repository: https://github.com/dimillian/achnbrowserui

## Overview

ACH Helper is a SwiftUI Animal Crossing companion app. Users browse and search the catalog, track collection progress and daily tasks, and use specialist features such as turnip predictions, music, villagers, and community codes; the app also supplies widgets. The app entry point installs shared state and services before presenting the tab interface. The graph preserves major README capabilities, but many feature-specific implementations were not sampled, so their internal call relationships are not asserted.

Main entry points: [`ACHNBrowserUI/ACHNBrowserUI/App.swift`](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/App.swift) (App setup), [`ACHNBrowserUI/Widgets/models/WidgetProvider.swift`](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Widgets/models/WidgetProvider.swift) (Widget provider), [`ACHNBrowserUI/Packages/Backend/Sources/Backend/Environments/Items.swift`](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Packages/Backend/Sources/Backend/Environments/Items.swift) (Catalog data), [`ACHNBrowserUI/Packages/Backend/Sources/Backend/Environments/UserCollection.swift`](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Packages/Backend/Sources/Backend/Environments/UserCollection.swift) (Collection tracking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App experience"]
  node_app["App setup<br/>[App.swift]"]
  node_tabs["Tab navigation<br/>[TabbarView.swift]"]
  node_ui["UI state<br/>[UIState.swift]"]
  node_viewext["View helpers<br/>[View.swift]"]
  node_textext["Text styling<br/>[Text.swift]"]
  node_imageext["Image styling<br/>[Image.swift]"]
end

subgraph group_catalog["Catalog and collection"]
  node_catalogui["Catalog browser<br/>[ItemsView.swift]"]
  node_search["Category search"]
  node_item["Item model<br/>[Item.swift]"]
  node_category["Catalog categories<br/>[Category.swift]"]
  node_items["Catalog data<br/>[Items.swift]"]
  node_collection["Collection tracking"]
  node_villagers["Villager directory"]
end

subgraph group_daily["Daily companion"]
  node_dashboard["Today dashboard<br/>[TodayView.swift]"]
  node_chores["Daily tasks"]
  node_turnips["Turnip tracking<br/>[TurnipsView.swift]"]
  node_music["Music player"]
  node_codes["Island codes"]
end

subgraph group_backend["Backend services"]
  node_api["Game data API"]
  node_subscription["Subscriptions"]
  node_cloud["CloudKit services"]
end

subgraph group_widgets["Widgets"]
  node_widgetprovider["Widget provider"]
  node_birthday["Birthday widget"]
  node_widgetmodel["Widget data<br/>[WidgetModel.swift]"]
end

node_user(("App user"))

node_user -->|"opens"| node_app
node_app -->|"presents"| node_tabs
node_app -->|"provides state"| node_ui
node_app -->|"provides service"| node_collection
node_app -->|"provides service"| node_items
node_app -->|"provides service"| node_subscription
node_app -->|"provides service"| node_music
node_app -->|"provides service"| node_cloud
node_search -->|"uses model"| node_category
node_search -->|"searches items"| node_item
node_search -->|"reads catalog"| node_items
node_items -->|"loads categories"| node_category
node_collection -->|"counts catalog"| node_items
node_music -->|"fetches songs"| node_api
node_widgetprovider -->|"fetches villagers"| node_api
node_widgetprovider -->|"reads progress"| node_collection
node_widgetprovider -->|"builds entry"| node_widgetmodel
node_birthday -->|"uses provider"| node_widgetprovider
node_user -->|"browses catalog"| node_catalogui
node_user -->|"tracks progress"| node_collection
node_user -->|"checks today"| node_dashboard
node_user -->|"tracks prices"| node_turnips
node_user -->|"browses villagers"| node_villagers
node_user -.->|"uses integrations"| node_codes

click node_app "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/App.swift"
click node_tabs "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/views/home/TabbarView.swift"
click node_ui "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/env/UIState.swift"
click node_catalogui "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/views/items/ItemsView.swift"
click node_search "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/viewModels/CategoriesSearchViewModel.swift"
click node_item "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Packages/Backend/Sources/Backend/Models/Item.swift"
click node_category "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Packages/Backend/Sources/Backend/Models/Category.swift"
click node_items "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Packages/Backend/Sources/Backend/Environments/Items.swift"
click node_collection "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Packages/Backend/Sources/Backend/Environments/UserCollection.swift"
click node_villagers "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/views/villagers/VillagersListView.swift"
click node_dashboard "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayView.swift"
click node_chores "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayTasksSection.swift"
click node_turnips "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/views/turnips/TurnipsView.swift"
click node_music "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/env/MusicPlayerManager.swift"
click node_codes "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/views/dodocode/DodoCodeListView.swift"
click node_api "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Packages/Backend/Sources/Backend/Services/ACNHApiService.swift"
click node_subscription "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Packages/Backend/Sources/Backend/Environments/SubscriptionManager.swift"
click node_cloud "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Packages/Backend/Sources/Backend/CloudKit/services/CommentService.swift"
click node_widgetprovider "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Widgets/models/WidgetProvider.swift"
click node_birthday "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Widgets/views/VillagerBirthdayWidget.swift"
click node_widgetmodel "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Widgets/models/WidgetModel.swift"
click node_viewext "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/extensions/View.swift"
click node_textext "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/extensions/Text.swift"
click node_imageext "https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/extensions/Image.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_tabs,node_ui,node_viewext,node_textext,node_imageext,node_user toneBlue
class node_catalogui,node_search,node_item,node_category,node_items,node_collection,node_villagers toneAmber
class node_dashboard,node_chores,node_turnips,node_music,node_codes toneMint
class node_api,node_subscription,node_cloud toneRose
class node_widgetprovider,node_birthday,node_widgetmodel toneIndigo
```

## Components

### App experience

- [App setup](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/App.swift): `ACHNBrowserUI/ACHNBrowserUI/App.swift`
- [Tab navigation](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/views/home/TabbarView.swift): `ACHNBrowserUI/ACHNBrowserUI/views/home/TabbarView.swift`
- [UI state](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/env/UIState.swift): `ACHNBrowserUI/ACHNBrowserUI/env/UIState.swift`
- [View helpers](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/extensions/View.swift): `ACHNBrowserUI/ACHNBrowserUI/extensions/View.swift`
- [Text styling](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/extensions/Text.swift): `ACHNBrowserUI/ACHNBrowserUI/extensions/Text.swift`
- [Image styling](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/extensions/Image.swift): `ACHNBrowserUI/ACHNBrowserUI/extensions/Image.swift`

### Catalog and collection

- [Catalog browser](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/views/items/ItemsView.swift): `ACHNBrowserUI/ACHNBrowserUI/views/items/ItemsView.swift`
- [Category search](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/viewModels/CategoriesSearchViewModel.swift): `ACHNBrowserUI/ACHNBrowserUI/viewModels/CategoriesSearchViewModel.swift`
- [Item model](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Packages/Backend/Sources/Backend/Models/Item.swift): `ACHNBrowserUI/Packages/Backend/Sources/Backend/Models/Item.swift`
- [Catalog categories](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Packages/Backend/Sources/Backend/Models/Category.swift): `ACHNBrowserUI/Packages/Backend/Sources/Backend/Models/Category.swift`
- [Catalog data](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Packages/Backend/Sources/Backend/Environments/Items.swift): `ACHNBrowserUI/Packages/Backend/Sources/Backend/Environments/Items.swift`
- [Collection tracking](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Packages/Backend/Sources/Backend/Environments/UserCollection.swift): `ACHNBrowserUI/Packages/Backend/Sources/Backend/Environments/UserCollection.swift`
- [Villager directory](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/views/villagers/VillagersListView.swift): `ACHNBrowserUI/ACHNBrowserUI/views/villagers/VillagersListView.swift`

### Daily companion

- [Today dashboard](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayView.swift): `ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayView.swift`
- [Daily tasks](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayTasksSection.swift): `ACHNBrowserUI/ACHNBrowserUI/views/todayDashboard/TodayTasksSection.swift`
- [Turnip tracking](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/views/turnips/TurnipsView.swift): `ACHNBrowserUI/ACHNBrowserUI/views/turnips/TurnipsView.swift`
- [Music player](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/env/MusicPlayerManager.swift): `ACHNBrowserUI/ACHNBrowserUI/env/MusicPlayerManager.swift`
- [Island codes](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/ACHNBrowserUI/views/dodocode/DodoCodeListView.swift): `ACHNBrowserUI/ACHNBrowserUI/views/dodocode/DodoCodeListView.swift`

### Backend services

- [Game data API](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Packages/Backend/Sources/Backend/Services/ACNHApiService.swift): `ACHNBrowserUI/Packages/Backend/Sources/Backend/Services/ACNHApiService.swift`
- [Subscriptions](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Packages/Backend/Sources/Backend/Environments/SubscriptionManager.swift): `ACHNBrowserUI/Packages/Backend/Sources/Backend/Environments/SubscriptionManager.swift`
- [CloudKit services](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Packages/Backend/Sources/Backend/CloudKit/services/CommentService.swift): `ACHNBrowserUI/Packages/Backend/Sources/Backend/CloudKit/services/CommentService.swift`

### Widgets

- [Widget provider](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Widgets/models/WidgetProvider.swift): `ACHNBrowserUI/Widgets/models/WidgetProvider.swift`
- [Birthday widget](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Widgets/views/VillagerBirthdayWidget.swift): `ACHNBrowserUI/Widgets/views/VillagerBirthdayWidget.swift`
- [Widget data](https://github.com/dimillian/achnbrowserui/blob/main/ACHNBrowserUI/Widgets/models/WidgetModel.swift): `ACHNBrowserUI/Widgets/models/WidgetModel.swift`

### Other components

- **App user**

## Connections

- App user → App setup: opens
- App setup → Tab navigation: presents (evidence: `ACHNBrowserUI/ACHNBrowserUI/App.swift`)
- App setup → UI state: provides state (evidence: `ACHNBrowserUI/ACHNBrowserUI/App.swift`)
- App setup → Collection tracking: provides service (evidence: `ACHNBrowserUI/ACHNBrowserUI/App.swift`)
- App setup → Catalog data: provides service (evidence: `ACHNBrowserUI/ACHNBrowserUI/App.swift`)
- App setup → Subscriptions: provides service (evidence: `ACHNBrowserUI/ACHNBrowserUI/App.swift`)
- App setup → Music player: provides service (evidence: `ACHNBrowserUI/ACHNBrowserUI/App.swift`)
- App setup → CloudKit services: provides service (evidence: `ACHNBrowserUI/ACHNBrowserUI/App.swift`)
- Category search → Catalog categories: uses model (evidence: `ACHNBrowserUI/ACHNBrowserUI/viewModels/CategoriesSearchViewModel.swift`)
- Category search → Item model: searches items (evidence: `ACHNBrowserUI/ACHNBrowserUI/viewModels/CategoriesSearchViewModel.swift`)
- Category search → Catalog data: reads catalog (evidence: `ACHNBrowserUI/ACHNBrowserUI/viewModels/CategoriesSearchViewModel.swift`)
- Catalog data → Catalog categories: loads categories (evidence: `ACHNBrowserUI/Packages/Backend/Sources/Backend/Environments/Items.swift`)
- Collection tracking → Catalog data: counts catalog (evidence: `ACHNBrowserUI/Packages/Backend/Sources/Backend/Environments/UserCollection.swift`)
- Music player → Game data API: fetches songs (evidence: `ACHNBrowserUI/ACHNBrowserUI/env/MusicPlayerManager.swift`)
- Widget provider → Game data API: fetches villagers (evidence: `ACHNBrowserUI/Widgets/models/WidgetProvider.swift`)
- Widget provider → Collection tracking: reads progress (evidence: `ACHNBrowserUI/Widgets/models/WidgetProvider.swift`)
- Widget provider → Widget data: builds entry (evidence: `ACHNBrowserUI/Widgets/models/WidgetProvider.swift`)
- Birthday widget → Widget provider: uses provider (evidence: `ACHNBrowserUI/Widgets/views/VillagerBirthdayWidget.swift`)
- App user → Catalog browser: browses catalog
- App user → Collection tracking: tracks progress
- App user → Today dashboard: checks today
- App user → Turnip tracking: tracks prices
- App user → Villager directory: browses villagers
- App user → Island codes: uses integrations
