# thecuriouspixel/utilities architecture

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

- Interactive diagram: https://gitdiagram.com/thecuriouspixel/utilities
- Repository: https://github.com/thecuriouspixel/utilities

## Overview

##### Project type and purpose
- This is a Swift/iOS utility library (a collection of extensions and helper classes) packaged as an Xcode project.
- It includes a small sample app and accompanying unit/UI tests to demonstrate usage.

##### File structure
- Top-level:
– Utilities.xcodeproj (Xcode project/workspace)
– Utilities (source folder containing the app target and the library code)
– UtilitiesTests (unit tests)
– UtilitiesUITests (UI tests)
- Source folders under Utilities group related extensions by domain:
- Assets and storyboards under Assets.xcassets and Base.lproj to support the sample app UI.
- AppDelegate, SceneDelegate, and a sample ViewController to demonstrate integration of utilities.

##### README for additional insights
- Confirms it is a “work-in-progress” toolkit for Swift iOS development.
- Instructions point to running the sample project and inspecting tests for usage examples.

##### Final reminder
- Essential build and runtime dependencies without over-engineering.
- The goal is a clear overview of how the Xcode project produces a reusable library, an app demo, and tests.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Global entities
    Xcode["Xcode IDE / Workspace"]:::ide
    UIKit["UIKit & Foundation"]:::external

    %% Sample App Components
    subgraph "Sample iOS App" 
        direction TB
        AppDelegate["AppDelegate.swift"]:::app
        SceneDelegate["SceneDelegate.swift"]:::app
        SceneDelegateAR["SceneDelegate+AR.swift"]:::app
        ViewController["ViewController.swift"]:::app
        Assets["Assets.xcassets"]:::app
        Storyboards["Main & LaunchScreen.storyboard"]:::app
        AppInfo["Info.plist"]:::app
    end

    %% Utilities Framework Modules
    subgraph "Utilities Framework" 
        direction TB
        FrameworkRoot["Framework Root"]:::framework
        Arrays["Array+AR.swift"]:::framework
        Color["UIColor+AR.swift"]:::framework
        Comparable["Comparable+AR.swift"]:::framework
        Controller["UIViewController+AR.swift"]:::framework
        FileSystem["FileManager+AR.swift"]:::framework
        Images["UIImage+AR.swift"]:::framework
        TextCapture["ARTextCapture.swift"]:::framework
        UIButtonExt["UIButton+AR.swift"]:::framework
        UILabelExt["UILabel+AR.swift"]:::framework
        UIViewExt1["UIView+AR.swift"]:::framework
        UIViewExt2["ARGradientView.swift"]:::framework
        UIViewExt3["ARImagePlaceholder.swift"]:::framework
        GenericView["View+AR.swift"]:::framework
        FullScreenViewer["ARFullScreenImageViewer.swift"]:::framework
        FrameworkInfo["Info.plist"]:::framework
    end

    %% Test Targets
    subgraph "Unit Tests" 
        direction TB
        UnitTests["UtilitiesTests.swift"]:::test
        UnitTestInfo["Info.plist"]:::test
    end

    subgraph "UI Tests" 
        direction TB
        UITests["UtilitiesUITests.swift"]:::test
        UITestInfo["Info.plist"]:::test
    end

    %% Connections
    Xcode -->|"builds"| FrameworkRoot
    Xcode -->|"builds"| AppDelegate
    Xcode -->|"builds"| UnitTests
    Xcode -->|"builds"| UITests

    AppDelegate -->|"links against"| FrameworkRoot
    ViewController -->|"uses extensions from"| FrameworkRoot

    UnitTests -->|"tests"| FrameworkRoot
    UITests -->|"runs UI tests on"| AppDelegate

    FrameworkRoot -->|"extends"| UIKit
    AppDelegate -->|"uses"| UIKit

    %% Click Events
    click Xcode "https://github.com/thecuriouspixel/utilities/blob/master/Utilities.xcodeproj"
    click FrameworkRoot "https://github.com/thecuriouspixel/utilities/tree/master/Utilities/"
    click Arrays "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/Arrays/Array+AR.swift"
    click Color "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/Color/UIColor+AR.swift"
    click Comparable "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/Comparable/Comparable+AR.swift"
    click Controller "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/Controller/UIViewController+AR.swift"
    click FileSystem "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/FileSystem/FileManager+AR.swift"
    click Images "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/Images/UIImage+AR.swift"
    click TextCapture "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/Text Capture/ARTextCapture.swift"
    click UIButtonExt "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/UIButton/UIButton+AR.swift"
    click UILabelExt "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/UILabel/UILabel+AR.swift"
    click UIViewExt1 "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/UIView/UIView+AR.swift"
    click UIViewExt2 "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/UIView/ARGradientView.swift"
    click UIViewExt3 "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/UIView/ARImagePlaceholder.swift"
    click GenericView "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/VIew/View+AR.swift"
    click FullScreenViewer "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/fullScreenImageViewer/ARFullScreenImageViewer.swift"
    click FrameworkInfo "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/Info.plist"
    click AppDelegate "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/AppDelegate.swift"
    click SceneDelegate "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/SceneDelegate.swift"
    click SceneDelegateAR "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/SceneDelegate/SceneDelegate+AR.swift"
    click ViewController "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/ViewController.swift"
    click Assets "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/Assets.xcassets"
    click Storyboards "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/Base.lproj/Main.storyboard"
    click AppInfo "https://github.com/thecuriouspixel/utilities/blob/master/Utilities/Info.plist"
    click UnitTests "https://github.com/thecuriouspixel/utilities/blob/master/UtilitiesTests/UtilitiesTests.swift"
    click UnitTestInfo "https://github.com/thecuriouspixel/utilities/blob/master/UtilitiesTests/Info.plist"
    click UITests "https://github.com/thecuriouspixel/utilities/blob/master/UtilitiesUITests/UtilitiesUITests.swift"
    click UITestInfo "https://github.com/thecuriouspixel/utilities/blob/master/UtilitiesUITests/Info.plist"

    %% Styles
    classDef ide fill:#FFD700,stroke:#333,stroke-width:1px
    classDef framework fill:#BBE5F7,stroke:#333,stroke-width:1px
    classDef app fill:#B8E986,stroke:#333,stroke-width:1px
    classDef test fill:#F7B7A3,stroke:#333,stroke-width:1px
    classDef external fill:#E0E0E0,stroke:#333,stroke-width:1px
```
