Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / appstore / AGENTS.md
| 1 | # AGENTS.md — appstore/ (':appstore') |
| 2 | |
| 3 | > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `appstore/` + allowed shared modules. Do not root-scan. |
| 4 | |
| 5 | _Install: ./install appstore (dev by default)._ |
| 6 | <!-- last-reviewed: 2026-10-16 --> |
| 7 | - Gradle: :appstore / dir: appstore/ |
| 8 | - Package roots present: ui, data, domain |
| 9 | - Entry files: MainActivity.kt (no Route.kt — home/library/search/sources/trust/updates pages flow) |
| 10 | - Deps: :library:room, :library:network, :library:work, :library:image |
| 11 | - Metadata: metadata_data/appstore.md (present) |
| 12 | - Rust: yes / screenshotTest: yes |
| 13 | |
| 14 | ## Overview |
| 15 | **Purpose:** Security-first app store — six sources (own repo, curated mirror, F-Droid, GrapheneOS, Accrescent, Play) with every download signature-checked and a plain-language security tier per app (who could push a malicious update). |
| 16 | **Key features:** |
| 17 | - Multi-source catalogs: F-Droid (reproducible-builds only), Accrescent (Signify trust), anonymous Play (no Google account), GrapheneOS bundle one-tap |
| 18 | - Install pipeline: `InstallCoordinator` → `SessionInstaller` → `InstallStatusReceiver`, verified by `InstallVerifier` (APK certs, signed-jar index, source stamps) before the system installer sees anything |
| 19 | - `UpdateCheckWorker` background checks; outdated-target-API apps refused, not hidden |
| 20 | **Architecture / data-flow:** `ui/` home/search/detail/library/updates/sources/trust → `util/AppStoreViewModel` (+ per-area `*Ops`, `AppStoreUiContract`) → `data/` providers per source (`*Repository`, Play/F-Droid/Accrescent clients) + `data/installer/` + `data/security/`; `domain/SearchRanking` is pure ranking. |
| 21 | **Entry points + reading order:** `MainActivity.kt` → `ui/HomePage.kt` → `util/AppStoreViewModel.kt` → `data/CatalogRepository.kt` → `data/installer/InstallCoordinator.kt` → `data/security/InstallVerifier.kt`. |
| 22 | **Gotchas:** |
| 23 | - `util/` is NOT a closed package root — pending migration; don't add more files there |
| 24 | - Signature verification is the product — never shortcut it for UX; trust-profile changes need adversarial review |
| 25 | - Anonymous Play auth sessions are fragile by nature; isolate Play failures from other sources |
| 26 | |
| 27 | ## Key files |
| 28 | ### Root — entry (no Route.kt) |
| 29 | - com/vayunmathur/appstore/MainActivity.kt |
| 30 | ### data/ — catalog, providers, installer, security |
| 31 | - com/vayunmathur/appstore/data/CatalogRepository.kt |
| 32 | - com/vayunmathur/appstore/data/AppProvider.kt |
| 33 | - com/vayunmathur/appstore/data/AppModels.kt |
| 34 | - com/vayunmathur/appstore/data/AppDatabase.kt |
| 35 | - com/vayunmathur/appstore/data/AppStoreDatabaseRepository.kt |
| 36 | - com/vayunmathur/appstore/data/InstalledAppsRepository.kt |
| 37 | - com/vayunmathur/appstore/data/SettingsRepository.kt |
| 38 | - com/vayunmathur/appstore/data/UpdateCheckWorker.kt |
| 39 | - com/vayunmathur/appstore/data/FDroidRepository.kt |
| 40 | - com/vayunmathur/appstore/data/FDroidAppProvider.kt |
| 41 | - com/vayunmathur/appstore/data/FDroidVerification.kt |
| 42 | - com/vayunmathur/appstore/data/accrescent/AccrescentRepository.kt |
| 43 | - com/vayunmathur/appstore/data/accrescent/AccrescentRepo.kt |
| 44 | - com/vayunmathur/appstore/data/accrescent/AccrescentRepoData.kt |
| 45 | - com/vayunmathur/appstore/data/accrescent/AccrescentApi.kt |
| 46 | - com/vayunmathur/appstore/data/accrescent/AccrescentTrustStore.kt |
| 47 | - com/vayunmathur/appstore/data/accrescent/DeviceAttributesProvider.kt |
| 48 | - com/vayunmathur/appstore/data/accrescent/SignifyNative.kt — Rust Signify bridge |
| 49 | - com/vayunmathur/appstore/data/play/PlayRepository.kt |
| 50 | - com/vayunmathur/appstore/data/play/PlayStoreApi.kt |
| 51 | - com/vayunmathur/appstore/data/play/PlayHttpClient.kt |
| 52 | - com/vayunmathur/appstore/data/play/AnonymousAuthRepository.kt |
| 53 | - com/vayunmathur/appstore/data/play/DeviceInfoProvider.kt |
| 54 | - com/vayunmathur/appstore/data/play/GsfVersionProvider.kt |
| 55 | - com/vayunmathur/appstore/data/play/EglExtensionProvider.kt |
| 56 | - com/vayunmathur/appstore/data/play/CertUtil.kt |
| 57 | - com/vayunmathur/appstore/data/play/PlayDownloader.kt |
| 58 | - com/vayunmathur/appstore/data/installer/InstallCoordinator.kt |
| 59 | - com/vayunmathur/appstore/data/installer/SessionInstaller.kt |
| 60 | - com/vayunmathur/appstore/data/installer/InstallStatusReceiver.kt |
| 61 | - com/vayunmathur/appstore/data/security/InstallVerifier.kt |
| 62 | - com/vayunmathur/appstore/data/security/ApkCertificates.kt |
| 63 | - com/vayunmathur/appstore/data/security/SignedJarIndex.kt |
| 64 | - com/vayunmathur/appstore/data/security/SourceStamp.kt |
| 65 | - com/vayunmathur/appstore/data/security/TrustProfile.kt |
| 66 | - com/vayunmathur/appstore/data/security/Signify.kt |
| 67 | - com/vayunmathur/appstore/data/PlayStoreLinks.kt |
| 68 | - com/vayunmathur/appstore/data/RestrictedPackages.kt |
| 69 | ### domain/ — pure ranking (no Android) |
| 70 | - com/vayunmathur/appstore/domain/SearchRanking.kt |
| 71 | ### util/ — ViewModel + per-area ops (pending migration to closed roots) |
| 72 | - com/vayunmathur/appstore/util/AppStoreViewModel.kt |
| 73 | - com/vayunmathur/appstore/util/AppStoreUiContract.kt |
| 74 | - com/vayunmathur/appstore/util/AppStoreHomeOps.kt |
| 75 | - com/vayunmathur/appstore/util/AppStoreSearchOps.kt |
| 76 | - com/vayunmathur/appstore/util/AppStoreDetailOps.kt |
| 77 | - com/vayunmathur/appstore/util/AppStoreUpdateOps.kt |
| 78 | - com/vayunmathur/appstore/util/AppStoreActionOps.kt |
| 79 | ### ui/ — store pages |
| 80 | - com/vayunmathur/appstore/ui/HomePage.kt |
| 81 | - com/vayunmathur/appstore/ui/SearchPage.kt |
| 82 | - com/vayunmathur/appstore/ui/AppDetailPage.kt |
| 83 | - com/vayunmathur/appstore/ui/AppDetailHeader.kt |
| 84 | - com/vayunmathur/appstore/ui/AppDetailSections.kt |
| 85 | - com/vayunmathur/appstore/ui/AppTile.kt |
| 86 | - com/vayunmathur/appstore/ui/AppComponents.kt |
| 87 | - com/vayunmathur/appstore/ui/AppMeta.kt |
| 88 | - com/vayunmathur/appstore/ui/LibraryPage.kt |
| 89 | - com/vayunmathur/appstore/ui/UpdatesPage.kt |
| 90 | - com/vayunmathur/appstore/ui/SourcesPage.kt |
| 91 | - com/vayunmathur/appstore/ui/TrustPage.kt |
| 92 | |
| 93 | ## Verify (this module only) |
| 94 | ``` |
| 95 | ./gradlew :appstore:compileDevKotlin |
| 96 | ./gradlew :appstore:lint |
| 97 | ./gradlew :appstore:checkMetadata |
| 98 | ``` |