jss-android

Native Android app (Kotlin) that bundles JavaScript Solid Server (JSS) for one-click mobile install. Realizes part of JSS#46 (“Solid Pod on Every Phone”) for non-technical users.

Status: scaffold / pre-MVP. Tracking issue: JSS#366. Pivot decision: comment.

Architecture

┌─────────────────────────────────────────────────┐
│  Android APK (Kotlin)                           │
│                                                 │
│   ┌──────────────────┐    ┌──────────────────┐  │
│   │  WebView         │    │  libnode.so      │  │
│   │  (MainActivity)  │    │  (JNI thread)    │  │
│   │                  │◄──►│                  │  │
│   │  http://         │HTTP│  bin/jss.js      │  │
│   │  127.0.0.1:4443  │    │  (single-user)   │  │
│   │                  │    │                  │  │
│   └──────────────────┘    └──────────────────┘  │
│                                                 │
│           Foreground service + notification     │
└─────────────────────────────────────────────────┘

libnode.so from nodejs-mobile is linked via JNI and runs JSS on a dedicated thread. The WebView talks to JSS over HTTP — no platform-channel bridge needed (JSS is already a server, the WebView is already a client).

Why this is feasible

See the feasibility spike for the full dep audit, and the pivot rationale for why we landed on Kotlin instead of Flutter or React Native.

v1 scope

v1 caveats

Out of scope (v1)

Quick start (development)

# Prereqs: Android Studio (or Android SDK + JDK 17), an Android device or emulator
adb devices                              # confirm device is visible

# Vendor libnode.so for the target ABIs (TBD)
./scripts/fetch-libnode.sh

# Bundle JSS into the APK assets
./scripts/bundle-jss.sh

# Build & install on a connected device (TBD: gradle scaffold)
./gradlew installDebug

Repo layout (target)

jss-android/
├── README.md                 # this file
├── ARCHITECTURE.md           # design details
├── LICENSE                   # AGPL-3.0-only (matches JSS)
├── build.gradle.kts          # root gradle
├── settings.gradle.kts
├── app/
│   ├── build.gradle.kts
│   ├── libnode/              # vendored libnode.so + headers (gitignored)
│   └── src/main/
│       ├── AndroidManifest.xml
│       ├── java/live/jss/jss_android/
│       │   ├── MainActivity.kt
│       │   └── JssService.kt
│       ├── cpp/
│       │   ├── native-lib.cpp     # JNI shim
│       │   └── CMakeLists.txt
│       ├── assets/
│       │   └── jss/               # JSS bundled here at build time
│       └── res/
└── scripts/
    ├── bundle-jss.sh         # → app/src/main/assets/jss/
    └── fetch-libnode.sh      # → app/libnode/{abi}/libnode.so

Refs

License

AGPL-3.0-only — matches JSS.