Title: Native Android APK wrapper for JSS (Kotlin + nodejs-mobile, WebView shell) · Issue #366 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: Native Android APK wrapper for JSS (Kotlin + nodejs-mobile, WebView shell) · Issue #366 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: Native Android APK wrapper for JSS (Kotlin + nodejs-mobile, WebView shell) · Issue #366 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Ship a single-tap Android APK that bundles JSS for non-technical users. Realizes part of #46 ("Solid Pod on Every Phone"). History: original framing was Flutter; pivoted to native Kotlin after research showed there's no maintained Flutte...
Open Graph Description: Ship a single-tap Android APK that bundles JSS for non-technical users. Realizes part of #46 ("Solid Pod on Every Phone"). History: original framing was Flutter; pivoted to native Kotlin after rese...
X Description: Ship a single-tap Android APK that bundles JSS for non-technical users. Realizes part of #46 ("Solid Pod on Every Phone"). History: original framing was Flutter; pivoted to native Kotlin ...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/366
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Native Android APK wrapper for JSS (Kotlin + nodejs-mobile, WebView shell)","articleBody":"Ship a single-tap Android APK that bundles JSS for non-technical users. Realizes part of #46 (\"Solid Pod on Every Phone\").\n\n> **History:** original framing was Flutter; pivoted to native Kotlin after research showed there's no maintained Flutter↔nodejs-mobile plugin, and that the plugin layer is unnecessary for a WebView-shell architecture. Decision rationale in [this comment](https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/366#issuecomment-4401796552).\n\n## Architecture\n\n- Native Android Studio project (Kotlin), single `MainActivity`\n- `libnode.so` linked directly via JNI/CMake — vendored from `nodejs-mobile/nodejs-mobile` releases\n- ~80 lines of C++ (JNI shim + stdout/stderr → logcat)\n- Foreground service wrapping the Node thread (persistent notification)\n- `WebView` pointed at `http://127.0.0.1:4443/`\n- JSS bundled as APK assets (full `node_modules/`, copied to `Context.filesDir` on first launch — ~62 MB tree per `scripts/bundle-jss.sh`)\n- All deps are pure JS — see [feasibility spike](https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/366#issuecomment-4401585143)\n\n## Repo\n\nhttps://github.com/JavaScriptSolidServer/jss-android (default branch: `gh-pages`)\n\n## v1 scope (Android only)\n\n- [x] Repo scaffolded with README + ARCHITECTURE + LICENSE\n- [x] `scripts/bundle-jss.sh` — pulls JSS from npm, installs prod deps, refuses to bundle native modules\n- [x] Launch args verified end-to-end on dev box: `bin/jss.js start --single-user --port 4443 --host 127.0.0.1 --root \u003cfiles-dir>/data --idp`\n- [ ] Android Studio Kotlin project bones (gradle, manifest, MainActivity, theme)\n- [ ] `scripts/fetch-libnode.sh` — pulls `libnode.so` for arm64-v8a + armeabi-v7a from nodejs-mobile releases\n- [ ] JNI shim (`native-lib.cpp`, ~80 LOC, lifted from JaneaSystems samples)\n- [ ] Foreground service + persistent notification (\"JSS pod running\")\n- [ ] WebView wired to `http://127.0.0.1:4443/`, with port-bind retry (4443 → 4444 → ...)\n- [ ] First-launch asset copy from APK assets to `Context.filesDir`\n- [ ] AAB build with ABI splits (arm64-v8a, armeabi-v7a)\n- [ ] Documented v1 caveat: `--git`, `--terminal` disabled (both shell out via `child_process`, not supported by nodejs-mobile)\n\n## v1 caveats\n\n- **No `--git`, no `--terminal`** — `nodejs-mobile`'s sandboxed Node disallows `child_process`.\n- **Loopback only** by default (HTTP, not HTTPS). Public exposure path is `--tunnel` against a remote JSS.\n- **Node 18.20.4** is the upstream mobile build (Node 18 EOL'd April 2025). 127.0.0.1 bind cuts the attack surface materially; long-term watch for a community Node 20/22 mobile build.\n- **APK size**: libnode is ~30 MB/ABI. Ship as AAB so Play Store delivers per-device.\n\n## Out of scope (v1)\n\n- iOS — App Store rule 2.5.2 grey zone on dynamic JS eval; needs separate audit.\n- postmarketOS / Linux ARM64 — later.\n- A native (Compose/Views) UI replacing the WebView — v2.\n\n## Prior art for this pattern\n\n- [Manyverse](https://www.manyverse.io/) (Scuttlebutt mobile) — nodejs-mobile + WebView\n- [Mapeo](https://www.mapeo.app/) — peer-to-peer mapping, same pattern\n- Both highlighted on [nodejs-mobile.github.io](https://nodejs-mobile.github.io/)\n\n## Refs\n\n- #46 (umbrella vision: \"Solid Pod on Every Phone\")\n- #45, #266 (Termux precedent)\n- #154 (SQLite mobile)\n- #365 (E2EE composes well with mobile pod)\n- `--tunnel` feature (decentralized ngrok for public exposure)\n- [`nodejs-mobile`](https://github.com/nodejs-mobile/nodejs-mobile) — patched Node runtime for Android/iOS\n- [`nodejs-mobile-samples`](https://github.com/JaneaSystems/nodejs-mobile-samples) — reference Kotlin Android project","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-07T20:05:56Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/366"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:26642144-d5db-046f-655c-a64ceaf97343 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BA6E:A439B:019B:0226:6B03A9C3 |
| html-safe-nonce | 8a1fea42bc9b6220a3f77ed92f34b0924ca02152d40384bdd9688e04e87d775b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTZFOkE0MzlCOjAxOUI6MDIyNjo2QjAzQTlDMyIsInZpc2l0b3JfaWQiOiI5MjExMTg0ODY3MDg0MzE1MDc1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 98725f27d546125150df496324c1a77c0ae37146b2f75bcf965f68091f9b8264 |
| hovercard-subject-tag | issue:4401642085 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/366/issue_layout |
| twitter:image | https://opengraph.githubassets.com/49ca5a27374901b41486e420f3f7465006afb4b83a4f05f6cc4e0972d6915acd/JavaScriptSolidServer/JavaScriptSolidServer/issues/366 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/49ca5a27374901b41486e420f3f7465006afb4b83a4f05f6cc4e0972d6915acd/JavaScriptSolidServer/JavaScriptSolidServer/issues/366 |
| og:image:alt | Ship a single-tap Android APK that bundles JSS for non-technical users. Realizes part of #46 ("Solid Pod on Every Phone"). History: original framing was Flutter; pivoted to native Kotlin after rese... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width