# restarhalf/chrnova architecture

> Architecture diagram of the GitHub repository restarhalf/chrnova, 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/restarhalf/chrnova
- Repository: https://github.com/restarhalf/chrnova
- Video tour (about a minute): https://gitdiagram.com/restarhalf/chrnova/video

## Overview

Chrnova is a Kotlin Multiplatform campus timetable app whose core flow is viewing locally stored schedules and syncing academic records from campus systems. The graph includes the documented exam, grades, PE, announcements, evaluation, paper-sharing, course-selection, reminders, widgets, and personalization capabilities. README documentation supports the broad layers and feature branches; sampled source confirms local Room storage, PE network behavior, Android course-selection calls, and reminder scheduling. Several feature-to-screen links are documented capabilities rather than inspected call sites.

Main entry points: [`composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/ui`](https://github.com/restarhalf/chrnova/tree/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/ui) (Feature screens), [`composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/repository/RoomCourseRepository.kt`](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/repository/RoomCourseRepository.kt) (Room repositories), [`composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/domain/usecase/CourseSelectionUseCase.kt`](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/domain/usecase/CourseSelectionUseCase.kt) (Course selection), [`composeApp/src/androidMain/kotlin/restarhalf/stellar/schedule/CourseSelectionService.kt`](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/androidMain/kotlin/restarhalf/stellar/schedule/CourseSelectionService.kt) (Background selector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App experience"]
  node_app["Compose app<br/>[AppRoot.kt]"]
  node_screens["Feature screens"]
  node_personalization["Settings and background"]
end

subgraph group_academic["Academic data"]
  node_schedule["Schedule logic"]
  node_sync["Academic sync<br/>[RunSyncUseCase.kt]"]
  node_academicport["Academic adapter"]
  node_timetableport["Timetable adapter"]
  node_examsgrades["Exams and grades"]
  node_jwxt["JWXT gateway<br/>[JwxtGateway.kt]"]
end

subgraph group_services["Campus services"]
  node_campus{{"Campus systems"}}
  node_pe["PE services<br/>[PEClient.kt]"]
  node_announcements["Announcements<br/>[AnnouncementApi.kt]"]
  node_evaluation["Course evaluation"]
  node_papers["Paper sharing<br/>[PapersApi.kt]"]
  node_selection["Course selection"]
end

subgraph group_platform["Platform features"]
  node_selectionservice["Background selector"]
  node_reminders["Reminder scheduling"]
  node_widgets["Schedule widgets<br/>[ScheduleWidgets.kt]"]
  node_log["App logging<br/>[AppLogger.kt]"]
end

subgraph group_storage["Local state"]
  node_localdb[("Room database<br/>[AppDatabase.kt]")]
  node_repositories["Room repositories"]
  node_settingsstore[("Settings store<br/>[MmkvSettings.kt]")]
end

node_student(("Student"))

node_student -->|"opens"| node_app
node_app -->|"renders"| node_screens
node_screens -->|"requests schedule"| node_schedule
node_schedule -->|"loads timetable"| node_timetableport
node_timetableport -->|"reads and writes"| node_repositories
node_repositories -->|"queries"| node_localdb
node_screens -->|"starts sync"| node_sync
node_sync -->|"requests records"| node_academicport
node_academicport -->|"uses gateway"| node_jwxt
node_jwxt -->|"fetches records"| node_campus
node_examsgrades -->|"reads and writes"| node_repositories
node_screens -->|"views records"| node_examsgrades
node_screens -->|"requests PE data"| node_pe
node_pe -->|"sends requests"| node_campus
node_screens -->|"loads notices"| node_announcements
node_announcements -->|"fetches notices"| node_campus
node_screens -->|"submits evaluations"| node_evaluation
node_evaluation -->|"proxies requests"| node_campus
node_screens -->|"manages papers"| node_papers
node_papers -->|"uploads and downloads"| node_campus
node_screens -->|"starts selection"| node_selection
node_selectionservice -->|"submits attempts"| node_selection
node_selection -->|"requests enrollment"| node_campus
node_screens -->|"configures reminders"| node_reminders
node_reminders -->|"loads schedule data"| node_repositories
node_widgets -->|"loads timetable"| node_repositories
node_screens -->|"updates preferences"| node_personalization
node_personalization -->|"persists settings"| node_settingsstore
node_selectionservice -->|"records events"| node_log

click node_app "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/AppRoot.kt"
click node_screens "https://github.com/restarhalf/chrnova/tree/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/ui"
click node_schedule "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/domain/usecase/BuildScheduleUiStateUseCase.kt"
click node_sync "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/domain/usecase/RunSyncUseCase.kt"
click node_academicport "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/impl/AcademicPortImpl.kt"
click node_timetableport "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/impl/TimetablePortImpl.kt"
click node_examsgrades "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/domain/usecase/FetchExaminationsUseCase.kt"
click node_jwxt "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/remote/JwxtGateway.kt"
click node_pe "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/remote/PEClient.kt"
click node_announcements "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/remote/AnnouncementApi.kt"
click node_evaluation "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/remote/CourseEvaluationApi.kt"
click node_papers "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/remote/PapersApi.kt"
click node_selection "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/domain/usecase/CourseSelectionUseCase.kt"
click node_selectionservice "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/androidMain/kotlin/restarhalf/stellar/schedule/CourseSelectionService.kt"
click node_reminders "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/androidMain/kotlin/restarhalf/stellar/schedule/reminder/ReminderRescheduleWorker.kt"
click node_widgets "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/androidMain/kotlin/restarhalf/stellar/schedule/widget/ScheduleWidgets.kt"
click node_personalization "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/impl/SettingsPortImpl.kt"
click node_localdb "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/local/AppDatabase.kt"
click node_repositories "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/repository/RoomCourseRepository.kt"
click node_settingsstore "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/local/mmkv/MmkvSettings.kt"
click node_log "https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/core/log/AppLogger.kt"

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_screens,node_personalization toneBlue
class node_schedule,node_sync,node_academicport,node_timetableport,node_examsgrades,node_jwxt toneAmber
class node_campus,node_pe,node_announcements,node_evaluation,node_papers,node_selection toneMint
class node_selectionservice,node_reminders,node_widgets,node_log toneRose
class node_localdb,node_repositories,node_settingsstore,node_student toneIndigo
```

## Components

### App experience

- [Compose app](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/AppRoot.kt): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/AppRoot.kt`
- [Feature screens](https://github.com/restarhalf/chrnova/tree/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/ui): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/ui`
- [Settings and background](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/impl/SettingsPortImpl.kt): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/impl/SettingsPortImpl.kt`

### Academic data

- [Schedule logic](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/domain/usecase/BuildScheduleUiStateUseCase.kt): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/domain/usecase/BuildScheduleUiStateUseCase.kt`
- [Academic sync](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/domain/usecase/RunSyncUseCase.kt): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/domain/usecase/RunSyncUseCase.kt`
- [Academic adapter](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/impl/AcademicPortImpl.kt): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/impl/AcademicPortImpl.kt`
- [Timetable adapter](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/impl/TimetablePortImpl.kt): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/impl/TimetablePortImpl.kt`
- [Exams and grades](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/domain/usecase/FetchExaminationsUseCase.kt): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/domain/usecase/FetchExaminationsUseCase.kt`
- [JWXT gateway](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/remote/JwxtGateway.kt): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/remote/JwxtGateway.kt`

### Campus services

- **Campus systems**
- [PE services](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/remote/PEClient.kt): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/remote/PEClient.kt`
- [Announcements](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/remote/AnnouncementApi.kt): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/remote/AnnouncementApi.kt`
- [Course evaluation](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/remote/CourseEvaluationApi.kt): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/remote/CourseEvaluationApi.kt`
- [Paper sharing](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/remote/PapersApi.kt): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/remote/PapersApi.kt`
- [Course selection](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/domain/usecase/CourseSelectionUseCase.kt): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/domain/usecase/CourseSelectionUseCase.kt`

### Platform features

- [Background selector](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/androidMain/kotlin/restarhalf/stellar/schedule/CourseSelectionService.kt): `composeApp/src/androidMain/kotlin/restarhalf/stellar/schedule/CourseSelectionService.kt`
- [Reminder scheduling](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/androidMain/kotlin/restarhalf/stellar/schedule/reminder/ReminderRescheduleWorker.kt): `composeApp/src/androidMain/kotlin/restarhalf/stellar/schedule/reminder/ReminderRescheduleWorker.kt`
- [Schedule widgets](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/androidMain/kotlin/restarhalf/stellar/schedule/widget/ScheduleWidgets.kt): `composeApp/src/androidMain/kotlin/restarhalf/stellar/schedule/widget/ScheduleWidgets.kt`
- [App logging](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/core/log/AppLogger.kt): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/core/log/AppLogger.kt`

### Local state

- [Room database](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/local/AppDatabase.kt): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/local/AppDatabase.kt`
- [Room repositories](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/repository/RoomCourseRepository.kt): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/repository/RoomCourseRepository.kt`
- [Settings store](https://github.com/restarhalf/chrnova/blob/main/composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/local/mmkv/MmkvSettings.kt): `composeApp/src/commonMain/kotlin/restarhalf/stellar/schedule/data/local/mmkv/MmkvSettings.kt`

### Other components

- **Student**

## Connections

- Student → Compose app: opens
- Compose app → Feature screens: renders
- Feature screens → Schedule logic: requests schedule
- Schedule logic → Timetable adapter: loads timetable
- Timetable adapter → Room repositories: reads and writes
- Room repositories → Room database: queries
- Feature screens → Academic sync: starts sync
- Academic sync → Academic adapter: requests records
- Academic adapter → JWXT gateway: uses gateway
- JWXT gateway → Campus systems: fetches records
- Exams and grades → Room repositories: reads and writes
- Feature screens → Exams and grades: views records
- Feature screens → PE services: requests PE data
- PE services → Campus systems: sends requests
- Feature screens → Announcements: loads notices
- Announcements → Campus systems: fetches notices
- Feature screens → Course evaluation: submits evaluations
- Course evaluation → Campus systems: proxies requests
- Feature screens → Paper sharing: manages papers
- Paper sharing → Campus systems: uploads and downloads
- Feature screens → Course selection: starts selection
- Background selector → Course selection: submits attempts
- Course selection → Campus systems: requests enrollment
- Feature screens → Reminder scheduling: configures reminders
- Reminder scheduling → Room repositories: loads schedule data
- Schedule widgets → Room repositories: loads timetable
- Feature screens → Settings and background: updates preferences
- Settings and background → Settings store: persists settings
- Background selector → App logging: records events
