# bosesj/xumbleapp architecture

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

- Interactive diagram: https://gitdiagram.com/bosesj/xumbleapp
- Repository: https://github.com/bosesj/xumbleapp

## Overview

##### Project Type and Purpose
- XUMBLE is a single-target iOS application built with SwiftUI (Swift 5, Xcode 15).
- It’s structured for learning/testing Xcode features (build settings, environment configurations, schemes) and demonstrates a basic MVVM-based feature organization.

##### File Structure Analysis
- Top-Level
- Xumble.xcodeproj (project, workspace, schemes for Debug/QA/Staging/Production)
- App Source (“Xumble” folder)
- XumbleApp.swift – application entry point (SwiftUI’s App)
- ContentView.swift – root SwiftUI view
- Info.plist – metadata & configuration
- Utils/GlobalSettings.swift – shared configuration and environment settings
- Feature/… – feature modules organized by domain, each following MVVM:
– BuildInfo (Model, ViewModel, View)
– DebugLog (View only)

##### Architectural Patterns and Key Components
- MVVM: each feature folder contains View, ViewModel, (and Model where needed).
- Modular Feature Boundaries: BuildInfo and DebugLog can be expanded into separate modules/services.
- Environment Configs & Schemes: multiple .xcworkspace schemes drive different build settings and Info.plist overrides.

a. Main Components
- App Shell (XumbleApp.swift)
- SwiftUI Views (ContentView, Feature Views)
- ViewModels (Business logic & state)
- Models (data structures, e.g., BuildInfo.swift)
- Utilities/GlobalSettings (environment & shared services)
- Build & Configuration Layer (Schemes, Build Settings, Info.plist overrides)
b. Relationships & Data Flow
1. App Shell launches → ContentView
2. ContentView routes user actions to Feature Views
3. Feature View binds to its ViewModel (two-way data binding)
4. ViewModel fetches/manipulates Model data & updates the view
5. ViewModel may read settings from GlobalSettings or environment
6. Build & Configuration Layer (via schemes) injects environment variables into GlobalSettings/Info.plist
c. Architectural Patterns
- MVVM separation: UI vs. State vs. Data
- Feature modularization for scalability
- Single App entry vs. multiple build configurations
d. Relevant Technologies
- SwiftUI (declarative UI)
- Swift 5, Xcode 15
- MVVM pattern
- Xcode Schemes (Debug/QA/Staging/Production)
- Assets Catalog (AppIcon, AccentColor)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Build & Configuration Layer
    subgraph "Build & Configuration Layer"
        direction TB
        Schemes["Xcode Schemes"]:::config
        InfoPlistOverride["Info.plist Overrides"]:::config
    end
    Schemes -->|"injects env vars"| InfoPlistOverride
    InfoPlistOverride -->|"updates"| GlobalSettings
    click Schemes "https://github.com/bosesj/xumbleapp/blob/main/Xumble.xcodeproj/xcshareddata/xcschemes/Xumble Debug.xcscheme"
    click Schemes "https://github.com/bosesj/xumbleapp/blob/main/Xumble.xcodeproj/xcshareddata/xcschemes/Xumble QA.xcscheme"
    click Schemes "https://github.com/bosesj/xumbleapp/blob/main/Xumble.xcodeproj/xcshareddata/xcschemes/Xumble Staging.xcscheme"
    click Schemes "https://github.com/bosesj/xumbleapp/blob/main/Xumble.xcodeproj/xcshareddata/xcschemes/Xumble Production.xcscheme"
    click InfoPlistOverride "https://github.com/bosesj/xumbleapp/blob/main/Xumble/Info.plist"

    %% Utilities & Data Config
    GlobalSettings["GlobalSettings"]:::data
    click GlobalSettings "https://github.com/bosesj/xumbleapp/blob/main/Xumble/Utils/GlobalSettings.swift"

    %% App Assets
    AssetsStore["Assets Store\n(colors & icons)"]:::data
    click AssetsStore "https://github.com/bosesj/xumbleapp/blob/main/Xumble/Assets.xcassets"

    %% App Shell and Root View
    AppShell["App Shell\n(XumbleApp.swift)"]:::view
    click AppShell "https://github.com/bosesj/xumbleapp/blob/main/Xumble/XumbleApp.swift"
    ContentView["ContentView"]:::view
    click ContentView "https://github.com/bosesj/xumbleapp/blob/main/Xumble/ContentView.swift"

    AppShell -->|"launches"| ContentView
    AssetsStore -->|"UI resources"| ContentView
    GlobalSettings -->|"configuration"| ContentView

    %% Features
    subgraph "Features"
        direction TB
        subgraph "BuildInfo Module"
            direction TB
            BIView["BuildInfoView"]:::view
            BIViewModel["BuildInfoViewModel"]:::viewmodel
            BIModel["BuildInfoModel"]:::data
            BIView -->|"\u2194 data binding"| BIViewModel
            BIViewModel -->|"uses"| BIModel
            BIViewModel -->|"reads"| GlobalSettings
            AssetsStore -->|"UI resources"| BIView
            click BIView "https://github.com/bosesj/xumbleapp/blob/main/Xumble/Feature/BuildInfo/View/BuildInfoVw.swift"
            click BIViewModel "https://github.com/bosesj/xumbleapp/blob/main/Xumble/Feature/BuildInfo/ViewModel/BuildInfoViewModel.swift"
            click BIModel "https://github.com/bosesj/xumbleapp/blob/main/Xumble/Feature/BuildInfo/Model/BuildInfo.swift"
        end
        subgraph "DebugLog Module"
            DebugView["DebugLogView"]:::view
            DebugView -->|"static UI"| DebugView
            AssetsStore -->|"UI resources"| DebugView
            click DebugView "https://github.com/bosesj/xumbleapp/blob/main/Xumble/Feature/DebugLog/DebugLogVw.swift"
        end
    end
    ContentView -->|"navigates to"| BIView
    ContentView -->|"navigates to"| DebugView

    %% Documentation & Project Files
    README["README.md"]:::data
    LICENSE["LICENSE"]:::data
    IconsDir["Icons"]:::data
    ProjectFile["Xcode Project File\n(project.pbxproj)"]:::config
    click README "https://github.com/bosesj/xumbleapp/blob/main/README.md"
    click LICENSE "https://github.com/bosesj/xumbleapp/tree/main/LICENSE"
    click IconsDir "https://github.com/bosesj/xumbleapp/tree/main/Icons"
    click ProjectFile "https://github.com/bosesj/xumbleapp/blob/main/Xumble.xcodeproj/project.pbxproj"

    %% Styles
    classDef view fill:#DCEEFB,stroke:#0366D6
    classDef viewmodel fill:#E6FFFA,stroke:#038C5E
    classDef data fill:#F0F0F0,stroke:#777
    classDef config fill:#FFF4E6,stroke:#D9822B
```
