# aho0526/rowpilot architecture

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

- Interactive diagram: https://gitdiagram.com/aho0526/rowpilot
- Repository: https://github.com/aho0526/rowpilot

## Overview

RowPilot is an iOS rowing-training app for athletes, coaches, and boat technicians. Its primary workflow records on-water or erg workouts, presents and saves workout data, then supports review and sharing. Separate capabilities cover multi-PM5 team sessions, rigging, environmental conditions, safety, and subscriptions. Relationships below use README statements and the supplied SOURCE INDEX; several feature implementations were not excerpted, so those links are documented rather than inferred from unsampled code.

Main entry points: [`Views/Components/HomeView.swift`](https://github.com/aho0526/rowpilot/blob/main/Views/Components/HomeView.swift) (Home dashboard), [`ViewModels/RecordManager.swift`](https://github.com/aho0526/rowpilot/blob/main/ViewModels/RecordManager.swift) (Record management), [`Views/PracticeView.swift`](https://github.com/aho0526/rowpilot/blob/main/Views/PracticeView.swift) (Water workout), [`ViewModels/PM5ManagerViewModel.swift`](https://github.com/aho0526/rowpilot/blob/main/ViewModels/PM5ManagerViewModel.swift) (PM5 control and metrics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App experience"]
  node_app["App entry<br/>[RowPilotApp.swift]"]
  node_home["Home dashboard<br/>[HomeView.swift]"]
end

subgraph group_training["Training and records"]
  node_water["Water workout<br/>[PracticeView.swift]"]
  node_sensor["Motion sensing"]
  node_location["GPS tracking"]
  node_erg["Personal erg"]
  node_record["Workout records<br/>[RowingRecord.swift]"]
  node_recordmanager["Record management"]
  node_share["Workout sharing"]
end

subgraph group_team["Team erg"]
  node_dashboard["Manager dashboard"]
  node_setup["Team workout setup"]
  node_pm5["PM5 control and metrics"]
  node_race["Race view"]
end

subgraph group_rowing["Rigging and conditions"]
  node_rigging["Rigging management"]
  node_riggingdata["Rigging configuration"]
  node_diagrams["Rigging diagrams"]
  node_tide["Tide information<br/>[TideManager.swift]"]
  node_weather["Weather information"]
  node_safety["Emergency SOS"]
end

subgraph group_platform["Persistence and services"]
  node_persistence[("Core Data persistence<br/>[Persistence.swift]")]
  node_icloud["iCloud workout sync"]
  node_subscriptions["Plans and access"]
end

node_rower(("Rower or coach"))
node_pm5device{{"Concept2 PM5"}}
node_environment{{"GPS and weather services"}}

node_rower -->|"opens"| node_app
node_app -->|"shows"| node_home
node_home -.->|"starts workout"| node_water
node_water -.->|"reads motion"| node_sensor
node_water -.->|"tracks route"| node_location
node_water -.->|"saves workout"| node_recordmanager
node_erg -.->|"records metrics"| node_recordmanager
node_recordmanager -->|"creates records"| node_record
node_recordmanager -.->|"persists records"| node_persistence
node_home -->|"browses records"| node_recordmanager
node_recordmanager -->|"syncs records"| node_icloud
node_recordmanager -->|"shares records"| node_share
node_home -.->|"configures team"| node_setup
node_setup -->|"sends workouts"| node_pm5
node_pm5 -.->|"controls Bluetooth"| node_pm5device
node_dashboard -->|"displays metrics"| node_pm5
node_dashboard -->|"opens race view"| node_race
node_pm5 -->|"saves session"| node_recordmanager
node_home -->|"opens rigging"| node_rigging
node_rigging -->|"manages setup"| node_riggingdata
node_rigging -.->|"renders diagrams"| node_diagrams
node_home -->|"shows tides"| node_tide
node_home -->|"shows weather"| node_weather
node_tide -.->|"uses location"| node_environment
node_weather -.->|"fetches conditions"| node_environment
node_water -.->|"offers SOS"| node_safety
node_home -.->|"manages access"| node_subscriptions
node_dashboard -->|"starts sharing"| node_share

click node_app "https://github.com/aho0526/rowpilot/blob/main/App/RowPilotApp.swift"
click node_home "https://github.com/aho0526/rowpilot/blob/main/Views/Components/HomeView.swift"
click node_water "https://github.com/aho0526/rowpilot/blob/main/Views/PracticeView.swift"
click node_sensor "https://github.com/aho0526/rowpilot/blob/main/ViewModels/MotionManager.swift"
click node_location "https://github.com/aho0526/rowpilot/blob/main/ViewModels/LocationManager.swift"
click node_erg "https://github.com/aho0526/rowpilot/blob/main/ViewModels/RowErgManager.swift"
click node_record "https://github.com/aho0526/rowpilot/blob/main/Models/RowingRecord.swift"
click node_recordmanager "https://github.com/aho0526/rowpilot/blob/main/ViewModels/RecordManager.swift"
click node_share "https://github.com/aho0526/rowpilot/blob/main/Utilities/WorkoutShareManager.swift"
click node_dashboard "https://github.com/aho0526/rowpilot/blob/main/Views/ManagerWorkoutDashboardView.swift"
click node_setup "https://github.com/aho0526/rowpilot/blob/main/Views/ManagerWorkoutSetupView.swift"
click node_pm5 "https://github.com/aho0526/rowpilot/blob/main/ViewModels/PM5ManagerViewModel.swift"
click node_race "https://github.com/aho0526/rowpilot/blob/main/Views/ManagerRaceView.swift"
click node_rigging "https://github.com/aho0526/rowpilot/blob/main/Views/RiggingManagerView.swift"
click node_riggingdata "https://github.com/aho0526/rowpilot/blob/main/Models/RiggingConfig.swift"
click node_diagrams "https://github.com/aho0526/rowpilot/blob/main/Views/Components/BoatRiggingDiagramView.swift"
click node_tide "https://github.com/aho0526/rowpilot/blob/main/ViewModels/TideManager.swift"
click node_weather "https://github.com/aho0526/rowpilot/blob/main/ViewModels/WeatherManager.swift"
click node_safety "https://github.com/aho0526/rowpilot/blob/main/Views/SOSOverlayView.swift"
click node_persistence "https://github.com/aho0526/rowpilot/blob/main/Utilities/Persistence.swift"
click node_icloud "https://github.com/aho0526/rowpilot/blob/main/Utilities/ICloudSyncManager.swift"
click node_subscriptions "https://github.com/aho0526/rowpilot/blob/main/Models/SubscriptionManager.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,node_home toneBlue
class node_water,node_sensor,node_location,node_erg,node_record,node_recordmanager,node_share toneAmber
class node_dashboard,node_setup,node_pm5,node_race toneMint
class node_rigging,node_riggingdata,node_diagrams,node_tide,node_weather,node_safety toneRose
class node_persistence,node_icloud,node_subscriptions,node_rower,node_pm5device,node_environment toneIndigo
```

## Components

### App experience

- [App entry](https://github.com/aho0526/rowpilot/blob/main/App/RowPilotApp.swift): `App/RowPilotApp.swift`
- [Home dashboard](https://github.com/aho0526/rowpilot/blob/main/Views/Components/HomeView.swift): `Views/Components/HomeView.swift`

### Training and records

- [Water workout](https://github.com/aho0526/rowpilot/blob/main/Views/PracticeView.swift): `Views/PracticeView.swift`
- [Motion sensing](https://github.com/aho0526/rowpilot/blob/main/ViewModels/MotionManager.swift): `ViewModels/MotionManager.swift`
- [GPS tracking](https://github.com/aho0526/rowpilot/blob/main/ViewModels/LocationManager.swift): `ViewModels/LocationManager.swift`
- [Personal erg](https://github.com/aho0526/rowpilot/blob/main/ViewModels/RowErgManager.swift): `ViewModels/RowErgManager.swift`
- [Workout records](https://github.com/aho0526/rowpilot/blob/main/Models/RowingRecord.swift): `Models/RowingRecord.swift`
- [Record management](https://github.com/aho0526/rowpilot/blob/main/ViewModels/RecordManager.swift): `ViewModels/RecordManager.swift`
- [Workout sharing](https://github.com/aho0526/rowpilot/blob/main/Utilities/WorkoutShareManager.swift): `Utilities/WorkoutShareManager.swift`

### Team erg

- [Manager dashboard](https://github.com/aho0526/rowpilot/blob/main/Views/ManagerWorkoutDashboardView.swift): `Views/ManagerWorkoutDashboardView.swift`
- [Team workout setup](https://github.com/aho0526/rowpilot/blob/main/Views/ManagerWorkoutSetupView.swift): `Views/ManagerWorkoutSetupView.swift`
- [PM5 control and metrics](https://github.com/aho0526/rowpilot/blob/main/ViewModels/PM5ManagerViewModel.swift): `ViewModels/PM5ManagerViewModel.swift`
- [Race view](https://github.com/aho0526/rowpilot/blob/main/Views/ManagerRaceView.swift): `Views/ManagerRaceView.swift`

### Rigging and conditions

- [Rigging management](https://github.com/aho0526/rowpilot/blob/main/Views/RiggingManagerView.swift): `Views/RiggingManagerView.swift`
- [Rigging configuration](https://github.com/aho0526/rowpilot/blob/main/Models/RiggingConfig.swift): `Models/RiggingConfig.swift`
- [Rigging diagrams](https://github.com/aho0526/rowpilot/blob/main/Views/Components/BoatRiggingDiagramView.swift): `Views/Components/BoatRiggingDiagramView.swift`
- [Tide information](https://github.com/aho0526/rowpilot/blob/main/ViewModels/TideManager.swift): `ViewModels/TideManager.swift`
- [Weather information](https://github.com/aho0526/rowpilot/blob/main/ViewModels/WeatherManager.swift): `ViewModels/WeatherManager.swift`
- [Emergency SOS](https://github.com/aho0526/rowpilot/blob/main/Views/SOSOverlayView.swift): `Views/SOSOverlayView.swift`

### Persistence and services

- [Core Data persistence](https://github.com/aho0526/rowpilot/blob/main/Utilities/Persistence.swift): `Utilities/Persistence.swift`
- [iCloud workout sync](https://github.com/aho0526/rowpilot/blob/main/Utilities/ICloudSyncManager.swift): `Utilities/ICloudSyncManager.swift`
- [Plans and access](https://github.com/aho0526/rowpilot/blob/main/Models/SubscriptionManager.swift): `Models/SubscriptionManager.swift`

### Other components

- **Rower or coach**
- **Concept2 PM5**
- **GPS and weather services**

## Connections

- Rower or coach → App entry: opens
- App entry → Home dashboard: shows (evidence: `App/RowPilotApp.swift`)
- Home dashboard → Water workout: starts workout
- Water workout → Motion sensing: reads motion
- Water workout → GPS tracking: tracks route
- Water workout → Record management: saves workout
- Personal erg → Record management: records metrics
- Record management → Workout records: creates records (evidence: `ViewModels/RecordManager.swift`)
- Record management → Core Data persistence: persists records
- Home dashboard → Record management: browses records (evidence: `Views/Components/HomeView.swift`)
- Record management → iCloud workout sync: syncs records (evidence: `Utilities/ICloudSyncManager.swift`)
- Record management → Workout sharing: shares records (evidence: `Utilities/WorkoutShareManager.swift`)
- Home dashboard → Team workout setup: configures team
- Team workout setup → PM5 control and metrics: sends workouts (evidence: `Views/ManagerWorkoutSetupView.swift`)
- PM5 control and metrics → Concept2 PM5: controls Bluetooth
- Manager dashboard → PM5 control and metrics: displays metrics (evidence: `Views/ManagerWorkoutDashboardView.swift`)
- Manager dashboard → Race view: opens race view (evidence: `Views/ManagerWorkoutDashboardView.swift`)
- PM5 control and metrics → Record management: saves session (evidence: `ViewModels/PM5ManagerViewModel.swift`)
- Home dashboard → Rigging management: opens rigging (evidence: `Views/Components/HomeView.swift`)
- Rigging management → Rigging configuration: manages setup (evidence: `Views/RiggingManagerView.swift`)
- Rigging management → Rigging diagrams: renders diagrams
- Home dashboard → Tide information: shows tides (evidence: `Views/Components/HomeView.swift`)
- Home dashboard → Weather information: shows weather (evidence: `Views/Components/HomeView.swift`)
- Tide information → GPS and weather services: uses location
- Weather information → GPS and weather services: fetches conditions
- Water workout → Emergency SOS: offers SOS
- Home dashboard → Plans and access: manages access
- Manager dashboard → Workout sharing: starts sharing (evidence: `Views/ManagerWorkoutDashboardView.swift`)
