# yasunosubaru/ham-ios architecture

> Architecture diagram of the GitHub repository yasunosubaru/ham-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/yasunosubaru/ham-ios
- Repository: https://github.com/yasunosubaru/ham-ios

## Overview

Ham is a standalone React Native campus app. Students enter through the app screens; education flows fetch and parse course schedules and scores, while grade entry reads replies from education pages without submitting grades. Separate capabilities cover GPA calculation, CAS authentication, library booking, campus weather, and OTA updates. The README documents these capabilities, but sampled source only verifies selected flows, so uncertain internal wiring is omitted.

Main entry points: [`src/app/HamApp.tsx`](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/app/HamApp.tsx) (Ham app), [`src/app/GradeEntryScreen.tsx`](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/app/GradeEntryScreen.tsx) (Grade entry), [`src/business/education/course/index.ts`](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/education/course/index.ts) (Course retrieval), [`src/business/education/score/index.ts`](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/education/score/index.ts) (Score retrieval)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App experience"]
  node_ham["Ham app<br/>[HamApp.tsx]"]
  node_course_screen["Course schedule<br/>[CourseScreen.tsx]"]
  node_score_screen["Score query<br/>[ScoreScreen.tsx]"]
  node_grade_screen["Grade entry"]
  node_gpa_screen["GPA calculator"]
  node_library_screen["Library<br/>[LibraryScreen.tsx]"]
  node_weather_screen["Campus weather<br/>[WeatherScreen.tsx]"]
  node_cas_ui["CAS login UI"]
end

subgraph group_education["Education services"]
  node_edu_page["Education page view"]
  node_course_logic["Course retrieval<br/>[index.ts]"]
  node_course_api["Course API<br/>[api.ts]"]
  node_course_parser["Course parser<br/>[parser.ts]"]
  node_score_logic["Score retrieval<br/>[index.ts]"]
  node_score_api["Score API<br/>[api.ts]"]
  node_score_parser["Score parser<br/>[parser.ts]"]
  node_scorecalc["Score calculator<br/>[fetch.ts]"]
  node_cas_logic["CAS authentication<br/>[index.ts]"]
end

subgraph group_campus["Campus services"]
  node_library_logic["Library booking<br/>[index.ts]"]
  node_weather_logic["Weather retrieval<br/>[index.ts]"]
  node_weather_parser["Forecast parser<br/>[parser.ts]"]
end

subgraph group_platform["Native platform"]
  node_native_edu["Education native bridge"]
  node_ota["OTA updates"]
end

node_student(("Student"))
node_university{{"University services"}}
node_forecast{{"Forecast API"}}

node_student -->|"uses"| node_ham
node_ham -->|"opens"| node_course_screen
node_ham -->|"opens"| node_score_screen
node_ham -->|"opens"| node_grade_screen
node_ham -->|"opens"| node_gpa_screen
node_ham -->|"opens"| node_library_screen
node_ham -->|"opens"| node_weather_screen
node_course_screen -->|"requests courses"| node_course_logic
node_course_logic -->|"fetches"| node_course_api
node_course_logic -->|"parses reply"| node_course_parser
node_course_api -->|"requests schedule"| node_university
node_score_screen -->|"requests scores"| node_score_logic
node_score_logic -->|"fetches"| node_score_api
node_score_logic -->|"parses reply"| node_score_parser
node_score_api -->|"requests scores"| node_university
node_grade_screen -->|"reauthenticates"| node_cas_ui
node_grade_screen -->|"reads page replies"| node_edu_page
node_edu_page -->|"loads education page"| node_university
node_grade_screen -->|"checks CAS session"| node_native_edu
node_gpa_screen -->|"calculates"| node_scorecalc
node_library_screen -->|"books resources"| node_library_logic
node_library_logic -->|"calls service"| node_university
node_weather_screen -->|"requests forecast"| node_weather_logic
node_weather_logic -->|"fetches forecast"| node_forecast
node_weather_logic -->|"parses response"| node_weather_parser
node_cas_ui -->|"starts login"| node_cas_logic
node_cas_logic -->|"authenticates"| node_university
node_ham -.->|"receives updates"| node_ota

