# Native App Module — Website as an App Integrates the Sovereign website with native surfaces: | Surface | What it is | Where | |---|---|---| | **PWA** | Installable app — manifest + service worker, app-shell cache | `site/manifest.webmanifest` · `site/sw.js` | | **Android shell** | Dark WebView wrapper over the site (`dashboard_url` string resource) | `builds/apk/app/src/main/.../MainActivity.kt` | | **iOS shell** | Native wrapper over the site | `builds/ios/` | | **Web UI** | Chat + storefront pages served by the same site | `site/chat.html` · `site/store.html` | ## PWA - `site/manifest.webmanifest` — standalone display, brand theme (`#0B1020` bg / `#0FA3A3` theme), PEC5D logo icon, shortcuts to dashboard/chat/PEC5D. - `site/sw.js` — cache-first app shell; API paths bypass the cache (network-first data). - `site/index.html` links the manifest + registers the service worker. Install from any browser: "Install app" (Android Chrome / iOS Safari "Add to Home Screen"). ## Android shell (builds/apk) `MainActivity.kt` is a dark WebView (`#0A0A10` bg, `#00E5FF` accent) loading `R.string.dashboard_url` — point that resource at the production site (or staging) and every site page (dashboard, chat, pec5d, store) is available in-app. `BubbleService.kt` / `SovereignWidget.kt` provide the floating chat bubble and home-screen widget surfaces. > Android builds run on GitHub runners (no local SDK). See the > cross-platform build/publish skill + `builds/apk/README`. ## Config `config/native-app.yaml` — PWA + shell settings (see module doc). ## Verify PWA ```bash python3 -c "import json; d=json.load(open('site/manifest.webmanifest')); print('manifest OK:', d['name'])" # sw.js is plain JS — no build step; served from site/ root scope ```