# omkar492/matchmate architecture

> Architecture diagram of the GitHub repository omkar492/matchmate, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/omkar492/matchmate
- Repository: https://github.com/omkar492/matchmate

## Overview

MatchMate is an offline-first iOS matchmaking app. A user browses a paginated match feed, opens profile details, and accepts or declines matches; decisions are cached and synchronized between screens. The documented architecture also includes filtered decision lists, offline fallback, and on-device AI bio generation. The graph follows README-described interactions; most implementation files were not sampled, so undocumented calls and wiring are omitted.

Main entry points: [`MatchMate/MatchMate/Repositories/ProfileRepositoryImpl.swift`](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Repositories/ProfileRepositoryImpl.swift) (Profile Repository), [`MatchMate/MatchMate/Features/List/MatchListView.swift`](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Features/List/MatchListView.swift) (Match List), [`MatchMate/MatchMate/Features/Detail/MatchDetailViewModel.swift`](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Features/Detail/MatchDetailViewModel.swift) (Detail ViewModel), [`MatchMate/MatchMate/Features/Detail/MatchDetailView.swift`](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Features/Detail/MatchDetailView.swift) (Detail View)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Setup"]
  node_app_entry["App Entry<br/>[MatchMateApp.swift]"]
  node_composition["App Composition"]
end

subgraph group_presentation["Matchmaking UI"]
  node_list_view["Match List"]
  node_list_vm["List ViewModel"]
  node_match_card["Match Card"]
  node_detail_view["Detail View"]
  node_detail_vm["Detail ViewModel"]
  node_shared_ui["Shared UI"]
end

subgraph group_domain["Profiles and Repository"]
  node_repository["Profile Repository"]
  node_repository_contract["Repository Contract"]
  node_profile["Match Profile<br/>[MatchProfile.swift]"]
  node_status["Match Status<br/>[MatchStatus.swift]"]
  node_dto["Random User DTO"]
  node_entity["Profile Entity"]
end

subgraph group_data["Data and Integrations"]
  node_remote["Remote Data Source"]
  node_random_api["Random User API"]
  node_local["Local Data Source"]
  node_swiftdata[("SwiftData Store")]
  node_bio_generator["Bio Generator"]
end

node_user(("User"))

node_user -->|"launches"| node_app_entry
node_app_entry -.->|"configures"| node_composition
node_user -->|"browses"| node_list_view
node_list_view -->|"observes"| node_list_vm
node_list_view -->|"renders"| node_match_card
node_list_view -.->|"uses"| node_shared_ui
node_list_vm -->|"fetches profiles"| node_repository
node_user -->|"opens profile"| node_detail_view
node_detail_view -->|"observes"| node_detail_vm
node_detail_view -.->|"uses"| node_shared_ui
node_detail_vm -->|"updates status"| node_repository
node_detail_vm -->|"requests bio"| node_bio_generator
node_repository -->|"fetches pages"| node_remote
node_repository -->|"reads and writes"| node_local
node_repository -->|"broadcasts updates"| node_list_vm
node_repository -->|"broadcasts updates"| node_detail_vm
node_remote -->|"requests profiles"| node_random_api
node_local -->|"persists profiles"| node_swiftdata
node_remote -.->|"decodes"| node_dto
node_local -.->|"stores"| node_entity
node_repository -.->|"coordinates"| node_profile
node_repository -->|"preserves decisions"| node_status

