# silentprovider423/homeroll architecture

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

- Interactive diagram: https://gitdiagram.com/silentprovider423/homeroll
- Repository: https://github.com/silentprovider423/homeroll

## Overview

HomeRoll is a native iOS client for a self-hosted Immich photo server. The primary flow is sign-in, load and cache a photo timeline, then browse or search assets, view them, and optionally edit or share them. Separate product branches cover collections and memories, device-to-server backup and verified space freeing, and widget/share-extension support. Edges follow excerpted calls, SOURCE INDEX references, or README statements; some feature internals were not sampled, so their links are limited to documented or indexed relationships.

Main entry points: [`App/API/ImmichClient.swift`](https://github.com/silentprovider423/homeroll/blob/main/App/API/ImmichClient.swift) (Immich API client), [`App/RootView.swift`](https://github.com/silentprovider423/homeroll/blob/main/App/RootView.swift) (App navigation), [`App/Viewer/ViewerView.swift`](https://github.com/silentprovider423/homeroll/blob/main/App/Viewer/ViewerView.swift) (Photo and video viewer), [`App/Collections/CollectionDetail.swift`](https://github.com/silentprovider423/homeroll/blob/main/App/Collections/CollectionDetail.swift) (Collection detail)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_root["App navigation<br/>[RootView.swift]"]
  node_login["Sign-in and SSO<br/>[LoginView.swift]"]
  node_api["Immich API client<br/>[ImmichClient.swift]"]
end

subgraph group_library["Library and viewing"]
  node_timeline[("Offline timeline")]
  node_libraryview["Photo library grid<br/>[LibraryView.swift]"]
  node_grid["Grid rendering<br/>[PhotoGrid.swift]"]
  node_viewer["Photo and video viewer<br/>[ViewerView.swift]"]
  node_video["Video playback state<br/>[VideoState.swift]"]
end

subgraph group_collections["Collections and discovery"]
  node_search["Live search<br/>[SearchView.swift]"]
  node_collectionsview["Collections browser"]
  node_collectiondetail["Collection detail"]
  node_smartalbums["Smart categories<br/>[SmartAlbums.swift]"]
  node_locked["Locked folders<br/>[LockedFolder.swift]"]
  node_memories["Memories<br/>[Memories.swift]"]
  node_memoryplayer["Memory player<br/>[MemoryPlayer.swift]"]
end

subgraph group_media["Editing and sharing"]
  node_editor["Photo editor<br/>[EditModel.swift]"]
  node_markup["Markup editor<br/>[MarkupEditor.swift]"]
  node_trim["Video trim"]
  node_actions["Asset actions<br/>[AssetActions.swift]"]
  node_share["File sharing<br/>[ShareService.swift]"]
  node_sharelinks["Share links"]
end

subgraph group_backup["Backup and integrations"]
  node_backupview["Backup controls<br/>[BackupView.swift]"]
  node_backup["Backup engine<br/>[BackupEngine.swift]"]
  node_uploader["Background uploader"]
  node_freeup["Verified space freeing<br/>[FreeUp.swift]"]
  node_shareextension["Share extension"]
  node_appgroup[("App group storage<br/>[AppGroup.swift]")]
  node_widget["Memories widget<br/>[FotosWidget.swift]"]
end

node_user(("iPhone user"))
node_server[("Immich server")]

node_user -->|"uses"| node_root
node_root -->|"presents"| node_login
node_login -->|"authenticates with"| node_api
node_api -->|"sends requests"| node_server
node_root -->|"routes to"| node_libraryview
node_root -->|"routes to"| node_collectionsview
node_root -->|"routes to"| node_search
node_root -->|"opens"| node_viewer
node_root -->|"opens"| node_memoryplayer
node_libraryview -->|"reads timeline"| node_timeline
node_libraryview -->|"renders grid"| node_grid
node_timeline -->|"loads buckets"| node_api
node_grid -->|"loads previews"| node_api
node_viewer -->|"reads assets"| node_timeline
node_viewer -->|"delegates playback"| node_video
node_viewer -->|"opens editor"| node_editor
node_viewer -->|"opens trim"| node_trim
node_viewer -->|"invokes actions"| node_actions
node_search -->|"searches assets"| node_api
node_search -->|"shows results"| node_collectiondetail
node_collectionsview -->|"opens detail"| node_collectiondetail
node_collectiondetail -->|"reads assets"| node_timeline
node_collectiondetail -->|"uses categories"| node_smartalbums
node_collectiondetail -->|"fetches collection data"| node_api
node_collectionsview -->|"offers memories"| node_memories
node_memories -->|"opens player"| node_memoryplayer
node_memories -->|"loads memory assets"| node_api
node_root -->|"routes locked folders"| node_locked
node_locked -->|"loads protected assets"| node_api
node_editor -->|"saves edits"| node_api
node_editor -->|"uses markup"| node_markup
node_trim -->|"saves video edits"| node_api
node_actions -->|"updates assets"| node_api
node_actions -->|"starts sharing"| node_share
node_share -->|"downloads originals"| node_api
node_sharelinks -->|"manages links"| node_api
node_root -->|"opens backup"| node_backupview
node_backupview -->|"controls backup"| node_backup
node_backup -->|"uploads originals"| node_api
node_backup -->|"schedules uploads"| node_uploader
node_backupview -->|"offers space freeing"| node_freeup
node_shareextension -->|"reads shared access"| node_appgroup
node_root -->|"writes widget snapshot"| node_appgroup
node_widget -->|"reads snapshot"| node_appgroup

click node_root "https://github.com/silentprovider423/homeroll/blob/main/App/RootView.swift"
click node_login "https://github.com/silentprovider423/homeroll/blob/main/App/Login/LoginView.swift"
click node_api "https://github.com/silentprovider423/homeroll/blob/main/App/API/ImmichClient.swift"
click node_timeline "https://github.com/silentprovider423/homeroll/blob/main/App/Library/TimelineStore.swift"
click node_libraryview "https://github.com/silentprovider423/homeroll/blob/main/App/Library/LibraryView.swift"
click node_grid "https://github.com/silentprovider423/homeroll/blob/main/App/Library/PhotoGrid.swift"
click node_viewer "https://github.com/silentprovider423/homeroll/blob/main/App/Viewer/ViewerView.swift"
click node_video "https://github.com/silentprovider423/homeroll/blob/main/App/Viewer/VideoState.swift"
click node_search "https://github.com/silentprovider423/homeroll/blob/main/App/Search/SearchView.swift"
click node_collectionsview "https://github.com/silentprovider423/homeroll/blob/main/App/Collections/CollectionsView.swift"
click node_collectiondetail "https://github.com/silentprovider423/homeroll/blob/main/App/Collections/CollectionDetail.swift"
click node_smartalbums "https://github.com/silentprovider423/homeroll/blob/main/App/Collections/SmartAlbums.swift"
click node_locked "https://github.com/silentprovider423/homeroll/blob/main/App/Collections/LockedFolder.swift"
click node_memories "https://github.com/silentprovider423/homeroll/blob/main/App/Collections/Memories.swift"
click node_memoryplayer "https://github.com/silentprovider423/homeroll/blob/main/App/Collections/MemoryPlayer.swift"
click node_editor "https://github.com/silentprovider423/homeroll/blob/main/App/Editor/EditModel.swift"
click node_markup "https://github.com/silentprovider423/homeroll/blob/main/App/Editor/MarkupEditor.swift"
click node_trim "https://github.com/silentprovider423/homeroll/blob/main/App/Editor/VideoTrimView.swift"
click node_actions "https://github.com/silentprovider423/homeroll/blob/main/App/Core/AssetActions.swift"
click node_share "https://github.com/silentprovider423/homeroll/blob/main/App/Core/ShareService.swift"
click node_sharelinks "https://github.com/silentprovider423/homeroll/blob/main/App/Core/ShareLinkSheet.swift"
click node_backupview "https://github.com/silentprovider423/homeroll/blob/main/App/Backup/BackupView.swift"
click node_backup "https://github.com/silentprovider423/homeroll/blob/main/App/Backup/BackupEngine.swift"
click node_uploader "https://github.com/silentprovider423/homeroll/blob/main/App/Backup/BackgroundUploader.swift"
click node_freeup "https://github.com/silentprovider423/homeroll/blob/main/App/Backup/FreeUp.swift"
click node_shareextension "https://github.com/silentprovider423/homeroll/blob/main/Share/ShareViewController.swift"
click node_appgroup "https://github.com/silentprovider423/homeroll/blob/main/Shared/AppGroup.swift"
click node_widget "https://github.com/silentprovider423/homeroll/blob/main/Widget/FotosWidget.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_root,node_login,node_api,node_user toneBlue
class node_timeline,node_libraryview,node_grid,node_viewer,node_video,node_server toneAmber
class node_search,node_collectionsview,node_collectiondetail,node_smartalbums,node_locked,node_memories,node_memoryplayer toneMint
class node_editor,node_markup,node_trim,node_actions,node_share,node_sharelinks toneRose
class node_backupview,node_backup,node_uploader,node_freeup,node_shareextension,node_appgroup,node_widget toneIndigo
```

## Components

### App shell

- [App navigation](https://github.com/silentprovider423/homeroll/blob/main/App/RootView.swift): `App/RootView.swift`
- [Sign-in and SSO](https://github.com/silentprovider423/homeroll/blob/main/App/Login/LoginView.swift): `App/Login/LoginView.swift`
- [Immich API client](https://github.com/silentprovider423/homeroll/blob/main/App/API/ImmichClient.swift): `App/API/ImmichClient.swift`

### Library and viewing

- [Offline timeline](https://github.com/silentprovider423/homeroll/blob/main/App/Library/TimelineStore.swift): `App/Library/TimelineStore.swift`
- [Photo library grid](https://github.com/silentprovider423/homeroll/blob/main/App/Library/LibraryView.swift): `App/Library/LibraryView.swift`
- [Grid rendering](https://github.com/silentprovider423/homeroll/blob/main/App/Library/PhotoGrid.swift): `App/Library/PhotoGrid.swift`
- [Photo and video viewer](https://github.com/silentprovider423/homeroll/blob/main/App/Viewer/ViewerView.swift): `App/Viewer/ViewerView.swift`
- [Video playback state](https://github.com/silentprovider423/homeroll/blob/main/App/Viewer/VideoState.swift): `App/Viewer/VideoState.swift`

### Collections and discovery

- [Live search](https://github.com/silentprovider423/homeroll/blob/main/App/Search/SearchView.swift): `App/Search/SearchView.swift`
- [Collections browser](https://github.com/silentprovider423/homeroll/blob/main/App/Collections/CollectionsView.swift): `App/Collections/CollectionsView.swift`
- [Collection detail](https://github.com/silentprovider423/homeroll/blob/main/App/Collections/CollectionDetail.swift): `App/Collections/CollectionDetail.swift`
- [Smart categories](https://github.com/silentprovider423/homeroll/blob/main/App/Collections/SmartAlbums.swift): `App/Collections/SmartAlbums.swift`
- [Locked folders](https://github.com/silentprovider423/homeroll/blob/main/App/Collections/LockedFolder.swift): `App/Collections/LockedFolder.swift`
- [Memories](https://github.com/silentprovider423/homeroll/blob/main/App/Collections/Memories.swift): `App/Collections/Memories.swift`
- [Memory player](https://github.com/silentprovider423/homeroll/blob/main/App/Collections/MemoryPlayer.swift): `App/Collections/MemoryPlayer.swift`

### Editing and sharing

- [Photo editor](https://github.com/silentprovider423/homeroll/blob/main/App/Editor/EditModel.swift): `App/Editor/EditModel.swift`
- [Markup editor](https://github.com/silentprovider423/homeroll/blob/main/App/Editor/MarkupEditor.swift): `App/Editor/MarkupEditor.swift`
- [Video trim](https://github.com/silentprovider423/homeroll/blob/main/App/Editor/VideoTrimView.swift): `App/Editor/VideoTrimView.swift`
- [Asset actions](https://github.com/silentprovider423/homeroll/blob/main/App/Core/AssetActions.swift): `App/Core/AssetActions.swift`
- [File sharing](https://github.com/silentprovider423/homeroll/blob/main/App/Core/ShareService.swift): `App/Core/ShareService.swift`
- [Share links](https://github.com/silentprovider423/homeroll/blob/main/App/Core/ShareLinkSheet.swift): `App/Core/ShareLinkSheet.swift`

### Backup and integrations

- [Backup controls](https://github.com/silentprovider423/homeroll/blob/main/App/Backup/BackupView.swift): `App/Backup/BackupView.swift`
- [Backup engine](https://github.com/silentprovider423/homeroll/blob/main/App/Backup/BackupEngine.swift): `App/Backup/BackupEngine.swift`
- [Background uploader](https://github.com/silentprovider423/homeroll/blob/main/App/Backup/BackgroundUploader.swift): `App/Backup/BackgroundUploader.swift`
- [Verified space freeing](https://github.com/silentprovider423/homeroll/blob/main/App/Backup/FreeUp.swift): `App/Backup/FreeUp.swift`
- [Share extension](https://github.com/silentprovider423/homeroll/blob/main/Share/ShareViewController.swift): `Share/ShareViewController.swift`
- [App group storage](https://github.com/silentprovider423/homeroll/blob/main/Shared/AppGroup.swift): `Shared/AppGroup.swift`
- [Memories widget](https://github.com/silentprovider423/homeroll/blob/main/Widget/FotosWidget.swift): `Widget/FotosWidget.swift`

### Other components

- **iPhone user**
- **Immich server**

## Connections

- iPhone user → App navigation: uses (evidence: `README.md`)
- App navigation → Sign-in and SSO: presents (evidence: `App/FotosApp.swift`)
- Sign-in and SSO → Immich API client: authenticates with (evidence: `App/Login/LoginView.swift`)
- Immich API client → Immich server: sends requests (evidence: `README.md`)
- App navigation → Photo library grid: routes to (evidence: `App/RootView.swift`)
- App navigation → Collections browser: routes to (evidence: `App/RootView.swift`)
- App navigation → Live search: routes to (evidence: `App/RootView.swift`)
- App navigation → Photo and video viewer: opens (evidence: `App/RootView.swift`)
- App navigation → Memory player: opens (evidence: `App/RootView.swift`)
- Photo library grid → Offline timeline: reads timeline (evidence: `App/Library/LibraryView.swift`)
- Photo library grid → Grid rendering: renders grid (evidence: `App/Library/LibraryView.swift`)
- Offline timeline → Immich API client: loads buckets (evidence: `App/Library/TimelineStore.swift`)
- Grid rendering → Immich API client: loads previews (evidence: `App/Library/PhotoGrid.swift`)
- Photo and video viewer → Offline timeline: reads assets (evidence: `App/Viewer/ViewerView.swift`)
- Photo and video viewer → Video playback state: delegates playback (evidence: `App/Viewer/ViewerView.swift`)
- Photo and video viewer → Photo editor: opens editor (evidence: `App/Viewer/ViewerView.swift`)
- Photo and video viewer → Video trim: opens trim (evidence: `App/Viewer/ViewerView.swift`)
- Photo and video viewer → Asset actions: invokes actions (evidence: `App/Viewer/ViewerView.swift`)
- Live search → Immich API client: searches assets (evidence: `App/Search/SearchView.swift`)
- Live search → Collection detail: shows results (evidence: `App/Search/SearchView.swift`)
- Collections browser → Collection detail: opens detail (evidence: `App/Collections/CollectionsView.swift`)
- Collection detail → Offline timeline: reads assets (evidence: `App/Collections/CollectionDetail.swift`)
- Collection detail → Smart categories: uses categories (evidence: `App/Collections/CollectionDetail.swift`)
- Collection detail → Immich API client: fetches collection data (evidence: `App/Collections/CollectionDetail.swift`)
- Collections browser → Memories: offers memories (evidence: `App/Collections/CollectionsView.swift`)
- Memories → Memory player: opens player (evidence: `App/Collections/Memories.swift`)
- Memories → Immich API client: loads memory assets (evidence: `App/Collections/Memories.swift`)
- App navigation → Locked folders: routes locked folders (evidence: `App/RootView.swift`)
- Locked folders → Immich API client: loads protected assets (evidence: `App/Collections/LockedFolder.swift`)
- Photo editor → Immich API client: saves edits (evidence: `App/Editor/EditModel.swift`)
- Photo editor → Markup editor: uses markup
- Video trim → Immich API client: saves video edits (evidence: `App/Editor/VideoTrimView.swift`)
- Asset actions → Immich API client: updates assets (evidence: `App/Core/AssetActions.swift`)
- Asset actions → File sharing: starts sharing (evidence: `App/Core/AssetActions.swift`)
- File sharing → Immich API client: downloads originals (evidence: `App/Core/ShareService.swift`)
- Share links → Immich API client: manages links (evidence: `App/Core/ShareLinkSheet.swift`)
- App navigation → Backup controls: opens backup
- Backup controls → Backup engine: controls backup (evidence: `App/Backup/BackupView.swift`)
- Backup engine → Immich API client: uploads originals (evidence: `App/Backup/BackupEngine.swift`)
- Backup engine → Background uploader: schedules uploads (evidence: `App/Backup/BackupEngine.swift`)
- Backup controls → Verified space freeing: offers space freeing (evidence: `README.md`)
- Share extension → App group storage: reads shared access (evidence: `Share/ShareViewController.swift`)
- App navigation → App group storage: writes widget snapshot (evidence: `Shared/AppGroup.swift`)
- Memories widget → App group storage: reads snapshot (evidence: `Shared/AppGroup.swift`)
