integration: add native-app/README.md
Browse files- native-app/README.md +44 -0
native-app/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Native App Module — Website as an App
|
| 2 |
+
|
| 3 |
+
Integrates the Sovereign website with native surfaces:
|
| 4 |
+
|
| 5 |
+
| Surface | What it is | Where |
|
| 6 |
+
|---|---|---|
|
| 7 |
+
| **PWA** | Installable app — manifest + service worker, app-shell cache | `site/manifest.webmanifest` · `site/sw.js` |
|
| 8 |
+
| **Android shell** | Dark WebView wrapper over the site (`dashboard_url` string resource) | `builds/apk/app/src/main/.../MainActivity.kt` |
|
| 9 |
+
| **iOS shell** | Native wrapper over the site | `builds/ios/` |
|
| 10 |
+
| **Web UI** | Chat + storefront pages served by the same site | `site/chat.html` · `site/store.html` |
|
| 11 |
+
|
| 12 |
+
## PWA
|
| 13 |
+
|
| 14 |
+
- `site/manifest.webmanifest` — standalone display, brand theme
|
| 15 |
+
(`#0B1020` bg / `#0FA3A3` theme), PEC5D logo icon, shortcuts to
|
| 16 |
+
dashboard/chat/PEC5D.
|
| 17 |
+
- `site/sw.js` — cache-first app shell; API paths bypass the cache
|
| 18 |
+
(network-first data).
|
| 19 |
+
- `site/index.html` links the manifest + registers the service worker.
|
| 20 |
+
|
| 21 |
+
Install from any browser: "Install app" (Android Chrome / iOS Safari
|
| 22 |
+
"Add to Home Screen").
|
| 23 |
+
|
| 24 |
+
## Android shell (builds/apk)
|
| 25 |
+
|
| 26 |
+
`MainActivity.kt` is a dark WebView (`#0A0A10` bg, `#00E5FF` accent)
|
| 27 |
+
loading `R.string.dashboard_url` — point that resource at the production
|
| 28 |
+
site (or staging) and every site page (dashboard, chat, pec5d, store)
|
| 29 |
+
is available in-app. `BubbleService.kt` / `SovereignWidget.kt` provide
|
| 30 |
+
the floating chat bubble and home-screen widget surfaces.
|
| 31 |
+
|
| 32 |
+
> Android builds run on GitHub runners (no local SDK). See the
|
| 33 |
+
> cross-platform build/publish skill + `builds/apk/README`.
|
| 34 |
+
|
| 35 |
+
## Config
|
| 36 |
+
|
| 37 |
+
`config/native-app.yaml` — PWA + shell settings (see module doc).
|
| 38 |
+
|
| 39 |
+
## Verify PWA
|
| 40 |
+
|
| 41 |
+
```bash
|
| 42 |
+
python3 -c "import json; d=json.load(open('site/manifest.webmanifest')); print('manifest OK:', d['name'])"
|
| 43 |
+
# sw.js is plain JS — no build step; served from site/ root scope
|
| 44 |
+
```
|