click node_app_entry "https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/App/MatchMateApp.swift"
click node_composition "https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/App/AppComposition.swift"
click node_list_view "https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Features/List/MatchListView.swift"
click node_list_vm "https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Features/List/MatchListViewModel.swift"
click node_match_card "https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Features/List/MatchCardView.swift"
click node_detail_view "https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Features/Detail/MatchDetailView.swift"
click node_detail_vm "https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Features/Detail/MatchDetailViewModel.swift"
click node_shared_ui "https://github.com/omkar492/matchmate/tree/main/MatchMate/MatchMate/Features/Shared"
click node_repository "https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Repositories/ProfileRepositoryImpl.swift"
click node_repository_contract "https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Repositories/ProfileRepository.swift"
click node_profile "https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Models/Domain/MatchProfile.swift"
click node_status "https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Models/Domain/MatchStatus.swift"
click node_dto "https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Models/DTO/RandomUserDTO.swift"
click node_entity "https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Models/Persistence/ProfileEntity.swift"
click node_remote "https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Data/Remote/RandomUserRemoteDataSource.swift"
click node_local "https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Data/Local/SwiftDataLocalDataSource.swift"
click node_bio_generator "https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Services/AI/FoundationBioGenerator.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_app_entry,node_composition,node_user toneBlue
class node_list_view,node_list_vm,node_match_card,node_detail_view,node_detail_vm,node_shared_ui toneAmber
class node_repository,node_repository_contract,node_profile,node_status,node_dto,node_entity toneMint
class node_remote,node_random_api,node_local,node_swiftdata,node_bio_generator toneRose
```

## Components

### App Setup

- [App Entry](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/App/MatchMateApp.swift): `MatchMate/MatchMate/App/MatchMateApp.swift`
- [App Composition](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/App/AppComposition.swift): `MatchMate/MatchMate/App/AppComposition.swift`

### Matchmaking UI

- [Match List](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Features/List/MatchListView.swift): `MatchMate/MatchMate/Features/List/MatchListView.swift`
- [List ViewModel](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Features/List/MatchListViewModel.swift): `MatchMate/MatchMate/Features/List/MatchListViewModel.swift`
- [Match Card](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Features/List/MatchCardView.swift): `MatchMate/MatchMate/Features/List/MatchCardView.swift`
- [Detail View](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Features/Detail/MatchDetailView.swift): `MatchMate/MatchMate/Features/Detail/MatchDetailView.swift`
- [Detail ViewModel](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Features/Detail/MatchDetailViewModel.swift): `MatchMate/MatchMate/Features/Detail/MatchDetailViewModel.swift`
- [Shared UI](https://github.com/omkar492/matchmate/tree/main/MatchMate/MatchMate/Features/Shared): `MatchMate/MatchMate/Features/Shared`

### Profiles and Repository

- [Profile Repository](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Repositories/ProfileRepositoryImpl.swift): `MatchMate/MatchMate/Repositories/ProfileRepositoryImpl.swift`
- [Repository Contract](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Repositories/ProfileRepository.swift): `MatchMate/MatchMate/Repositories/ProfileRepository.swift`
- [Match Profile](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Models/Domain/MatchProfile.swift): `MatchMate/MatchMate/Models/Domain/MatchProfile.swift`
- [Match Status](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Models/Domain/MatchStatus.swift): `MatchMate/MatchMate/Models/Domain/MatchStatus.swift`
- [Random User DTO](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Models/DTO/RandomUserDTO.swift): `MatchMate/MatchMate/Models/DTO/RandomUserDTO.swift`
- [Profile Entity](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Models/Persistence/ProfileEntity.swift): `MatchMate/MatchMate/Models/Persistence/ProfileEntity.swift`

### Data and Integrations

- [Remote Data Source](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Data/Remote/RandomUserRemoteDataSource.swift): `MatchMate/MatchMate/Data/Remote/RandomUserRemoteDataSource.swift`
- **Random User API**
- [Local Data Source](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Data/Local/SwiftDataLocalDataSource.swift): `MatchMate/MatchMate/Data/Local/SwiftDataLocalDataSource.swift`
- **SwiftData Store**
- [Bio Generator](https://github.com/omkar492/matchmate/blob/main/MatchMate/MatchMate/Services/AI/FoundationBioGenerator.swift): `MatchMate/MatchMate/Services/AI/FoundationBioGenerator.swift`

### Other components

- **User**

## Connections

- User → App Entry: launches (evidence: `README.md`)
- App Entry → App Composition: configures
- User → Match List: browses (evidence: `README.md`)
- Match List → List ViewModel: observes (evidence: `README.md`)
- Match List → Match Card: renders (evidence: `README.md`)
- Match List → Shared UI: uses
- List ViewModel → Profile Repository: fetches profiles (evidence: `README.md`)
- User → Detail View: opens profile (evidence: `README.md`)
- Detail View → Detail ViewModel: observes (evidence: `README.md`)
- Detail View → Shared UI: uses
- Detail ViewModel → Profile Repository: updates status (evidence: `README.md`)
- Detail ViewModel → Bio Generator: requests bio (evidence: `README.md`)
- Profile Repository → Remote Data Source: fetches pages (evidence: `README.md`)
- Profile Repository → Local Data Source: reads and writes (evidence: `README.md`)
- Profile Repository → List ViewModel: broadcasts updates (evidence: `README.md`)
- Profile Repository → Detail ViewModel: broadcasts updates (evidence: `README.md`)
- Remote Data Source → Random User API: requests profiles (evidence: `README.md`)
- Local Data Source → SwiftData Store: persists profiles (evidence: `README.md`)
- Remote Data Source → Random User DTO: decodes
- Local Data Source → Profile Entity: stores
- Profile Repository → Match Profile: coordinates
- Profile Repository → Match Status: preserves decisions (evidence: `README.md`)
