# tomhula/jecnamobile architecture

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

- Interactive diagram: https://gitdiagram.com/tomhula/jecnamobile
- Repository: https://github.com/tomhula/jecnamobile

## Overview

Ječná Mobile is an unofficial Android client for SPŠE Ječná students to read school-portal information and use related services. The principal journey enters through MainActivity, which selects login, welcome, or the main app; the main app exposes distinct school-data screens. Feature directories also cover absences, documents, substitutions, rooms, student profiles and certificates, alongside the README’s grades, timetable, canteen, attendance, news and teacher capabilities. The sampled source confirms authentication persistence, timetable retrieval and caching, and grade-change notifications. Other feature wiring and integrations are represented conservatively from the README and tree.

Main entry points: [`app/src/main/kotlin/me/tomasan7/jecnamobile/navigation/MainNavDisplay.kt`](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/navigation/MainNavDisplay.kt) (App navigation), [`app/src/main/kotlin/me/tomasan7/jecnamobile/MainActivity.kt`](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/MainActivity.kt) (App activity), [`app/src/main/kotlin/me/tomasan7/jecnamobile/timetable/TimetableRepositoryImpl.kt`](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/timetable/TimetableRepositoryImpl.kt) (Timetable repository), [`app/src/main/kotlin/me/tomasan7/jecnamobile/gradenotifications/GradeCheckerWorker.kt`](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/gradenotifications/GradeCheckerWorker.kt) (Grade checker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App entry"]
  node_activity["App activity<br/>[MainActivity.kt]"]
  node_login["Login screen<br/>[LoginScreen.kt]"]
  node_main["Main screen<br/>[MainScreen.kt]"]
  node_navigation["App navigation<br/>[MainNavDisplay.kt]"]
end

subgraph group_school["School features"]
  node_grades["Grades and averages<br/>[GradesSubScreen.kt]"]
  node_timetable["Timetable and substitutions"]
  node_canteen["Canteen and exchange"]
  node_attendance["Attendance"]
  node_news["News<br/>[NewsSubScreen.kt]"]
  node_teachers["Teachers"]
  node_absences["Absences"]
  node_documents["Documents"]
  node_rooms["Rooms<br/>[RoomsSubScreen.kt]"]
  node_profile["Student profile"]
  node_certificates["Certificates"]
end

subgraph group_data["Data services"]
  node_auth[("Auth storage")]
  node_cache[("File cache<br/>[CacheRepository.kt]")]
  node_timetable_repo["Timetable repository"]
end

subgraph group_alerts["Notifications"]
  node_grade_worker["Grade checker"]
end

node_student(("Student"))
node_portal{{"Ječná portal API"}}
node_substitutions_service{{"Substitution service"}}
node_android_notifications(("Android notifications"))

node_student -->|"opens"| node_activity
node_activity -->|"checks credentials"| node_auth
node_activity -->|"shows login"| node_login
node_activity -->|"shows app"| node_main
node_student -->|"uses"| node_main
node_main -->|"hosts navigation"| node_navigation
node_navigation -->|"routes to"| node_grades
node_navigation -->|"routes to"| node_timetable
node_navigation -->|"routes to"| node_canteen
node_navigation -->|"routes to"| node_attendance
node_navigation -->|"routes to"| node_news
node_navigation -->|"routes to"| node_teachers
node_navigation -->|"routes to"| node_absences
node_navigation -->|"routes to"| node_documents
node_navigation -->|"routes to"| node_rooms
node_navigation -->|"routes to"| node_profile
node_navigation -->|"routes to"| node_certificates
node_timetable_repo -->|"fetches timetable"| node_portal
node_timetable_repo -->|"fetches schedule"| node_substitutions_service
node_timetable_repo -->|"cached by"| node_cache
node_grade_worker -->|"refreshes grades"| node_cache
node_grade_worker -->|"checks grades"| node_portal
node_grade_worker -->|"posts alerts"| node_android_notifications

click node_activity "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/MainActivity.kt"
click node_login "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/login/LoginScreen.kt"
click node_auth "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/login/ObfuscatedSharedPreferencesAuthRepository.kt"
click node_main "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/mainscreen/MainScreen.kt"
click node_navigation "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/navigation/MainNavDisplay.kt"
click node_grades "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/grades/GradesSubScreen.kt"
click node_timetable "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/timetable/TimetableSubScreen.kt"
click node_canteen "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/canteen/CanteenSubScreen.kt"
click node_attendance "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/attendances/AttendancesSubScreen.kt"
click node_news "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/news/NewsSubScreen.kt"
click node_teachers "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/teachers/TeachersSubScreen.kt"
click node_absences "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/absence/AbsencesSubScreen.kt"
click node_documents "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/documents/DocumentsSubScreen.kt"
click node_rooms "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/rooms/RoomsSubScreen.kt"
click node_profile "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/student/StudentProfileScreen.kt"
click node_certificates "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/student/cert/StudentCertificatesScreen.kt"
click node_cache "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/caching/CacheRepository.kt"
click node_timetable_repo "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/timetable/TimetableRepositoryImpl.kt"
click node_grade_worker "https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/gradenotifications/GradeCheckerWorker.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_activity,node_login,node_main,node_navigation toneBlue
class node_grades,node_timetable,node_canteen,node_attendance,node_news,node_teachers,node_absences,node_documents,node_rooms,node_profile,node_certificates toneAmber
class node_auth,node_cache,node_timetable_repo,node_portal toneMint
class node_grade_worker toneRose
class node_student,node_substitutions_service,node_android_notifications toneIndigo
```

## Components

### App entry

- [App activity](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/MainActivity.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/MainActivity.kt`
- [Login screen](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/login/LoginScreen.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/login/LoginScreen.kt`
- [Main screen](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/mainscreen/MainScreen.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/mainscreen/MainScreen.kt`
- [App navigation](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/navigation/MainNavDisplay.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/navigation/MainNavDisplay.kt`

### School features

- [Grades and averages](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/grades/GradesSubScreen.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/grades/GradesSubScreen.kt`
- [Timetable and substitutions](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/timetable/TimetableSubScreen.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/timetable/TimetableSubScreen.kt`
- [Canteen and exchange](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/canteen/CanteenSubScreen.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/canteen/CanteenSubScreen.kt`
- [Attendance](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/attendances/AttendancesSubScreen.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/attendances/AttendancesSubScreen.kt`
- [News](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/news/NewsSubScreen.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/news/NewsSubScreen.kt`
- [Teachers](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/teachers/TeachersSubScreen.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/teachers/TeachersSubScreen.kt`
- [Absences](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/absence/AbsencesSubScreen.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/absence/AbsencesSubScreen.kt`
- [Documents](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/documents/DocumentsSubScreen.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/documents/DocumentsSubScreen.kt`
- [Rooms](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/rooms/RoomsSubScreen.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/rooms/RoomsSubScreen.kt`
- [Student profile](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/student/StudentProfileScreen.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/student/StudentProfileScreen.kt`
- [Certificates](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/student/cert/StudentCertificatesScreen.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/student/cert/StudentCertificatesScreen.kt`

### Data services

- [Auth storage](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/login/ObfuscatedSharedPreferencesAuthRepository.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/login/ObfuscatedSharedPreferencesAuthRepository.kt`
- [File cache](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/caching/CacheRepository.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/caching/CacheRepository.kt`
- [Timetable repository](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/timetable/TimetableRepositoryImpl.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/timetable/TimetableRepositoryImpl.kt`

### Notifications

- [Grade checker](https://github.com/tomhula/jecnamobile/blob/main/app/src/main/kotlin/me/tomasan7/jecnamobile/gradenotifications/GradeCheckerWorker.kt): `app/src/main/kotlin/me/tomasan7/jecnamobile/gradenotifications/GradeCheckerWorker.kt`

### Other components

- **Student**
- **Ječná portal API**
- **Substitution service**
- **Android notifications**

## Connections

- Student → App activity: opens
- App activity → Auth storage: checks credentials
- App activity → Login screen: shows login
- App activity → Main screen: shows app
- Student → Main screen: uses
- Main screen → App navigation: hosts navigation
- App navigation → Grades and averages: routes to
- App navigation → Timetable and substitutions: routes to
- App navigation → Canteen and exchange: routes to
- App navigation → Attendance: routes to
- App navigation → News: routes to
- App navigation → Teachers: routes to
- App navigation → Absences: routes to
- App navigation → Documents: routes to
- App navigation → Rooms: routes to
- App navigation → Student profile: routes to
- App navigation → Certificates: routes to
- Timetable repository → Ječná portal API: fetches timetable
- Timetable repository → Substitution service: fetches schedule
- Timetable repository → File cache: cached by
- Grade checker → File cache: refreshes grades
- Grade checker → Ječná portal API: checks grades
- Grade checker → Android notifications: posts alerts
