Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / things / AGENTS.md
| 1 | # AGENTS.md — things/ (':things') |
| 2 | |
| 3 | > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `things/` + allowed shared modules. Do not root-scan. |
| 4 | |
| 5 | _Install: ./install things (dev by default)._ |
| 6 | - Gradle: :things / dir: things/ |
| 7 | - Package roots present: ui, platform |
| 8 | - Entry files: MainActivity.kt, Route.kt, Navigation.kt |
| 9 | - Deps: (none declared — BLE + Health Connect only) |
| 10 | - Metadata: metadata_data/things.md (present) |
| 11 | - Rust: no / screenshotTest: yes |
| 12 | |
| 13 | ## Overview |
| 14 | **Purpose:** BLE hyd ration tracker — pairs a smart water bottle, totals sips against a daily goal. No account, no cloud; readings stay on the phone. (Scale BLE files sit alongside the bottle flow.) |
| 15 | **Key features:** Scan/pair/disconnect, live per-sip history, goal progress; Health Connect bridge helper; permissions-gated onboarding. |
| 16 | **Entry points:** `Route` → `MainActivity.kt` → `Navigation.kt` → `ui/HomePage.kt` → `platform/DeviceController.kt` → `platform/BleManager.kt`. |
| 17 | **Gotchas:** BLE behavior is device- and radio-state-dependent — test scan/pair/drop/reconnect on hardware, not the emulator. |
| 18 | |
| 19 | ## Key files |
| 20 | ### Root — entry + navigation |
| 21 | - com/vayunmathur/things/MainActivity.kt |
| 22 | - com/vayunmathur/things/Navigation.kt |
| 23 | - com/vayunmathur/things/Route.kt |
| 24 | ### platform/ — BLE + device control |
| 25 | - com/vayunmathur/things/platform/BleManager.kt |
| 26 | - com/vayunmathur/things/platform/DeviceController.kt |
| 27 | - com/vayunmathur/things/platform/DeviceService.kt |
| 28 | - com/vayunmathur/things/platform/ScaleBleManager.kt |
| 29 | - com/vayunmathur/things/platform/ScaleBleConnection.kt |
| 30 | - com/vayunmathur/things/platform/ScaleBleProtocol.kt |
| 31 | - com/vayunmathur/things/platform/BodyComposition.kt |
| 32 | - com/vayunmathur/things/platform/HealthConnectHelper.kt |
| 33 | ### ui/ — home, devices, permissions |
| 34 | - com/vayunmathur/things/ui/HomePage.kt |
| 35 | - com/vayunmathur/things/ui/DevicesPage.kt |
| 36 | - com/vayunmathur/things/ui/dialogs/DevicePickerDialog.kt + ResetScaleConfirmDialog.kt (stateless content for the `Route.BottlePickerDialog`/`ScalePickerDialog`/`ResetScaleConfirmDialog` routes) |
| 37 | - com/vayunmathur/things/ui/PermissionsPage.kt |
| 38 | - com/vayunmathur/things/ui/PermissionsRationaleActivity.kt |
| 39 | |
| 40 | ## Verify (this module only) |
| 41 | ``` |
| 42 | ./gradlew :things:compileDevKotlin |
| 43 | ./gradlew :things:lint |
| 44 | ./gradlew :things:checkMetadata |
| 45 | ``` |