# tokkurumi/mrsumobile architecture

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

- Interactive diagram: https://gitdiagram.com/tokkurumi/mrsumobile
- Repository: https://github.com/tokkurumi/mrsumobile

## Overview

MRSUMobile is a .NET MAUI student app whose primary workflow is sign-in or token reuse, followed by a student shell for profile, timetable, attendance check-in, and academic performance. ViewModels call the shared cached service, which wraps authenticated HTTP access to MRSU; preferences persist tokens and the service caches selected results. The README also documents disciplines and theme support. The graph reflects sampled call paths and README capabilities; some view wiring and unsampled feature details are therefore shown only where documented.

Main entry points: [`MRSUMobile/Services/MrsuApiService.cs`](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/Services/MrsuApiService.cs) (MRSU HTTP API), [`MRSUMobile/Services/MrsuStorageService.cs`](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/Services/MrsuStorageService.cs) (Cached API service), [`MRSUMobile/MVVM/ViewModel/LoginViewModel.cs`](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/ViewModel/LoginViewModel.cs) (Login workflow), [`MRSUMobile/MVVM/ViewModel/AppShellViewModel.cs`](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/ViewModel/AppShellViewModel.cs) (Shell and check-in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Student experience"]
  node_login["Sign-in screen<br/>[LoginView.xaml.cs]"]
  node_shell["Student shell<br/>[AppShell.xaml.cs]"]
  node_profileview["Profile screen"]
  node_timetableview["Timetable screen"]
  node_performanceview["Performance screen"]
  node_disciplineview["Discipline screen"]
end

subgraph group_logic["MVVM workflows"]
  node_loginvm["Login workflow<br/>[LoginViewModel.cs]"]
  node_shellvm["Shell and check-in"]
  node_profilevm["Profile workflow"]
  node_timetablevm["Timetable workflow"]
  node_performancevm["Performance workflow"]
  node_disciplinevm["Discipline workflow"]
end

subgraph group_services["Data services"]
  node_apiinterface["API contract<br/>[IMrsuApiService.cs]"]
  node_storage["Cached API service"]
  node_api["MRSU HTTP API<br/>[MrsuApiService.cs]"]
  node_preferences[("Preference storage")]
  node_prefcontract["Preference contract"]
end

subgraph group_models["University data"]
  node_token["Authentication token<br/>[Token.cs]"]
  node_user["Student profile<br/>[User.cs]"]
  node_timetable["Schedule data"]
  node_semester["Semester data<br/>[StudentSemester.cs]"]
  node_rating["Rating plan"]
  node_attendance["Attendance result"]
end

node_student(("Student"))
node_mrsubackend["MRSU services"]

node_student -->|"signs in"| node_login
node_student -->|"uses"| node_shell
node_login -->|"binds"| node_loginvm
node_shell -->|"resolves"| node_shellvm
node_timetableview -->|"resolves"| node_timetablevm
node_performanceview -->|"resolves"| node_performancevm
node_disciplineview -->|"resolves"| node_disciplinevm
node_profileview -.->|"binds"| node_profilevm
node_loginvm -->|"authorizes"| node_storage
node_loginvm -->|"reads token"| node_prefcontract
node_shellvm -->|"loads profile"| node_storage
node_shellvm -->|"sends check-in"| node_storage
node_profilevm -->|"loads profile"| node_storage
node_timetablevm -->|"loads schedule"| node_storage
node_performancevm -->|"loads semester"| node_storage
node_disciplinevm -->|"loads rating"| node_storage
node_storage -->|"delegates"| node_api
node_api -->|"HTTP requests"| node_mrsubackend
node_api -->|"implements"| node_apiinterface
node_storage -->|"stores tokens"| node_prefcontract
node_prefcontract -->|"implemented by"| node_preferences
node_preferences -->|"serializes"| node_token
node_api -->|"parses token"| node_token
node_api -->|"parses profile"| node_user
node_api -->|"parses schedule"| node_timetable
node_api -->|"parses semester"| node_semester
node_api -->|"parses rating"| node_rating
node_api -->|"parses check-in"| node_attendance
node_api -->|"OAuth requests"| node_mrsubackend

click node_login "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/View/LoginView.xaml.cs"
click node_shell "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/AppShell.xaml.cs"
click node_profileview "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/View/ProfileView.xaml.cs"
click node_timetableview "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/View/TimeTableView.xaml.cs"
click node_performanceview "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/View/AcademicPerformanceView.xaml.cs"
click node_disciplineview "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/View/DisciplinePerfomaceView.xaml.cs"
click node_loginvm "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/ViewModel/LoginViewModel.cs"
click node_shellvm "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/ViewModel/AppShellViewModel.cs"
click node_profilevm "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/ViewModel/ProfileViewModel.cs"
click node_timetablevm "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/ViewModel/TimeTableViewModel.cs"
click node_performancevm "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/ViewModel/AcademicPerformanceViewModel.cs"
click node_disciplinevm "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/ViewModel/DisciplinePerfomaceViewModel.cs"
click node_apiinterface "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/Services/IMrsuApiService.cs"
click node_storage "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/Services/MrsuStorageService.cs"
click node_api "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/Services/MrsuApiService.cs"
click node_preferences "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/Services/PreferenceStorageService.cs"
click node_prefcontract "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/Services/IPreferenceStorageService.cs"
click node_token "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/Entities/Token.cs"
click node_user "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/Model/User.cs"
click node_timetable "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/Model/StudentTimeTable.cs"
click node_semester "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/Model/StudentSemester.cs"
click node_rating "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/Model/StudentRatingPlan.cs"
click node_attendance "https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/Model/StudentAttendanceCode.cs"

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_login,node_shell,node_profileview,node_timetableview,node_performanceview,node_disciplineview toneBlue
class node_loginvm,node_shellvm,node_profilevm,node_timetablevm,node_performancevm,node_disciplinevm toneAmber
class node_apiinterface,node_storage,node_api,node_preferences,node_prefcontract toneMint
class node_token,node_user,node_timetable,node_semester,node_rating,node_attendance toneRose
class node_student,node_mrsubackend toneIndigo
```

## Components

### Student experience

- [Sign-in screen](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/View/LoginView.xaml.cs): `MRSUMobile/MVVM/View/LoginView.xaml.cs`
- [Student shell](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/AppShell.xaml.cs): `MRSUMobile/AppShell.xaml.cs`
- [Profile screen](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/View/ProfileView.xaml.cs): `MRSUMobile/MVVM/View/ProfileView.xaml.cs`
- [Timetable screen](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/View/TimeTableView.xaml.cs): `MRSUMobile/MVVM/View/TimeTableView.xaml.cs`
- [Performance screen](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/View/AcademicPerformanceView.xaml.cs): `MRSUMobile/MVVM/View/AcademicPerformanceView.xaml.cs`
- [Discipline screen](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/View/DisciplinePerfomaceView.xaml.cs): `MRSUMobile/MVVM/View/DisciplinePerfomaceView.xaml.cs`

### MVVM workflows

- [Login workflow](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/ViewModel/LoginViewModel.cs): `MRSUMobile/MVVM/ViewModel/LoginViewModel.cs`
- [Shell and check-in](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/ViewModel/AppShellViewModel.cs): `MRSUMobile/MVVM/ViewModel/AppShellViewModel.cs`
- [Profile workflow](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/ViewModel/ProfileViewModel.cs): `MRSUMobile/MVVM/ViewModel/ProfileViewModel.cs`
- [Timetable workflow](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/ViewModel/TimeTableViewModel.cs): `MRSUMobile/MVVM/ViewModel/TimeTableViewModel.cs`
- [Performance workflow](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/ViewModel/AcademicPerformanceViewModel.cs): `MRSUMobile/MVVM/ViewModel/AcademicPerformanceViewModel.cs`
- [Discipline workflow](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/ViewModel/DisciplinePerfomaceViewModel.cs): `MRSUMobile/MVVM/ViewModel/DisciplinePerfomaceViewModel.cs`

### Data services

- [API contract](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/Services/IMrsuApiService.cs): `MRSUMobile/Services/IMrsuApiService.cs`
- [Cached API service](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/Services/MrsuStorageService.cs): `MRSUMobile/Services/MrsuStorageService.cs`
- [MRSU HTTP API](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/Services/MrsuApiService.cs): `MRSUMobile/Services/MrsuApiService.cs`
- [Preference storage](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/Services/PreferenceStorageService.cs): `MRSUMobile/Services/PreferenceStorageService.cs`
- [Preference contract](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/Services/IPreferenceStorageService.cs): `MRSUMobile/Services/IPreferenceStorageService.cs`

### University data

- [Authentication token](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/Entities/Token.cs): `MRSUMobile/Entities/Token.cs`
- [Student profile](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/Model/User.cs): `MRSUMobile/MVVM/Model/User.cs`
- [Schedule data](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/Model/StudentTimeTable.cs): `MRSUMobile/MVVM/Model/StudentTimeTable.cs`
- [Semester data](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/Model/StudentSemester.cs): `MRSUMobile/MVVM/Model/StudentSemester.cs`
- [Rating plan](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/Model/StudentRatingPlan.cs): `MRSUMobile/MVVM/Model/StudentRatingPlan.cs`
- [Attendance result](https://github.com/tokkurumi/mrsumobile/blob/master/MRSUMobile/MVVM/Model/StudentAttendanceCode.cs): `MRSUMobile/MVVM/Model/StudentAttendanceCode.cs`

### Other components

- **Student**
- **MRSU services**

## Connections

- Student → Sign-in screen: signs in
- Student → Student shell: uses
- Sign-in screen → Login workflow: binds (evidence: `MRSUMobile/MVVM/ViewModel/LoginViewModel.cs`)
- Student shell → Shell and check-in: resolves (evidence: `MRSUMobile/AppShell.xaml.cs`)
- Timetable screen → Timetable workflow: resolves (evidence: `MRSUMobile/MVVM/View/TimeTableView.xaml.cs`)
- Performance screen → Performance workflow: resolves (evidence: `MRSUMobile/MVVM/View/AcademicPerformanceView.xaml.cs`)
- Discipline screen → Discipline workflow: resolves (evidence: `MRSUMobile/MVVM/View/DisciplinePerfomaceView.xaml.cs`)
- Profile screen → Profile workflow: binds
- Login workflow → Cached API service: authorizes (evidence: `MRSUMobile/MVVM/ViewModel/LoginViewModel.cs`)
- Login workflow → Preference contract: reads token (evidence: `MRSUMobile/MVVM/ViewModel/LoginViewModel.cs`)
- Shell and check-in → Cached API service: loads profile (evidence: `MRSUMobile/MVVM/ViewModel/AppShellViewModel.cs`)
- Shell and check-in → Cached API service: sends check-in (evidence: `MRSUMobile/MVVM/ViewModel/AppShellViewModel.cs`)
- Profile workflow → Cached API service: loads profile (evidence: `MRSUMobile/MVVM/ViewModel/ProfileViewModel.cs`)
- Timetable workflow → Cached API service: loads schedule (evidence: `MRSUMobile/MVVM/ViewModel/TimeTableViewModel.cs`)
- Performance workflow → Cached API service: loads semester (evidence: `MRSUMobile/MVVM/ViewModel/AcademicPerformanceViewModel.cs`)
- Discipline workflow → Cached API service: loads rating (evidence: `MRSUMobile/MVVM/ViewModel/DisciplinePerfomaceViewModel.cs`)
- Cached API service → MRSU HTTP API: delegates (evidence: `MRSUMobile/Services/MrsuStorageService.cs`)
- MRSU HTTP API → MRSU services: HTTP requests (evidence: `MRSUMobile/Services/MrsuApiService.cs`)
- MRSU HTTP API → API contract: implements (evidence: `MRSUMobile/Services/MrsuApiService.cs`)
- Cached API service → Preference contract: stores tokens (evidence: `MRSUMobile/Services/MrsuStorageService.cs`)
- Preference contract → Preference storage: implemented by (evidence: `MRSUMobile/Services/PreferenceStorageService.cs`)
- Preference storage → Authentication token: serializes (evidence: `MRSUMobile/Services/PreferenceStorageService.cs`)
- MRSU HTTP API → Authentication token: parses token (evidence: `MRSUMobile/Services/MrsuApiService.cs`)
- MRSU HTTP API → Student profile: parses profile (evidence: `MRSUMobile/Services/MrsuApiService.cs`)
- MRSU HTTP API → Schedule data: parses schedule (evidence: `MRSUMobile/Services/MrsuApiService.cs`)
- MRSU HTTP API → Semester data: parses semester (evidence: `MRSUMobile/Services/MrsuApiService.cs`)
- MRSU HTTP API → Rating plan: parses rating (evidence: `MRSUMobile/Services/MrsuApiService.cs`)
- MRSU HTTP API → Attendance result: parses check-in (evidence: `MRSUMobile/Services/MrsuApiService.cs`)
- MRSU HTTP API → MRSU services: OAuth requests (evidence: `MRSUMobile/Services/MrsuApiService.cs`)
