# team-shortcutszip/macc-team-happyanding architecture

> Architecture diagram of the GitHub repository team-shortcutszip/macc-team-happyanding, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/team-shortcutszip/macc-team-happyanding
- Repository: https://github.com/team-shortcutszip/macc-team-happyanding

## Overview

ShortcutsZip is an iOS app for sharing, discovering, and maintaining Apple Shortcuts. The main user journey is to browse or search shortcuts, inspect details and updates, then download or share a shortcut; users can also publish shortcuts and curated collections. The README describes ranking, categories, liked shortcuts, recommendations, comments, and dark mode. Edges are limited to relationships visible in the excerpts or explicitly documented in the README; several feature implementations are represented by their exact enclosing directories because their source was not sampled.

Main entry points: [`HappyAnding/HappyAnding/Model/Shortcuts.swift`](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Model/Shortcuts.swift) (Shortcut record), [`HappyAnding/HappyAnding/ViewModel/ReadShortcutViewModels/ReadShortcutViewModel.swift`](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/ViewModel/ReadShortcutViewModels/ReadShortcutViewModel.swift) (Detail and comments logic), [`HappyAnding/HappyAnding/ViewModel/WriteShortcutViewModel.swift`](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/ViewModel/WriteShortcutViewModel.swift) (Shortcut publishing logic), [`HappyAnding/HappyAnding/Views/SearchView.swift`](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Views/SearchView.swift) (Shortcut search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Shortcut discovery"]
  node_browse["Explore shortcuts"]
  node_rank["Download rankings"]
  node_category["Category browsing<br/>[Category.swift]"]
  node_search["Shortcut search<br/>[SearchView.swift]"]
  node_searchvm["Search logic"]
  node_curation["Curation discovery"]
  node_recommend["Shortcut recommendations"]
  node_detail["Shortcut details"]
  node_readvm["Detail and comments logic"]
  node_shortcutmodel["Shortcut record<br/>[Shortcuts.swift]"]
end

subgraph group_publishing["Shortcut publishing"]
  node_publisher["Shortcut editor"]
  node_writevm["Shortcut publishing logic"]
  node_curationwrite["Curation authoring"]
  node_sharecontroller["Share extension controller"]
  node_shareform["Share shortcut editor"]
  node_sharevm["Share extension logic"]
end

subgraph group_account["Accounts and community"]
  node_auth["Apple sign-in"]
  node_profile["Profile and settings"]
  node_updates["Version updates"]
end

subgraph group_platform["App platform"]
  node_app["App entry"]
  node_tabs["Tab navigation"]
end

node_user(("iPhone user"))
node_shareactor(("Shortcuts share action"))
node_backend[("Firebase services")]

node_user -->|"opens"| node_app
node_app -.->|"presents"| node_tabs
node_tabs -.->|"navigates"| node_browse
node_user -->|"browses"| node_browse
node_user -->|"views ranking"| node_rank
node_user -->|"browses categories"| node_category
node_user -->|"explores collections"| node_curation
node_user -->|"requests recommendations"| node_recommend
node_user -->|"searches"| node_search
node_search -->|"delegates"| node_searchvm
node_searchvm -->|"filters shortcuts"| node_shortcutmodel
node_user -->|"opens shortcut"| node_detail
node_detail -->|"delegates"| node_readvm
node_readvm -->|"loads shortcut"| node_shortcutmodel
node_user -->|"writes shortcut"| node_publisher
node_publisher -->|"delegates"| node_writevm
node_writevm -->|"updates shortcut"| node_shortcutmodel
node_user -->|"creates curation"| node_curationwrite
node_shareactor -->|"shares shortcut"| node_sharecontroller
node_sharecontroller -->|"presents editor"| node_shareform
node_shareform -->|"uses form logic"| node_sharevm
node_user -->|"signs in"| node_auth
node_user -.->|"manages profile"| node_profile
node_user -->|"reviews updates"| node_updates
node_readvm -.->|"reads records"| node_backend
node_writevm -.->|"persists changes"| node_backend
node_sharevm -->|"builds shortcut"| node_shortcutmodel

click node_app "https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Views/HappyAndingApp.swift"
click node_tabs "https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Views/TabView/ShortcutTabView.swift"
click node_browse "https://github.com/team-shortcutszip/macc-team-happyanding/tree/develop/HappyAnding/HappyAnding/Views/ExploreShortcutViews"
click node_rank "https://github.com/team-shortcutszip/macc-team-happyanding/tree/develop/HappyAnding/HappyAnding/Views/ExploreShortcutViews"
click node_category "https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Model/Category.swift"
click node_search "https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Views/SearchView.swift"
click node_searchvm "https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Views/SearchViewModel.swift"
click node_curation "https://github.com/team-shortcutszip/macc-team-happyanding/tree/develop/HappyAnding/HappyAnding/Views/ExploreCurationViews"
click node_recommend "https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/ViewModel/ShortcutsZipViewModel.swift"
click node_detail "https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Views/ReadShortcutViews/ReadShortcutView.swift"
click node_readvm "https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/ViewModel/ReadShortcutViewModels/ReadShortcutViewModel.swift"
click node_shortcutmodel "https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Model/Shortcuts.swift"
click node_publisher "https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Views/WriteShortcutViews/WriteShortcutView.swift"
click node_writevm "https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/ViewModel/WriteShortcutViewModel.swift"
click node_curationwrite "https://github.com/team-shortcutszip/macc-team-happyanding/tree/develop/HappyAnding/HappyAnding/Views/WriteCurationViews"
click node_sharecontroller "https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/ShareExtension/CustomShareViewController.swift"
click node_shareform "https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/ShareExtension/ShareExtensionWriteShortcutView.swift"
click node_sharevm "https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/ShareExtension/ShareExtensionViewModel.swift"
click node_auth "https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Views/SignInViews/AppleAuthCoordinator.swift"
click node_profile "https://github.com/team-shortcutszip/macc-team-happyanding/tree/develop/HappyAnding/HappyAnding/Views/MyPageViews"
click node_updates "https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Views/ReadShortcutViews/UpdateShortcutView.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_browse,node_rank,node_category,node_search,node_searchvm,node_curation,node_recommend,node_detail,node_readvm,node_shortcutmodel,node_user toneBlue
class node_publisher,node_writevm,node_curationwrite,node_sharecontroller,node_shareform,node_sharevm,node_backend toneAmber
class node_auth,node_profile,node_updates toneMint
class node_app,node_tabs toneRose
class node_shareactor toneIndigo
```

## Components

### Shortcut discovery

- [Explore shortcuts](https://github.com/team-shortcutszip/macc-team-happyanding/tree/develop/HappyAnding/HappyAnding/Views/ExploreShortcutViews): `HappyAnding/HappyAnding/Views/ExploreShortcutViews`
- [Download rankings](https://github.com/team-shortcutszip/macc-team-happyanding/tree/develop/HappyAnding/HappyAnding/Views/ExploreShortcutViews): `HappyAnding/HappyAnding/Views/ExploreShortcutViews`
- [Category browsing](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Model/Category.swift): `HappyAnding/HappyAnding/Model/Category.swift`
- [Shortcut search](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Views/SearchView.swift): `HappyAnding/HappyAnding/Views/SearchView.swift`
- [Search logic](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Views/SearchViewModel.swift): `HappyAnding/HappyAnding/Views/SearchViewModel.swift`
- [Curation discovery](https://github.com/team-shortcutszip/macc-team-happyanding/tree/develop/HappyAnding/HappyAnding/Views/ExploreCurationViews): `HappyAnding/HappyAnding/Views/ExploreCurationViews`
- [Shortcut recommendations](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/ViewModel/ShortcutsZipViewModel.swift): `HappyAnding/HappyAnding/ViewModel/ShortcutsZipViewModel.swift`
- [Shortcut details](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Views/ReadShortcutViews/ReadShortcutView.swift): `HappyAnding/HappyAnding/Views/ReadShortcutViews/ReadShortcutView.swift`
- [Detail and comments logic](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/ViewModel/ReadShortcutViewModels/ReadShortcutViewModel.swift): `HappyAnding/HappyAnding/ViewModel/ReadShortcutViewModels/ReadShortcutViewModel.swift`
- [Shortcut record](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Model/Shortcuts.swift): `HappyAnding/HappyAnding/Model/Shortcuts.swift`

### Shortcut publishing

- [Shortcut editor](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Views/WriteShortcutViews/WriteShortcutView.swift): `HappyAnding/HappyAnding/Views/WriteShortcutViews/WriteShortcutView.swift`
- [Shortcut publishing logic](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/ViewModel/WriteShortcutViewModel.swift): `HappyAnding/HappyAnding/ViewModel/WriteShortcutViewModel.swift`
- [Curation authoring](https://github.com/team-shortcutszip/macc-team-happyanding/tree/develop/HappyAnding/HappyAnding/Views/WriteCurationViews): `HappyAnding/HappyAnding/Views/WriteCurationViews`
- [Share extension controller](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/ShareExtension/CustomShareViewController.swift): `HappyAnding/ShareExtension/CustomShareViewController.swift`
- [Share shortcut editor](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/ShareExtension/ShareExtensionWriteShortcutView.swift): `HappyAnding/ShareExtension/ShareExtensionWriteShortcutView.swift`
- [Share extension logic](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/ShareExtension/ShareExtensionViewModel.swift): `HappyAnding/ShareExtension/ShareExtensionViewModel.swift`

### Accounts and community

- [Apple sign-in](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Views/SignInViews/AppleAuthCoordinator.swift): `HappyAnding/HappyAnding/Views/SignInViews/AppleAuthCoordinator.swift`
- [Profile and settings](https://github.com/team-shortcutszip/macc-team-happyanding/tree/develop/HappyAnding/HappyAnding/Views/MyPageViews): `HappyAnding/HappyAnding/Views/MyPageViews`
- [Version updates](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Views/ReadShortcutViews/UpdateShortcutView.swift): `HappyAnding/HappyAnding/Views/ReadShortcutViews/UpdateShortcutView.swift`

### App platform

- [App entry](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Views/HappyAndingApp.swift): `HappyAnding/HappyAnding/Views/HappyAndingApp.swift`
- [Tab navigation](https://github.com/team-shortcutszip/macc-team-happyanding/blob/develop/HappyAnding/HappyAnding/Views/TabView/ShortcutTabView.swift): `HappyAnding/HappyAnding/Views/TabView/ShortcutTabView.swift`

### Other components

- **iPhone user**
- **Shortcuts share action**
- **Firebase services**

## Connections

- iPhone user → App entry: opens
- App entry → Tab navigation: presents
- Tab navigation → Explore shortcuts: navigates
- iPhone user → Explore shortcuts: browses
- iPhone user → Download rankings: views ranking
- iPhone user → Category browsing: browses categories
- iPhone user → Curation discovery: explores collections
- iPhone user → Shortcut recommendations: requests recommendations
- iPhone user → Shortcut search: searches
- Shortcut search → Search logic: delegates (evidence: `HappyAnding/HappyAnding/Views/SearchView.swift`)
- Search logic → Shortcut record: filters shortcuts (evidence: `HappyAnding/HappyAnding/Views/SearchViewModel.swift`)
- iPhone user → Shortcut details: opens shortcut
- Shortcut details → Detail and comments logic: delegates (evidence: `HappyAnding/HappyAnding/Views/ReadShortcutViews/ReadShortcutView.swift`)
- Detail and comments logic → Shortcut record: loads shortcut (evidence: `HappyAnding/HappyAnding/ViewModel/ReadShortcutViewModels/ReadShortcutViewModel.swift`)
- iPhone user → Shortcut editor: writes shortcut
- Shortcut editor → Shortcut publishing logic: delegates (evidence: `HappyAnding/HappyAnding/Views/WriteShortcutViews/WriteShortcutView.swift`)
- Shortcut publishing logic → Shortcut record: updates shortcut (evidence: `HappyAnding/HappyAnding/ViewModel/WriteShortcutViewModel.swift`)
- iPhone user → Curation authoring: creates curation
- Shortcuts share action → Share extension controller: shares shortcut
- Share extension controller → Share shortcut editor: presents editor (evidence: `HappyAnding/ShareExtension/CustomShareViewController.swift`)
- Share shortcut editor → Share extension logic: uses form logic (evidence: `HappyAnding/ShareExtension/ShareExtensionWriteShortcutView.swift`)
- iPhone user → Apple sign-in: signs in
- iPhone user → Profile and settings: manages profile
- iPhone user → Version updates: reviews updates
- Detail and comments logic → Firebase services: reads records
- Shortcut publishing logic → Firebase services: persists changes
- Share extension logic → Shortcut record: builds shortcut (evidence: `HappyAnding/ShareExtension/ShareExtensionViewModel.swift`)
