# grantbrooksgoodman/panther architecture

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

- Interactive diagram: https://gitdiagram.com/grantbrooksgoodman/panther
- Repository: https://github.com/grantbrooksgoodman/panther

## Overview

This repository is an iOS messaging app. Its central user workflow is app initialization, root navigation into chat, rendering conversation messages, and managing message delivery against session state. The wider product also includes onboarding, audio and media messaging, contacts, translation, notifications, settings, and PenPals. The graph preserves these documented or tree-visible capabilities, but the README is empty and most feature implementations were not excerpted; links without direct evidence are therefore omitted.

Main entry points: [`Sources/Modules/Common/Services/CommonServices.swift`](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Common/Services/CommonServices.swift) (Common services), [`Sources/Modules/Session/State/Services/SessionStore.swift`](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Session/State/Services/SessionStore.swift) (Session store), [`Sources/Modules/Content/User/Views/ChatPageView/ChatPageViewController.swift`](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Content/User/Views/ChatPageView/ChatPageViewController.swift) (Chat screen), [`Sources/Modules/Content/User/Services/ChatPageView/ChatPageViewService.swift`](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Content/User/Services/ChatPageView/ChatPageViewService.swift) (Chat coordination)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and navigation"]
  node_application["App initialization<br/>[Application.swift]"]
  node_scene["Scene lifecycle"]
  node_rootview["Root view<br/>[RootView.swift]"]
  node_rootnav["Navigation dispatch"]
  node_navigators["Feature navigators"]
  node_settings["Settings flow"]
end

subgraph group_onboarding["Onboarding"]
  node_onboarding["Onboarding flow"]
end

subgraph group_messaging["Messaging experience"]
  node_chatview["Chat screen"]
  node_chatfactory["Chat construction"]
  node_chatservice["Chat coordination"]
  node_media_preview["Media preview"]
  node_message["Message model<br/>[Message.swift]"]
  node_mediafile["Media file model<br/>[MediaFile.swift]"]
end

subgraph group_session["Session and networking"]
  node_user_model["User model<br/>[User.swift]"]
  node_conversation["Conversation model<br/>[Conversation.swift]"]
  node_client_session["Client session"]
  node_store[("Session store<br/>[SessionStore.swift]")]
  node_sync["Conversation sync"]
  node_integrity["Integrity service"]
end

subgraph group_shared["Shared capabilities"]
  node_audio["Audio services<br/>[AudioService.swift]"]
  node_commonservices["Common services"]
  node_contacts["Contact services"]
  node_notifications["Notifications"]
  node_translation["Translation services"]
  node_penpals["PenPals service"]
end

node_user(("App user"))
node_network{{"Networking backend"}}

node_user -->|"launches"| node_application
node_scene -->|"uses"| node_client_session
node_scene -->|"uses"| node_commonservices
node_scene -->|"shows"| node_rootview
node_rootnav -->|"dispatches"| node_navigators
node_user -.->|"completes"| node_onboarding
node_user -.->|"uses"| node_chatview
node_chatfactory -->|"constructs"| node_chatview
node_chatfactory -->|"configures"| node_chatservice
node_chatview -->|"notifies lifecycle"| node_chatservice
node_chatservice -->|"starts observation"| node_sync
node_chatview -->|"renders"| node_message
node_media_preview -->|"uses"| node_chatservice
node_message -->|"exposes media"| node_mediafile
node_client_session -->|"contains"| node_store
node_client_session -->|"references"| node_user_model
node_store -->|"stores"| node_message
node_store -->|"stores"| node_user_model
node_store -->|"stores"| node_conversation
node_conversation -->|"resolves from"| node_store
node_user_model -->|"resolves conversations"| node_store
node_integrity -.->|"accesses"| node_network
node_commonservices -->|"exposes"| node_audio
node_commonservices -->|"exposes"| node_contacts
node_commonservices -->|"exposes"| node_notifications
node_commonservices -->|"exposes"| node_translation
node_commonservices -->|"exposes"| node_penpals

