Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
main ▾

Modern-Apps.git / education / AGENTS.md

AGENTS.md5.0 KiBRenderedCodeRaw
1# AGENTS.md — education/ (':education')
2
3> Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `education/` + allowed shared modules. Do not root-scan.
4
5_Install: ./install education (dev by default)._
6- Gradle: :education / dir: education/
7- Package roots present: ui, data, intents
8- Entry files: MainActivity.kt + Route.kt + Navigation.kt (catalog → course/unit/lesson/quiz flow; dialogs are routes)
9- Deps: :library:room, :youpipe:extractor, :library:network
10- Metadata: metadata_data/education.md (present)
11- Rust: no / screenshotTest: yes
12
13## Overview
14**Purpose:** Kids' learning app — age-banded K2 + explorer curriculum (lessons, quizzes, tracing, drag-match) with badges/streaks, parent gate, offline progress; video lessons stream via `:youpipe:extractor`.
15**Key features:** Bundled curriculum (`content/` model + validator) → course/unit/lesson/quiz pages; learner progress + deadlines in Room; video player pages stream Khan/YouTube; narrator + downloader helpers.
16**Entry points:** `MainActivity.kt` → `Navigation.kt` (`Route` entries, incl. `DeadlineDatePickerDialog` as a `DialogPage()`) → `ui/HomePage.kt` → `platform/EducationViewModel.kt` → `data/EducationRepository.kt`. Screens push dialog routes instead of holding pending-target state (`ParentPage` pushes `Route.DeadlineDatePickerDialog(unitId)`); each page has a stateless `…Content`/`…ScreenContent` slice that `src/screenshotTest` `MetadataPreviews` captures per route (`<n>-<route-kebab>`), except `VideoPlayer` (streaming ExoPlayer surface, exempted in `Route.kt`).
17**Gotchas:**
18- `content/` and `util/` are NOT closed package roots — don't add more files there
19- Curriculum content is validated (`ContentValidator`) — content edits must pass validation, not just compile
20- Video is the only network use — everything else must work fully offline (classroom mode)
21
22## Key files
23### Root — app init + entry
24- com/vayunmathur/education/MainActivity.kt
25- com/vayunmathur/education/Route.kt — sealed `Route` destinations + screenshot exemption for `VideoPlayer`
26- com/vayunmathur/education/Navigation.kt — `MainNavigation` entries for every route
27### content/ — curriculum model
28- com/vayunmathur/education/content/ContentModel.kt
29- com/vayunmathur/education/content/ContentRepository.kt
30- com/vayunmathur/education/content/ContentValidator.kt
31- com/vayunmathur/education/content/Question.kt
32### platform/ — backup
33- com/vayunmathur/education/platform/AppBackupAgent.kt — key/value BackupAgent (`android:backupAgent`): exports `education-db` to plaintext via `SqlCipherDbCodec` (`educationDbConfigs`) and ships `datastore_default` (badge unlocks); raw DB + `secure_prefs.xml` stay excluded in `data_extraction_rules.xml` (device-transfer / fallback control)
34### data/ — learner progress (Room)
35- com/vayunmathur/education/data/EducationDatabase.kt — `DB_NAME` + `educationDbConfigs()` backup config
36- com/vayunmathur/education/data/EducationRepository.kt
37- com/vayunmathur/education/data/Learner.kt
38- com/vayunmathur/education/data/SkillProgress.kt
39- com/vayunmathur/education/data/Deadline.kt
40### intents/ — assistant IPC
41- com/vayunmathur/education/intents/GetProgressIntent.kt — OpenAssistant `education_get_progress` (aggregates only)
42- com/vayunmathur/education/intents/EducationProgressSummary.kt — validated summary builder: per-course/subject skill counts, ≤5 upcoming deadlines (titles ≤120 chars), no lesson/question content or deadline notes
43### util/ — ViewModel + helpers
44- com/vayunmathur/education/util/EducationViewModel.kt
45- com/vayunmathur/education/util/EducationUiContract.kt
46- com/vayunmathur/education/util/EducationDownloader.kt
47- com/vayunmathur/education/util/EducationAchievements.kt
48- com/vayunmathur/education/util/Narrator.kt
49- com/vayunmathur/education/util/VideoExtractor.kt
50### ui/ — shell, courses, K2, quizzes, video, parents
51- com/vayunmathur/education/ui/Shell.kt
52- com/vayunmathur/education/ui/HomePage.kt
53- com/vayunmathur/education/ui/CoursePage.kt
54- com/vayunmathur/education/ui/UnitPage.kt
55- com/vayunmathur/education/ui/LessonPage.kt
56- com/vayunmathur/education/ui/QuizPage.kt
57- com/vayunmathur/education/ui/QuizQuestionInputs.kt
58- com/vayunmathur/education/ui/ResultsPage.kt
59- com/vayunmathur/education/ui/ExplorerHomePage.kt
60- com/vayunmathur/education/ui/ExplorerCoursePage.kt
61- com/vayunmathur/education/ui/K2HomePage.kt
62- com/vayunmathur/education/ui/K2LessonPage.kt
63- com/vayunmathur/education/ui/K2QuizPage.kt
64- com/vayunmathur/education/ui/K2RewardPage.kt
65- com/vayunmathur/education/ui/K2DragMatch.kt
66- com/vayunmathur/education/ui/TracingCanvas.kt
67- com/vayunmathur/education/ui/VideoPlayerPage.kt
68- com/vayunmathur/education/ui/BadgesPage.kt
69- com/vayunmathur/education/ui/ParentPage.kt
70- com/vayunmathur/education/ui/ParentGatePage.kt
71- com/vayunmathur/education/ui/Common.kt
72- com/vayunmathur/education/ui/dialogs/DeadlineDatePickerDialog.kt — deadline picker dialog route content
73
74## Verify (this module only)
75```
76./gradlew :education:compileDevKotlin
77./gradlew :education:lint
78./gradlew :education:checkMetadata
79```