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

Modern-Apps.git / madeveloper / AGENTS.md

AGENTS.md3.8 KiBRenderedCodeRaw
1# AGENTS.md — madeveloper/ (':madeveloper')
2
3> Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `madeveloper/` + allowed shared modules. Do not root-scan.
4
5_Install: ./install madeveloper (dev by default)._
6- Gradle: :madeveloper / dir: madeveloper/
7- Package roots present: ui, data, domain, platform
8- Entry files: MainActivity.kt, Route.kt, Navigation.kt
9- Deps: :library:network, :library:work
10- Metadata: metadata_data/madeveloper.md (present)
11- Rust: no / screenshotTest: yes
12
13## Overview
14**Purpose:** Developer companion for the maproj infrastructure: git host pages, CI status, a read-only build catalog, and server-pushed dev installs.
15**Key features:**
16- Git pages over the host JSON (`/tests.json`, `/issues.json`, `/prs.json`) and native repo browsing via the first-party JSON API (`/api/repos[/<repo>]`, `/commits`, `/tree`, `/file` on git.maproj.org) with branch switching and commit detail (no diff endpoint: metadata + link-out)
17- Read-only F-Droid catalog (`static.maproj.org/fdroid/repo/index-v2.json`, newest build per package)
18- Pushed installs: paired WebSocket to `wss://api.maproj.org/dev/ws`, download + SHA-256 verify, then a user-tapped PackageInstaller session (never silent)
19**Architecture / data-flow:** `ui/` screens → `platform/MaDevViewModel` → `data/GitHostRepository` (NetworkClient, FIRST_PARTY) + `data/DevPushClient` seam over `WebSocketClient`; pure parsing and the install state machine live in `domain/` (`GitParsers`, `DevProtocol`) with no Android imports.
20**Entry points + reading order:** `Route` → `MainActivity.kt` → `Navigation.kt` → `platform/MaDevViewModel.kt` → `data/GitHostRepository.kt` / `domain/DevProtocol.kt`.
21**Gotchas:**
22- The JSON API has no diff endpoint — commit detail shows metadata (subject/body/author/time) plus a link-out to the git host; do not invent a diff view. The API may 404 until deployed server-side
23- Android forbids silent installs here by design: a push only downloads and verifies, the Install button and system prompt do the rest
24- The `/dev/ws` server endpoint is built in parallel; the client is coded to the agreed JSON contract behind `DevSocketTransport`
25
26## Key files
27### Root — entry + navigation
28- com/vayunmathur/madeveloper/MainActivity.kt
29- com/vayunmathur/madeveloper/Navigation.kt
30- com/vayunmathur/madeveloper/Route.kt
31### data/ — git host, catalog and push transport
32- com/vayunmathur/madeveloper/data/GitHostRepository.kt
33- com/vayunmathur/madeveloper/data/DevPushClient.kt
34### domain/ — pure models, parsers and push protocol
35- com/vayunmathur/madeveloper/domain/GitModels.kt
36- com/vayunmathur/madeveloper/domain/GitParsers.kt
37- com/vayunmathur/madeveloper/domain/RepoBrowser.kt
38- com/vayunmathur/madeveloper/domain/DevProtocol.kt
39### platform/ — view model, pairing, notifications, installer
40- com/vayunmathur/madeveloper/platform/MaDevViewModel.kt
41- com/vayunmathur/madeveloper/platform/PairingStore.kt
42- com/vayunmathur/madeveloper/platform/InstallNotifications.kt
43- com/vayunmathur/madeveloper/platform/InstallStatusReceiver.kt
44### ui/ — screens
45- com/vayunmathur/madeveloper/ui/HomeScreen.kt
46- com/vayunmathur/madeveloper/ui/RepoScreen.kt
47- com/vayunmathur/madeveloper/ui/RepoScreenContent.kt
48- com/vayunmathur/madeveloper/ui/CommitsScreen.kt
49- com/vayunmathur/madeveloper/ui/CommitsScreenContent.kt
50- com/vayunmathur/madeveloper/ui/CommitScreen.kt
51- com/vayunmathur/madeveloper/ui/CommitScreenContent.kt
52- com/vayunmathur/madeveloper/ui/FileScreen.kt
53- com/vayunmathur/madeveloper/ui/FileScreenContent.kt
54- com/vayunmathur/madeveloper/ui/TestsScreen.kt
55- com/vayunmathur/madeveloper/ui/CatalogScreen.kt
56- com/vayunmathur/madeveloper/ui/PushScreen.kt
57
58## Verify (this module only)
59```
60./gradlew :madeveloper:compileDevKotlin
61./gradlew :madeveloper:lint
62./gradlew :madeveloper:checkMetadata
63```