click node_application "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Application.swift"
click node_scene "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Bundle/Delegates/SceneDelegate.swift"
click node_rootview "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Navigation/RootView.swift"
click node_rootnav "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Navigation/RootNavigationService.swift"
click node_navigators "https://github.com/grantbrooksgoodman/panther/tree/main/Sources/Bundle/Navigators"
click node_onboarding "https://github.com/grantbrooksgoodman/panther/tree/main/Sources/Modules/Content/Onboarding"
click node_chatview "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Content/User/Views/ChatPageView/ChatPageViewController.swift"
click node_chatfactory "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Content/User/Services/ChatPageView/ChatPageViewControllerFactory.swift"
click node_chatservice "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Content/User/Services/ChatPageView/ChatPageViewService.swift"
click node_media_preview "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Content/User/Services/ChatPageView/Sources/MediaMessagePreviewService.swift"
click node_message "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Networking/Sources/Message/Models/Message.swift"
click node_mediafile "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Common/Models/MediaFile.swift"
click node_audio "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Common/Services/Sources/Audio/AudioService.swift"
click node_commonservices "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Common/Services/CommonServices.swift"
click node_user_model "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Networking/Sources/User/Models/User.swift"
click node_conversation "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Networking/Sources/Conversation/Models/Conversation.swift"
click node_client_session "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Session/ClientSession.swift"
click node_store "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Session/State/Services/SessionStore.swift"
click node_sync "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Session/Sync/Services/ConversationSyncService.swift"
click node_integrity "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Networking/Sources/Integrity/Services/IntegrityService.swift"
click node_contacts "https://github.com/grantbrooksgoodman/panther/tree/main/Sources/Modules/Common/Services/Sources/Contacts"
click node_notifications "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Common/Services/Sources/NotificationService.swift"
click node_translation "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Common/Services/Sources/AIEnhancedTranslationService.swift"
click node_penpals "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Common/Services/Sources/PenPalsService.swift"
click node_settings "https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Content/User/Services/SettingsPageViewService.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_application,node_scene,node_rootview,node_rootnav,node_navigators,node_settings,node_user toneBlue
class node_onboarding toneAmber
class node_chatview,node_chatfactory,node_chatservice,node_media_preview,node_message,node_mediafile toneMint
class node_user_model,node_conversation,node_client_session,node_store,node_sync,node_integrity toneRose
class node_audio,node_commonservices,node_contacts,node_notifications,node_translation,node_penpals,node_network toneIndigo
```

## Components

### App and navigation

- [App initialization](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Application.swift): `Sources/Application.swift`
- [Scene lifecycle](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Bundle/Delegates/SceneDelegate.swift): `Sources/Bundle/Delegates/SceneDelegate.swift`
- [Root view](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Navigation/RootView.swift): `Sources/Navigation/RootView.swift`
- [Navigation dispatch](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Navigation/RootNavigationService.swift): `Sources/Navigation/RootNavigationService.swift`
- [Feature navigators](https://github.com/grantbrooksgoodman/panther/tree/main/Sources/Bundle/Navigators): `Sources/Bundle/Navigators`
- [Settings flow](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Content/User/Services/SettingsPageViewService.swift): `Sources/Modules/Content/User/Services/SettingsPageViewService.swift`

### Onboarding

- [Onboarding flow](https://github.com/grantbrooksgoodman/panther/tree/main/Sources/Modules/Content/Onboarding): `Sources/Modules/Content/Onboarding`

### Messaging experience

- [Chat screen](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Content/User/Views/ChatPageView/ChatPageViewController.swift): `Sources/Modules/Content/User/Views/ChatPageView/ChatPageViewController.swift`
- [Chat construction](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Content/User/Services/ChatPageView/ChatPageViewControllerFactory.swift): `Sources/Modules/Content/User/Services/ChatPageView/ChatPageViewControllerFactory.swift`
- [Chat coordination](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Content/User/Services/ChatPageView/ChatPageViewService.swift): `Sources/Modules/Content/User/Services/ChatPageView/ChatPageViewService.swift`
- [Media preview](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Content/User/Services/ChatPageView/Sources/MediaMessagePreviewService.swift): `Sources/Modules/Content/User/Services/ChatPageView/Sources/MediaMessagePreviewService.swift`
- [Message model](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Networking/Sources/Message/Models/Message.swift): `Sources/Modules/Networking/Sources/Message/Models/Message.swift`
- [Media file model](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Common/Models/MediaFile.swift): `Sources/Modules/Common/Models/MediaFile.swift`

### Session and networking

- [User model](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Networking/Sources/User/Models/User.swift): `Sources/Modules/Networking/Sources/User/Models/User.swift`
- [Conversation model](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Networking/Sources/Conversation/Models/Conversation.swift): `Sources/Modules/Networking/Sources/Conversation/Models/Conversation.swift`
- [Client session](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Session/ClientSession.swift): `Sources/Modules/Session/ClientSession.swift`
- [Session store](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Session/State/Services/SessionStore.swift): `Sources/Modules/Session/State/Services/SessionStore.swift`
- [Conversation sync](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Session/Sync/Services/ConversationSyncService.swift): `Sources/Modules/Session/Sync/Services/ConversationSyncService.swift`
- [Integrity service](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Networking/Sources/Integrity/Services/IntegrityService.swift): `Sources/Modules/Networking/Sources/Integrity/Services/IntegrityService.swift`

### Shared capabilities

- [Audio services](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Common/Services/Sources/Audio/AudioService.swift): `Sources/Modules/Common/Services/Sources/Audio/AudioService.swift`
- [Common services](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Common/Services/CommonServices.swift): `Sources/Modules/Common/Services/CommonServices.swift`
- [Contact services](https://github.com/grantbrooksgoodman/panther/tree/main/Sources/Modules/Common/Services/Sources/Contacts): `Sources/Modules/Common/Services/Sources/Contacts`
- [Notifications](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Common/Services/Sources/NotificationService.swift): `Sources/Modules/Common/Services/Sources/NotificationService.swift`
- [Translation services](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Common/Services/Sources/AIEnhancedTranslationService.swift): `Sources/Modules/Common/Services/Sources/AIEnhancedTranslationService.swift`
- [PenPals service](https://github.com/grantbrooksgoodman/panther/blob/main/Sources/Modules/Common/Services/Sources/PenPalsService.swift): `Sources/Modules/Common/Services/Sources/PenPalsService.swift`

### Other components

- **App user**
- **Networking backend**

## Connections

- App user → App initialization: launches
- Scene lifecycle → Client session: uses (evidence: `Sources/Bundle/Delegates/SceneDelegate.swift`)
- Scene lifecycle → Common services: uses (evidence: `Sources/Bundle/Delegates/SceneDelegate.swift`)
- Scene lifecycle → Root view: shows (evidence: `Sources/Bundle/Delegates/SceneDelegate.swift`)
- Navigation dispatch → Feature navigators: dispatches (evidence: `Sources/Navigation/RootNavigationService.swift`)
- App user → Onboarding flow: completes
- App user → Chat screen: uses
- Chat construction → Chat screen: constructs (evidence: `Sources/Modules/Content/User/Services/ChatPageView/ChatPageViewControllerFactory.swift`)
- Chat construction → Chat coordination: configures (evidence: `Sources/Modules/Content/User/Services/ChatPageView/ChatPageViewControllerFactory.swift`)
- Chat screen → Chat coordination: notifies lifecycle (evidence: `Sources/Modules/Content/User/Views/ChatPageView/ChatPageViewController.swift`)
- Chat coordination → Conversation sync: starts observation (evidence: `Sources/Modules/Content/User/Services/ChatPageView/ChatPageViewService.swift`)
- Chat screen → Message model: renders (evidence: `Sources/Modules/Content/User/Views/ChatPageView/ChatPageViewController+MessagesDataSource.swift`)
- Media preview → Chat coordination: uses (evidence: `Sources/Modules/Content/User/Services/ChatPageView/Sources/MediaMessagePreviewService.swift`)
- Message model → Media file model: exposes media (evidence: `Sources/Modules/Networking/Sources/Message/Models/Message.swift`)
- Client session → Session store: contains (evidence: `Sources/Modules/Session/ClientSession.swift`)
- Client session → User model: references (evidence: `Sources/Modules/Session/ClientSession.swift`)
- Session store → Message model: stores (evidence: `Sources/Modules/Session/State/Services/SessionStore.swift`)
- Session store → User model: stores (evidence: `Sources/Modules/Session/State/Services/SessionStore.swift`)
- Session store → Conversation model: stores (evidence: `Sources/Modules/Session/State/Services/SessionStore.swift`)
- Conversation model → Session store: resolves from (evidence: `Sources/Modules/Networking/Sources/Conversation/Models/Conversation.swift`)
- User model → Session store: resolves conversations (evidence: `Sources/Modules/Networking/Sources/User/Models/User.swift`)
- Integrity service → Networking backend: accesses
- Common services → Audio services: exposes (evidence: `Sources/Modules/Common/Services/CommonServices.swift`)
- Common services → Contact services: exposes (evidence: `Sources/Modules/Common/Services/CommonServices.swift`)
- Common services → Notifications: exposes (evidence: `Sources/Modules/Common/Services/CommonServices.swift`)
- Common services → Translation services: exposes (evidence: `Sources/Modules/Common/Services/CommonServices.swift`)
- Common services → PenPals service: exposes (evidence: `Sources/Modules/Common/Services/CommonServices.swift`)