click node_ham "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/app/HamApp.tsx"
click node_course_screen "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/app/CourseScreen.tsx"
click node_score_screen "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/app/ScoreScreen.tsx"
click node_grade_screen "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/app/GradeEntryScreen.tsx"
click node_gpa_screen "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/app/GpaCalculatorScreen.tsx"
click node_library_screen "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/app/LibraryScreen.tsx"
click node_weather_screen "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/app/WeatherScreen.tsx"
click node_cas_ui "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/components/cas/CasMobileLoginView.tsx"
click node_edu_page "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/components/education/EducationPageView.tsx"
click node_course_logic "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/education/course/index.ts"
click node_course_api "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/education/course/api.ts"
click node_course_parser "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/education/course/parser.ts"
click node_score_logic "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/education/score/index.ts"
click node_score_api "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/education/score/api.ts"
click node_score_parser "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/education/score/parser.ts"
click node_scorecalc "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/education/scorecalc/fetch.ts"
click node_cas_logic "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/cas/index.ts"
click node_library_logic "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/library/index.ts"
click node_weather_logic "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/weather/index.ts"
click node_weather_parser "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/weather/parser.ts"
click node_native_edu "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/modules/NativeEducationModule.ts"
click node_ota "https://github.com/yasunosubaru/ham-ios/blob/standalone-app/hot-updater.config.ts"

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_ham,node_course_screen,node_score_screen,node_grade_screen,node_gpa_screen,node_library_screen,node_weather_screen,node_cas_ui toneBlue
class node_edu_page,node_course_logic,node_course_api,node_course_parser,node_score_logic,node_score_api,node_score_parser,node_scorecalc,node_cas_logic toneAmber
class node_library_logic,node_weather_logic,node_weather_parser,node_forecast toneMint
class node_native_edu,node_ota toneRose
class node_student,node_university toneIndigo
```

## Components

### App experience

- [Ham app](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/app/HamApp.tsx): `src/app/HamApp.tsx`
- [Course schedule](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/app/CourseScreen.tsx): `src/app/CourseScreen.tsx`
- [Score query](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/app/ScoreScreen.tsx): `src/app/ScoreScreen.tsx`
- [Grade entry](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/app/GradeEntryScreen.tsx): `src/app/GradeEntryScreen.tsx`
- [GPA calculator](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/app/GpaCalculatorScreen.tsx): `src/app/GpaCalculatorScreen.tsx`
- [Library](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/app/LibraryScreen.tsx): `src/app/LibraryScreen.tsx`
- [Campus weather](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/app/WeatherScreen.tsx): `src/app/WeatherScreen.tsx`
- [CAS login UI](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/components/cas/CasMobileLoginView.tsx): `src/components/cas/CasMobileLoginView.tsx`

### Education services

- [Education page view](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/components/education/EducationPageView.tsx): `src/components/education/EducationPageView.tsx`
- [Course retrieval](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/education/course/index.ts): `src/business/education/course/index.ts`
- [Course API](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/education/course/api.ts): `src/business/education/course/api.ts`
- [Course parser](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/education/course/parser.ts): `src/business/education/course/parser.ts`
- [Score retrieval](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/education/score/index.ts): `src/business/education/score/index.ts`
- [Score API](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/education/score/api.ts): `src/business/education/score/api.ts`
- [Score parser](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/education/score/parser.ts): `src/business/education/score/parser.ts`
- [Score calculator](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/education/scorecalc/fetch.ts): `src/business/education/scorecalc/fetch.ts`
- [CAS authentication](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/cas/index.ts): `src/business/cas/index.ts`

### Campus services

- [Library booking](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/library/index.ts): `src/business/library/index.ts`
- [Weather retrieval](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/weather/index.ts): `src/business/weather/index.ts`
- [Forecast parser](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/business/weather/parser.ts): `src/business/weather/parser.ts`

### Native platform

- [Education native bridge](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/src/modules/NativeEducationModule.ts): `src/modules/NativeEducationModule.ts`
- [OTA updates](https://github.com/yasunosubaru/ham-ios/blob/standalone-app/hot-updater.config.ts): `hot-updater.config.ts`

### Other components

- **Student**
- **University services**
- **Forecast API**

## Connections

- Student → Ham app: uses
- Ham app → Course schedule: opens
- Ham app → Score query: opens
- Ham app → Grade entry: opens
- Ham app → GPA calculator: opens
- Ham app → Library: opens
- Ham app → Campus weather: opens
- Course schedule → Course retrieval: requests courses
- Course retrieval → Course API: fetches
- Course retrieval → Course parser: parses reply
- Course API → University services: requests schedule
- Score query → Score retrieval: requests scores
- Score retrieval → Score API: fetches
- Score retrieval → Score parser: parses reply
- Score API → University services: requests scores
- Grade entry → CAS login UI: reauthenticates
- Grade entry → Education page view: reads page replies
- Education page view → University services: loads education page
- Grade entry → Education native bridge: checks CAS session
- GPA calculator → Score calculator: calculates
- Library → Library booking: books resources
- Library booking → University services: calls service
- Campus weather → Weather retrieval: requests forecast
- Weather retrieval → Forecast API: fetches forecast
- Weather retrieval → Forecast parser: parses response
- CAS login UI → CAS authentication: starts login
- CAS authentication → University services: authenticates
- Ham app → OTA updates: receives updates
