File size: 1,784 Bytes
a8562c0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 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
```