# leehongyul/workoutcycle architecture

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

- Interactive diagram: https://gitdiagram.com/leehongyul/workoutcycle
- Repository: https://github.com/leehongyul/workoutcycle

## Overview

WorkoutCycle is an iOS workout-split planner: users choose a preset or create custom workout parts, see the current rotation, and record completed workouts on a calendar. The README also documents scheduled local reminders and settings; these are represented, though their detailed wiring is only partly evidenced by the sampled code. The graph emphasizes shown calls and reads/writes; unsampled subsystem links are omitted rather than inferred.

Main entry points: [`View/SettingViews/SettingViewController.swift`](https://github.com/leehongyul/workoutcycle/blob/main/View/SettingViews/SettingViewController.swift) (Settings menu), [`Data/CoreDataManger/WorkCycleDataManger.swift`](https://github.com/leehongyul/workoutcycle/blob/main/Data/CoreDataManger/WorkCycleDataManger.swift) (Workout data), [`View/ListWorkViews/InputWorkCycleViewController.swift`](https://github.com/leehongyul/workoutcycle/blob/main/View/ListWorkViews/InputWorkCycleViewController.swift) (Custom routine input), [`View/FinalView/FinalWorkCycleViewController.swift`](https://github.com/leehongyul/workoutcycle/blob/main/View/FinalView/FinalWorkCycleViewController.swift) (Today's workout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["App setup"]
  node_app["App launch<br/>[AppDelegate.swift]"]
  node_tabs["Tab navigation"]
end

subgraph group_routine["Routine planning"]
  node_start["Start and date"]
  node_choose["Preset selection"]
  node_preset["Preset details"]
  node_recommend["Recommended splits"]
  node_custom["Add routine parts"]
  node_input["Custom routine input"]
  node_tagui["Tag list UI<br/>[TagListView.swift]"]
  node_routinelisting["Routine list"]
  node_today["Today's workout"]
end

subgraph group_tracking["Workout tracking"]
  node_calendar["Completion calendar"]
end

subgraph group_preferences["Settings and reminders"]
  node_settings["Settings menu"]
  node_alarm["Alarm settings"]
  node_notifications["Local reminders"]
end

subgraph group_persistence["Persistence"]
  node_workdata[("Workout data")]
  node_daydata[("Rotation dates")]
  node_checkdata[("Completion records")]
  node_tagdata[("Custom tags")]
end

node_user(("App user"))
node_notificationservice["iOS notifications"]

node_user -->|"launches"| node_app
node_app -.->|"starts navigation"| node_tabs
node_user -->|"starts rotation"| node_start
node_start -->|"reads and updates"| node_daydata
node_start -->|"checks routines"| node_workdata
node_user -->|"selects split"| node_choose
node_choose -->|"passes selection"| node_preset
node_choose -->|"passes details"| node_recommend
node_preset -->|"saves split"| node_workdata
node_user -->|"adds routine"| node_custom
node_custom -->|"opens input"| node_input
node_input -->|"renders tags"| node_tagui
node_input -->|"reads and writes"| node_tagdata
node_input -->|"saves routine part"| node_workdata
node_routinelisting -->|"fetches and deletes"| node_workdata
node_today -->|"fetches rotation"| node_workdata
node_today -->|"fetches dates"| node_daydata
node_today -->|"checks permission"| node_notifications
node_user -->|"records workout"| node_calendar
node_calendar -->|"fetches and records"| node_checkdata
node_user -->|"configures app"| node_settings
node_settings -->|"opens alarm settings"| node_alarm
node_settings -->|"resets dates"| node_daydata
node_settings -->|"resets records"| node_checkdata
node_settings -->|"resets routines"| node_workdata
node_settings -->|"resets tags"| node_tagdata
node_notifications -->|"schedules reminders"| node_notificationservice
node_user -.->|"receives reminders"| node_notificationservice

click node_app "https://github.com/leehongyul/workoutcycle/blob/main/Resource/AppDelegate.swift"
click node_tabs "https://github.com/leehongyul/workoutcycle/blob/main/View/BaseStartViews/TabBarViewController.swift"
click node_start "https://github.com/leehongyul/workoutcycle/blob/main/View/BaseStartViews/StartViewController.swift"
click node_choose "https://github.com/leehongyul/workoutcycle/blob/main/View/SelectWorkCycleViews/SetWorkoutCycleViewController.swift"
click node_preset "https://github.com/leehongyul/workoutcycle/blob/main/View/SelectWorkCycleViews/WorkCycleViewController.swift"
click node_recommend "https://github.com/leehongyul/workoutcycle/blob/main/View/SelectWorkCycleViews/SetDetailViewController.swift"
click node_custom "https://github.com/leehongyul/workoutcycle/blob/main/View/ListWorkViews/AddWorkCycleViewController.swift"
click node_input "https://github.com/leehongyul/workoutcycle/blob/main/View/ListWorkViews/InputWorkCycleViewController.swift"
click node_tagui "https://github.com/leehongyul/workoutcycle/blob/main/Pods/TagListView/TagListView/TagListView.swift"
click node_routinelisting "https://github.com/leehongyul/workoutcycle/blob/main/View/ListWorkViews/ListWorkCycleViewController.swift"
click node_today "https://github.com/leehongyul/workoutcycle/blob/main/View/FinalView/FinalWorkCycleViewController.swift"
click node_calendar "https://github.com/leehongyul/workoutcycle/blob/main/View/CalendarView/CalendarViewController.swift"
click node_settings "https://github.com/leehongyul/workoutcycle/blob/main/View/SettingViews/SettingViewController.swift"
click node_alarm "https://github.com/leehongyul/workoutcycle/blob/main/View/SettingViews/SettingDetail/AlarmViewController.swift"
click node_notifications "https://github.com/leehongyul/workoutcycle/blob/main/View/BaseStartViews/BaseViewController.swift"
click node_workdata "https://github.com/leehongyul/workoutcycle/blob/main/Data/CoreDataManger/WorkCycleDataManger.swift"
click node_daydata "https://github.com/leehongyul/workoutcycle/blob/main/Data/CoreDataManger/DayCheckDataManger.swift"
click node_checkdata "https://github.com/leehongyul/workoutcycle/blob/main/Data/CoreDataManger/CheckMarkDataManger.swift"
click node_tagdata "https://github.com/leehongyul/workoutcycle/blob/main/Data/CoreDataManger/TagListDataManger.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_tabs,node_user toneBlue
class node_start,node_choose,node_preset,node_recommend,node_custom,node_input,node_tagui,node_routinelisting,node_today toneAmber
class node_calendar toneMint
class node_settings,node_alarm,node_notifications toneRose
class node_workdata,node_daydata,node_checkdata,node_tagdata,node_notificationservice toneIndigo
```

## Components

### App setup

- [App launch](https://github.com/leehongyul/workoutcycle/blob/main/Resource/AppDelegate.swift): `Resource/AppDelegate.swift`
- [Tab navigation](https://github.com/leehongyul/workoutcycle/blob/main/View/BaseStartViews/TabBarViewController.swift): `View/BaseStartViews/TabBarViewController.swift`

### Routine planning

- [Start and date](https://github.com/leehongyul/workoutcycle/blob/main/View/BaseStartViews/StartViewController.swift): `View/BaseStartViews/StartViewController.swift`
- [Preset selection](https://github.com/leehongyul/workoutcycle/blob/main/View/SelectWorkCycleViews/SetWorkoutCycleViewController.swift): `View/SelectWorkCycleViews/SetWorkoutCycleViewController.swift`
- [Preset details](https://github.com/leehongyul/workoutcycle/blob/main/View/SelectWorkCycleViews/WorkCycleViewController.swift): `View/SelectWorkCycleViews/WorkCycleViewController.swift`
- [Recommended splits](https://github.com/leehongyul/workoutcycle/blob/main/View/SelectWorkCycleViews/SetDetailViewController.swift): `View/SelectWorkCycleViews/SetDetailViewController.swift`
- [Add routine parts](https://github.com/leehongyul/workoutcycle/blob/main/View/ListWorkViews/AddWorkCycleViewController.swift): `View/ListWorkViews/AddWorkCycleViewController.swift`
- [Custom routine input](https://github.com/leehongyul/workoutcycle/blob/main/View/ListWorkViews/InputWorkCycleViewController.swift): `View/ListWorkViews/InputWorkCycleViewController.swift`
- [Tag list UI](https://github.com/leehongyul/workoutcycle/blob/main/Pods/TagListView/TagListView/TagListView.swift): `Pods/TagListView/TagListView/TagListView.swift`
- [Routine list](https://github.com/leehongyul/workoutcycle/blob/main/View/ListWorkViews/ListWorkCycleViewController.swift): `View/ListWorkViews/ListWorkCycleViewController.swift`
- [Today's workout](https://github.com/leehongyul/workoutcycle/blob/main/View/FinalView/FinalWorkCycleViewController.swift): `View/FinalView/FinalWorkCycleViewController.swift`

### Workout tracking

- [Completion calendar](https://github.com/leehongyul/workoutcycle/blob/main/View/CalendarView/CalendarViewController.swift): `View/CalendarView/CalendarViewController.swift`

### Settings and reminders

- [Settings menu](https://github.com/leehongyul/workoutcycle/blob/main/View/SettingViews/SettingViewController.swift): `View/SettingViews/SettingViewController.swift`
- [Alarm settings](https://github.com/leehongyul/workoutcycle/blob/main/View/SettingViews/SettingDetail/AlarmViewController.swift): `View/SettingViews/SettingDetail/AlarmViewController.swift`
- [Local reminders](https://github.com/leehongyul/workoutcycle/blob/main/View/BaseStartViews/BaseViewController.swift): `View/BaseStartViews/BaseViewController.swift`

### Persistence

- [Workout data](https://github.com/leehongyul/workoutcycle/blob/main/Data/CoreDataManger/WorkCycleDataManger.swift): `Data/CoreDataManger/WorkCycleDataManger.swift`
- [Rotation dates](https://github.com/leehongyul/workoutcycle/blob/main/Data/CoreDataManger/DayCheckDataManger.swift): `Data/CoreDataManger/DayCheckDataManger.swift`
- [Completion records](https://github.com/leehongyul/workoutcycle/blob/main/Data/CoreDataManger/CheckMarkDataManger.swift): `Data/CoreDataManger/CheckMarkDataManger.swift`
- [Custom tags](https://github.com/leehongyul/workoutcycle/blob/main/Data/CoreDataManger/TagListDataManger.swift): `Data/CoreDataManger/TagListDataManger.swift`

### Other components

- **App user**
- **iOS notifications**

## Connections

- App user → App launch: launches (evidence: `Resource/AppDelegate.swift`)
- App launch → Tab navigation: starts navigation
- App user → Start and date: starts rotation (evidence: `View/BaseStartViews/StartViewController.swift`)
- Start and date → Rotation dates: reads and updates (evidence: `View/BaseStartViews/StartViewController.swift`)
- Start and date → Workout data: checks routines (evidence: `View/BaseStartViews/StartViewController.swift`)
- App user → Preset selection: selects split (evidence: `View/SelectWorkCycleViews/SetWorkoutCycleViewController.swift`)
- Preset selection → Preset details: passes selection (evidence: `View/SelectWorkCycleViews/SetWorkoutCycleViewController.swift`)
- Preset selection → Recommended splits: passes details (evidence: `View/SelectWorkCycleViews/SetWorkoutCycleViewController.swift`)
- Preset details → Workout data: saves split (evidence: `View/SelectWorkCycleViews/WorkCycleViewController.swift`)
- App user → Add routine parts: adds routine (evidence: `View/ListWorkViews/AddWorkCycleViewController.swift`)
- Add routine parts → Custom routine input: opens input (evidence: `View/ListWorkViews/AddWorkCycleViewController.swift`)
- Custom routine input → Tag list UI: renders tags (evidence: `View/ListWorkViews/InputWorkCycleViewController.swift`)
- Custom routine input → Custom tags: reads and writes (evidence: `View/ListWorkViews/InputWorkCycleViewController.swift`)
- Custom routine input → Workout data: saves routine part (evidence: `View/ListWorkViews/InputWorkCycleViewController.swift`)
- Routine list → Workout data: fetches and deletes (evidence: `View/ListWorkViews/ListWorkCycleViewController.swift`)
- Today's workout → Workout data: fetches rotation (evidence: `View/FinalView/FinalWorkCycleViewController.swift`)
- Today's workout → Rotation dates: fetches dates (evidence: `View/FinalView/FinalWorkCycleViewController.swift`)
- Today's workout → Local reminders: checks permission (evidence: `View/FinalView/FinalWorkCycleViewController.swift`)
- App user → Completion calendar: records workout (evidence: `View/CalendarView/CalendarViewController.swift`)
- Completion calendar → Completion records: fetches and records (evidence: `View/CalendarView/CalendarViewController.swift`)
- App user → Settings menu: configures app (evidence: `View/SettingViews/SettingViewController.swift`)
- Settings menu → Alarm settings: opens alarm settings (evidence: `View/SettingViews/SettingViewController.swift`)
- Settings menu → Rotation dates: resets dates (evidence: `View/SettingViews/SettingViewController.swift`)
- Settings menu → Completion records: resets records (evidence: `View/SettingViews/SettingViewController.swift`)
- Settings menu → Workout data: resets routines (evidence: `View/SettingViews/SettingViewController.swift`)
- Settings menu → Custom tags: resets tags (evidence: `View/SettingViews/SettingViewController.swift`)
- Local reminders → iOS notifications: schedules reminders (evidence: `View/BaseStartViews/BaseViewController.swift`)
- App user → iOS notifications: receives reminders (evidence: `README.md`)
