# vodgroup/voiceoverdesigner architecture

> Architecture diagram of the GitHub repository vodgroup/voiceoverdesigner, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vodgroup/voiceoverdesigner
- Repository: https://github.com/vodgroup/voiceoverdesigner

## Overview

##### Project type and purpose
- This is a multi-platform, Swift-based design tool suite:
- “VoiceOver Designer” – a macOS desktop app for laying out accessibility (VoiceOver) mockups.
- “VoiceOver Preview” – an iOS companion app to preview those mockups on a device.
- “Shared” – a cross-platform Swift package containing core models, presenters, document logic, drawing/Canvas abstractions, accessibility utilities, persistence, sample loaders, and text-recognition services.
- Several helper/extras: a CLI “FolderSnapshot” utility, a macOS QuickLook/Thumbnail extension (“MacOSPreview”), unit-test and UI-test suites.

##### File structure
- Top-level modules:
- FolderSnapshot (Swift CLI)
- MacOSPreview (Thumbnail & QuickLook extensions)
- Shared (root of business logic & models, delivered as a Swift package)
- VoiceOver Designer (macOS app workspace)
- VoiceOver Preview (iOS app + related targets)
- Inside “Shared”: clear separation by feature area (Artboard, Canvas, Document, Accessibility, ElementSettings, Presentation, Purchases, Samples, TextRecognition, Tests).
- VoiceOver Designer & VoiceOver Preview each import “Shared” via SwiftPM and add platform‐specific UI, App lifecycle (AppDelegate/SceneDelegate), window management, and feature modules (CanvasAppKit, CommonUIAppKit, Navigator, Recent, Settings, etc.).
- Configuration/deployment files: Xcode projects/workspaces, Info.plist, entitlements, Package.swift in every package/workspace.

##### README for additional insights
- Model Layer (Artboard, Element, Container, Frame)
- Data Layer (NS/UIDocument persistence)
- Logic Layer (DocumentPresenter, UndoManager, ArtboardPublisher, CanvasPresenter, selectedPublisher)
- UI Layer (Navigator, Canvas, ElementSettings)

##### Elements
- Clear labels for each module/component.
- From UI components → Presenters → Model → Persistence.
- From Shared Core → macOS App / iOS App / CLI / Extensions.
- Green for macOS UI modules.
- Orange for iOS UI modules.
- Gray for CLI/tools.

