# greenerchen/mvvm-c-ios architecture

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

- Interactive diagram: https://gitdiagram.com/greenerchen/mvvm-c-ios
- Repository: https://github.com/greenerchen/mvvm-c-ios

## Overview

This is a small iOS example of MVVM-C navigation: coordinators own navigation and child flows, while view controllers delegate navigation decisions. The README documents the pattern, but only the shared coordinator implementation was excerpted; the example app and feature files are present in the tree but their source was not sampled. The graph therefore shows documented pattern relationships and leaves feature-specific wiring unspecified.

Main entry points: [`Examples/App/AppCoordinator.swift`](https://github.com/greenerchen/mvvm-c-ios/blob/main/Examples/App/AppCoordinator.swift) (App coordinator), [`Examples/Modules/Main/MainViewController.swift`](https://github.com/greenerchen/mvvm-c-ios/blob/main/Examples/Modules/Main/MainViewController.swift) (Main screen), [`Examples/Modules/Main/DetailViewController.swift`](https://github.com/greenerchen/mvvm-c-ios/blob/main/Examples/Modules/Main/DetailViewController.swift) (Detail screen), [`Sources/Coordinator.swift`](https://github.com/greenerchen/mvvm-c-ios/blob/main/Sources/Coordinator.swift) (Coordinator base)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App lifecycle"]
  node_scene["Scene delegate"]
  node_appcoord["App coordinator"]
end

subgraph group_features["Feature screens"]
  node_main["Main screen"]
  node_detail["Detail screen"]
  node_popupcoord["Popup coordinator"]
  node_popup["Popup screen"]
end

subgraph group_coordination["Coordinator core"]
  node_coordinator["Coordinator base<br/>[Coordinator.swift]"]
end

node_user(("User"))

node_user -->|"uses"| node_main
node_main -->|"delegates navigation"| node_appcoord
node_appcoord -->|"presents screen"| node_detail
node_appcoord -.->|"shares coordinator behavior"| node_coordinator

click node_scene "https://github.com/greenerchen/mvvm-c-ios/blob/main/Examples/App/SceneDelegate.swift"
click node_appcoord "https://github.com/greenerchen/mvvm-c-ios/blob/main/Examples/App/AppCoordinator.swift"
click node_main "https://github.com/greenerchen/mvvm-c-ios/blob/main/Examples/Modules/Main/MainViewController.swift"
click node_detail "https://github.com/greenerchen/mvvm-c-ios/blob/main/Examples/Modules/Main/DetailViewController.swift"
click node_popupcoord "https://github.com/greenerchen/mvvm-c-ios/blob/main/Examples/Modules/Pop-up/PopupCoordinator.swift"
click node_popup "https://github.com/greenerchen/mvvm-c-ios/blob/main/Examples/Modules/Pop-up/PopupViewController.swift"
click node_coordinator "https://github.com/greenerchen/mvvm-c-ios/blob/main/Sources/Coordinator.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_scene,node_appcoord,node_user toneBlue
class node_main,node_detail,node_popupcoord,node_popup toneAmber
class node_coordinator toneMint
```

## Components

### App lifecycle

- [Scene delegate](https://github.com/greenerchen/mvvm-c-ios/blob/main/Examples/App/SceneDelegate.swift): `Examples/App/SceneDelegate.swift`
- [App coordinator](https://github.com/greenerchen/mvvm-c-ios/blob/main/Examples/App/AppCoordinator.swift): `Examples/App/AppCoordinator.swift`

### Feature screens

- [Main screen](https://github.com/greenerchen/mvvm-c-ios/blob/main/Examples/Modules/Main/MainViewController.swift): `Examples/Modules/Main/MainViewController.swift`
- [Detail screen](https://github.com/greenerchen/mvvm-c-ios/blob/main/Examples/Modules/Main/DetailViewController.swift): `Examples/Modules/Main/DetailViewController.swift`
- [Popup coordinator](https://github.com/greenerchen/mvvm-c-ios/blob/main/Examples/Modules/Pop-up/PopupCoordinator.swift): `Examples/Modules/Pop-up/PopupCoordinator.swift`
- [Popup screen](https://github.com/greenerchen/mvvm-c-ios/blob/main/Examples/Modules/Pop-up/PopupViewController.swift): `Examples/Modules/Pop-up/PopupViewController.swift`

### Coordinator core

- [Coordinator base](https://github.com/greenerchen/mvvm-c-ios/blob/main/Sources/Coordinator.swift): `Sources/Coordinator.swift`

### Other components

- **User**

## Connections

- User → Main screen: uses
- Main screen → App coordinator: delegates navigation (evidence: `README.md`)
- App coordinator → Detail screen: presents screen (evidence: `README.md`)
- App coordinator → Coordinator base: shares coordinator behavior
