# saviosailas/witamy-ios architecture

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

- Interactive diagram: https://gitdiagram.com/saviosailas/witamy-ios
- Repository: https://github.com/saviosailas/witamy-ios

## Overview

##### Main Components
- App Lifecycle Components: Include AppDelegate.swift and SceneDelegate.swift. These form the entry points and lifecycle handlers for the app.
- UI Layer: Represent the various view components found under the “src/Witamy/View” directory. Use separate nodes for HomeView, LoginView, and InfoCardView. Although the project does not explicitly show a “Model” folder, the views and their view models indicate a separation of UI and business logic.
- Business Logic / ViewModel Layer: Highlight the “src/Witamy/ViewModel/LoginViewModel.swift” as an example of how the application logic is separated from the UI, supporting the MVVM approach.
- Assets & Resource Management: Include a node for the Assets catalog (Assets.xcassets) and the storyboard (LaunchScreen.storyboard in Base.lproj) to indicate design assets and launch screens.
- Configuration & Metadata: Note the Info.plist and Xcode project files (extensions like .xcodeproj, project.pbxproj) as foundational for app configuration and build process.

##### Architectural Patterns and Design Principles
- Use of storyboard (LaunchScreen.storyboard) for initial UI and asset management shown in the Assets catalog.
- Mention dependency injection or data binding if these patterns are implemented, at least conceptually, between the View and ViewModel.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "App Lifecycle"
        AD["AppDelegate"]:::lifecycle
        SD["SceneDelegate"]:::lifecycle
    end

    subgraph "UI Layer"
        HV["HomeView"]:::ui
        LV["LoginView"]:::ui
        ICV["InfoCardView"]:::ui
    end

    subgraph "ViewModel Layer"
        LVM["LoginViewModel"]:::viewmodel
    end

    subgraph "Assets & Config"
        AC["Assets Catalog"]:::assets
        LS["Launch Screen Storyboard"]:::assets
        IP["Info.plist"]:::assets
        XCP["Xcode Project Files"]:::assets
    end

    %% Lifecycle to UI connections
    AD -->|"launches"| HV
    AD -->|"launches"| LV
    AD -->|"launches"| ICV
    SD -->|"handles"| HV
    SD -->|"handles"| LV
    SD -->|"handles"| ICV

    %% UI to ViewModel binding
    LV -->|"bindsTo"| LVM

    %% Assets & Config to App Lifecycle
    AC -->|"resources"| AD
    LS -->|"launchScreen"| AD
    IP -->|"configures"| AD
    XCP -->|"buildConfig"| AD

    %% Styles
    classDef lifecycle fill:#f9d6d5,stroke:#e08787,stroke-width:2px;
    classDef ui fill:#d5e8d4,stroke:#82b366,stroke-width:2px;
    classDef viewmodel fill:#dae8fc,stroke:#6c8ebf,stroke-width:2px;
    classDef assets fill:#fff2cc,stroke:#d6b656,stroke-width:2px;

    %% Click Events
    click AD "https://github.com/saviosailas/witamy-ios/blob/main/src/Witamy/AppDelegate.swift"
    click SD "https://github.com/saviosailas/witamy-ios/blob/main/src/Witamy/SceneDelegate.swift"
    click HV "https://github.com/saviosailas/witamy-ios/blob/main/src/Witamy/View/HomeView.swift"
    click LV "https://github.com/saviosailas/witamy-ios/blob/main/src/Witamy/View/LoginView.swift"
    click ICV "https://github.com/saviosailas/witamy-ios/blob/main/src/Witamy/View/InfoCardView.swift"
    click LVM "https://github.com/saviosailas/witamy-ios/blob/main/src/Witamy/ViewModel/LoginViewModel.swift"
    click AC "https://github.com/saviosailas/witamy-ios/blob/main/src/Witamy/Assets.xcassets"
    click LS "https://github.com/saviosailas/witamy-ios/blob/main/src/Witamy/Base.lproj/LaunchScreen.storyboard"
    click IP "https://github.com/saviosailas/witamy-ios/blob/main/src/Witamy/Info.plist"
    click XCP "https://github.com/saviosailas/witamy-ios/blob/main/src/Witamy.xcodeproj"
```
