# giselezz/studyplanner_ios architecture

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

- Interactive diagram: https://gitdiagram.com/giselezz/studyplanner_ios
- Repository: https://github.com/giselezz/studyplanner_ios

## Overview

StudyPlanner is a SwiftUI study-planning app: students enter an assignment, receive task and duration suggestions, schedule and validate sessions, then approve and save a plan. Saved plans support browsing, progress tracking, completion, rescheduling, and deletion. The sampled ViewModel coordinates use cases and JSON persistence; several screens and their detailed wiring are represented from the README and file tree rather than sampled source.

Main entry points: [`StudyPlanner/ViewModels/StudyPlannerViewModel.swift`](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/ViewModels/StudyPlannerViewModel.swift) (Planner coordinator), [`StudyPlanner/ContentView.swift`](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/ContentView.swift) (Navigation shell), [`StudyPlanner/Domain/StudyPlan.swift`](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/Domain/StudyPlan.swift) (Plan records), [`StudyPlanner/UseCases/StudyPlanUseCases.swift`](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/UseCases/StudyPlanUseCases.swift) (Plan generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_app["App entry"]
  node_content["Navigation shell<br/>[ContentView.swift]"]
  node_list["Plan list"]
  node_details["Plan details"]
  node_approved["Approval result"]
end

subgraph group_planning["Plan creation"]
  node_new["Assignment entry"]
  node_review["Plan review"]
  node_vm["Planner coordinator"]
end

subgraph group_domain["Planning rules"]
  node_generation["Plan generation"]
  node_validation["Schedule approval"]
  node_session_ops["Session updates"]
  node_deletion["Plan deletion"]
  node_templates["Task templates<br/>[Assignment.swift]"]
  node_models["Plan records<br/>[StudyPlan.swift]"]
end

subgraph group_persistence["Saved plans"]
  node_repository["JSON repository"]
  node_store[("Documents JSON")]
end

node_student(("Student"))

node_student -->|"launches"| node_app
node_app -->|"shows"| node_content
node_content -->|"creates"| node_vm
node_content -->|"routes"| node_list
node_content -->|"routes"| node_new
node_content -->|"routes"| node_review
node_content -->|"routes"| node_approved
node_content -->|"routes"| node_details
node_student -->|"enters details"| node_new
node_new -->|"requests generation"| node_vm
node_vm -->|"executes"| node_generation
node_generation -->|"uses task weights"| node_templates
node_generation -->|"creates draft"| node_models
node_student -->|"sets schedule"| node_review
node_review -->|"requests approval"| node_vm
node_vm -->|"executes"| node_validation
node_validation -->|"validates and updates"| node_models
node_vm -->|"loads and saves"| node_repository
node_repository -->|"reads and writes JSON"| node_store
node_list -->|"browses plans"| node_vm
node_approved -->|"reads approval state"| node_vm
node_details -->|"requests plan actions"| node_vm
node_vm -->|"executes completion or reschedule"| node_session_ops
node_vm -->|"executes deletion"| node_deletion
node_session_ops -->|"updates sessions"| node_models
node_deletion -->|"filters plans"| node_models

click node_app "https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/StudyPlannerApp.swift"
click node_content "https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/ContentView.swift"
click node_list "https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/Views/StudyPlanListView.swift"
click node_details "https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/Views/StudyPlanDetailView.swift"
click node_approved "https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/Views/PlanApprovedView.swift"
click node_new "https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/Views/NewAssignmentView.swift"
click node_review "https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/Views/StudyPlanReviewView.swift"
click node_vm "https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/ViewModels/StudyPlannerViewModel.swift"
click node_generation "https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/UseCases/StudyPlanUseCases.swift"
click node_validation "https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/UseCases/StudyPlanUseCases.swift"
click node_session_ops "https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/UseCases/StudyPlanUseCases.swift"
click node_deletion "https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/UseCases/StudyPlanUseCases.swift"
click node_templates "https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/Domain/Assignment.swift"
click node_models "https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/Domain/StudyPlan.swift"
click node_repository "https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/Storage/StudyPlanRepository.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_content,node_list,node_details,node_approved toneBlue
class node_new,node_review,node_vm toneAmber
class node_generation,node_validation,node_session_ops,node_deletion,node_templates,node_models toneMint
class node_repository,node_store toneRose
class node_student toneIndigo
```

## Components

### App experience

- [App entry](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/StudyPlannerApp.swift): `StudyPlanner/StudyPlannerApp.swift`
- [Navigation shell](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/ContentView.swift): `StudyPlanner/ContentView.swift`
- [Plan list](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/Views/StudyPlanListView.swift): `StudyPlanner/Views/StudyPlanListView.swift`
- [Plan details](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/Views/StudyPlanDetailView.swift): `StudyPlanner/Views/StudyPlanDetailView.swift`
- [Approval result](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/Views/PlanApprovedView.swift): `StudyPlanner/Views/PlanApprovedView.swift`

### Plan creation

- [Assignment entry](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/Views/NewAssignmentView.swift): `StudyPlanner/Views/NewAssignmentView.swift`
- [Plan review](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/Views/StudyPlanReviewView.swift): `StudyPlanner/Views/StudyPlanReviewView.swift`
- [Planner coordinator](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/ViewModels/StudyPlannerViewModel.swift): `StudyPlanner/ViewModels/StudyPlannerViewModel.swift`

### Planning rules

- [Plan generation](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/UseCases/StudyPlanUseCases.swift): `StudyPlanner/UseCases/StudyPlanUseCases.swift`
- [Schedule approval](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/UseCases/StudyPlanUseCases.swift): `StudyPlanner/UseCases/StudyPlanUseCases.swift`
- [Session updates](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/UseCases/StudyPlanUseCases.swift): `StudyPlanner/UseCases/StudyPlanUseCases.swift`
- [Plan deletion](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/UseCases/StudyPlanUseCases.swift): `StudyPlanner/UseCases/StudyPlanUseCases.swift`
- [Task templates](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/Domain/Assignment.swift): `StudyPlanner/Domain/Assignment.swift`
- [Plan records](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/Domain/StudyPlan.swift): `StudyPlanner/Domain/StudyPlan.swift`

### Saved plans

- [JSON repository](https://github.com/giselezz/studyplanner_ios/blob/main/StudyPlanner/Storage/StudyPlanRepository.swift): `StudyPlanner/Storage/StudyPlanRepository.swift`
- **Documents JSON**

### Other components

- **Student**

## Connections

- Student → App entry: launches
- App entry → Navigation shell: shows
- Navigation shell → Planner coordinator: creates
- Navigation shell → Plan list: routes
- Navigation shell → Assignment entry: routes
- Navigation shell → Plan review: routes
- Navigation shell → Approval result: routes
- Navigation shell → Plan details: routes
- Student → Assignment entry: enters details
- Assignment entry → Planner coordinator: requests generation
- Planner coordinator → Plan generation: executes
- Plan generation → Task templates: uses task weights
- Plan generation → Plan records: creates draft
- Student → Plan review: sets schedule
- Plan review → Planner coordinator: requests approval
- Planner coordinator → Schedule approval: executes
- Schedule approval → Plan records: validates and updates
- Planner coordinator → JSON repository: loads and saves
- JSON repository → Documents JSON: reads and writes JSON
- Plan list → Planner coordinator: browses plans
- Approval result → Planner coordinator: reads approval state
- Plan details → Planner coordinator: requests plan actions
- Planner coordinator → Session updates: executes completion or reschedule
- Planner coordinator → Plan deletion: executes deletion
- Session updates → Plan records: updates sessions
- Plan deletion → Plan records: filters plans