##### Final advice
- Things by layer and by package boundary.
- Every critical flow: user action → UI → presenter → model → persistence → back to UI.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Top-level modules
    subgraph "Shared Core Package" 
        direction TB
        SharedModel["Model Layer\n(Artboard, Element Tree)"]:::shared
        SharedPersistence["Persistence Layer\n(NS/UIDocument services)"]:::shared
        SharedLogic["Business Logic\n(Canv​asPresenter, DocumentPresenter,\nUndoManager, Publishers)"]:::shared
        DrawingAbstractions["Drawing/Canvas Abstractions"]:::shared
        AccessibilityUtils["Accessibility Utilities"]:::shared
        PresentationModule["Presentation Module\n(PresentationModel, PresentationView)"]:::shared
        PurchasesService["Purchases Service"]:::shared
        SamplesLoader["Samples Loader"]:::shared
        TextRecognition["TextRecognition Service"]:::shared

        SharedModel --> SharedPersistence
        SharedLogic --> SharedModel
        SharedLogic --> SharedPersistence
        SharedLogic --> DrawingAbstractions
        SharedLogic --> AccessibilityUtils
        SharedLogic --> PresentationModule
        SharedLogic --> PurchasesService
        SharedLogic --> SamplesLoader
        SharedLogic --> TextRecognition
    end

    subgraph "VoiceOver Designer (macOS)" 
        direction TB
        AppShell["App Shell\n(AppDelegate, main.swift,\nMainMenu)"]:::mac
        WindowManager["Window Manager\n(WindowManager, VODesignDocument+Window)"]:::mac
        CanvasAppKit["CanvasAppKit Module"]:::mac
        CommonUIAppKit["CommonUIAppKit Module"]:::mac
        Navigator["Navigator Module"]:::mac
        Recent["Recent Module"]:::mac
        Settings["Settings Module"]:::mac

        AppShell --> CanvasAppKit
        CanvasAppKit --> SharedLogic
        CanvasAppKit --> SharedPersistence
        Navigator --> SharedLogic
        Settings --> SharedLogic
        AppShell --> WindowManager
        WindowManager --> SharedPersistence
    end

    subgraph "VoiceOver Preview (iOS)" 
        direction TB
        AppShellIOS["App Shell\n(AppDelegate, SceneDelegate)"]:::ios
        BrowserVC["BrowserViewController"]:::ios
        CanvasUIKit["CanvasUIKit Module"]:::ios
        DesignPreview["DesignPreview Module"]:::ios
        VoiceOverLayout["VoiceOverLayout Module"]:::ios

        AppShellIOS --> BrowserVC
        BrowserVC --> SharedPersistence
        BrowserVC --> VoiceOverLayout
        VoiceOverLayout --> SharedModel
        CanvasUIKit --> SharedLogic
        DesignPreview --> SharedLogic
    end

    subgraph "CLI & Extensions" 
        direction TB
        FolderSnapshot["FolderSnapshot CLI Utility"]:::tool
        MacOSPreviewExt["MacOSPreview\n(QuickLook & Thumbnail)"]:::tool
        QuickLookPreview["iOS QuickLook Extension"]:::tool
        ThumbnailExt["iOS Thumbnail Extension"]:::tool

        FolderSnapshot --> SharedPersistence
        MacOSPreviewExt --> SharedPersistence
        QuickLookPreview --> SharedPersistence
        ThumbnailExt --> SharedPersistence
    end

    %% Dependencies
    SharedCore --> VoiceOverDesigner
    SharedCore --> VoiceOverPreview
    SharedCore --> FolderSnapshot
    SharedCore --> MacOSPreviewExt

    %% Connections from Shared to apps
    SharedModel -.-> CanvasAppKit
    SharedModel -.-> VoiceOverLayout

    %% Click Events
    click SharedModel "https://github.com/vodgroup/voiceoverdesigner/tree/develop/Shared/Sources/Artboard/"
    click SharedPersistence "https://github.com/vodgroup/voiceoverdesigner/tree/develop/Shared/Sources/Document/Documents/"
    click SharedLogic "https://github.com/vodgroup/voiceoverdesigner/blob/develop/Shared/Sources/Canvas/CanvasPresenter.swift"
    click SharedLogic "https://github.com/vodgroup/voiceoverdesigner/blob/develop/Shared/Sources/Document/Accessibility/DocumentPresenter.swift"
    click DrawingAbstractions "https://github.com/vodgroup/voiceoverdesigner/tree/develop/Shared/Sources/Canvas/Drawing/"
    click AccessibilityUtils "https://github.com/vodgroup/voiceoverdesigner/tree/develop/Shared/Sources/Document/Accessibility/"
    click PresentationModule "https://github.com/vodgroup/voiceoverdesigner/blob/develop/Shared/Sources/Presentation/PresentationModel.swift"
    click PresentationModule "https://github.com/vodgroup/voiceoverdesigner/blob/develop/Shared/Sources/Presentation/PresentationView.swift"
    click PurchasesService "https://github.com/vodgroup/voiceoverdesigner/tree/develop/Shared/Sources/Purchases/"
    click SamplesLoader "https://github.com/vodgroup/voiceoverdesigner/tree/develop/Shared/Sources/Samples/"
    click TextRecognition "https://github.com/vodgroup/voiceoverdesigner/tree/develop/Shared/Sources/TextRecognition/"
    click PackageSwift "https://github.com/vodgroup/voiceoverdesigner/blob/develop/Shared/Package.swift"
    click AppShell "https://github.com/vodgroup/voiceoverdesigner/blob/develop/VoiceOver Designer/AppDelegate.swift"
    click AppShell "https://github.com/vodgroup/voiceoverdesigner/blob/develop/VoiceOver Designer/main.swift"
    click AppShell "https://github.com/vodgroup/voiceoverdesigner/blob/develop/VoiceOver Designer/MainMenu.swift"
    click WindowManager "https://github.com/vodgroup/voiceoverdesigner/blob/develop/VoiceOver Designer/Documents/WindowManager.swift"
    click WindowManager "https://github.com/vodgroup/voiceoverdesigner/blob/develop/VoiceOver Designer/Documents/VODesignDocument+Window.swift"
    click CanvasAppKit "https://github.com/vodgroup/voiceoverdesigner/tree/develop/VoiceOver Designer/Features/Sources/CanvasAppKit/"
    click CommonUIAppKit "https://github.com/vodgroup/voiceoverdesigner/tree/develop/VoiceOver Designer/Features/Sources/CommonUIAppKit/"
    click Navigator "https://github.com/vodgroup/voiceoverdesigner/tree/develop/VoiceOver Designer/Features/Sources/Navigator/"
    click Recent "https://github.com/vodgroup/voiceoverdesigner/tree/develop/VoiceOver Designer/Features/Sources/Recent/"
    click Settings "https://github.com/vodgroup/voiceoverdesigner/tree/develop/VoiceOver Designer/Features/Sources/Settings/"
    click AppShellIOS "https://github.com/vodgroup/voiceoverdesigner/blob/develop/VoiceOver Preview/VoiceOver Preview/AppDelegate.swift"
    click AppShellIOS "https://github.com/vodgroup/voiceoverdesigner/blob/develop/VoiceOver Preview/VoiceOver Preview/SceneDelegate.swift"
    click BrowserVC "https://github.com/vodgroup/voiceoverdesigner/blob/develop/VoiceOver Preview/VoiceOver Preview/BrowserViewController.swift"
    click CanvasUIKit "https://github.com/vodgroup/voiceoverdesigner/tree/develop/VoiceOver Preview/PreviewFeatures/Sources/CanvasUIKit/"
    click DesignPreview "https://github.com/vodgroup/voiceoverdesigner/tree/develop/VoiceOver Preview/PreviewFeatures/Sources/DesignPreview/"
    click VoiceOverLayout "https://github.com/vodgroup/voiceoverdesigner/tree/develop/VoiceOver Preview/PreviewFeatures/Sources/VoiceOverLayout/"
    click FolderSnapshot "https://github.com/vodgroup/voiceoverdesigner/tree/develop/FolderSnapshot/"
    click MacOSPreviewExt "https://github.com/vodgroup/voiceoverdesigner/tree/develop/MacOSPreview/"
    click QuickLookPreview "https://github.com/vodgroup/voiceoverdesigner/tree/develop/VoiceOver Preview/QuickLookPreview/"
    click ThumbnailExt "https://github.com/vodgroup/voiceoverdesigner/tree/develop/VoiceOver Preview/Thumbnail/"

    %% Styles
    classDef shared fill:#cce5ff,stroke:#3399ff,color:#000
    classDef mac fill:#d4edda,stroke:#28a745,color:#000
    classDef ios fill:#fff3cd,stroke:#ffc107,color:#000
    classDef tool fill:#e2e3e5,stroke:#6c757d,color:#000
```
