Android App (Capacitor)
This folder contains the Android app build for the project. The app reuses the existing web UI (apps and builder screens) and wraps it with Capacitor for native Android deployment.
Goals
- Reuse the existing web UI with minimal divergence.
- Provide a native Android APK for distribution.
- Sync apps between device and backend.
- Build via GitHub Actions; do not build locally.
How it works
- UI reuse:
npm run prepare-uicopies../chat/publicintowwwand injects a bridge script so existing pages can talk to native APIs. - Native bridge: Capacitor provides native access to preferences and HTTP requests.
- Local storage: Apps are saved using Capacitor Preferences plugin, isolated per user.
- Syncing:
syncAppposts the locally saved app JSON to the backend.
Setup
- Install prerequisites (Node 18+, Android SDK).
- From this folder:
npm install. - Pull UI assets:
npm run prepare-ui. - Add Android platform:
npx cap add android. - Sync:
npx cap sync android.
Development
npm run buildprepares UI and syncs with Android.npx cap open androidopens Android Studio for development.
CI build
- GitHub Actions workflow:
.github/workflows/build-android-app.yml. - The action runs on
ubuntu-latest, sets up Java/Android SDK, and builds the APK.
Security notes
- API keys are stored in Capacitor Preferences (encrypted on Android).
- OpenCode execution is not supported on mobile (desktop app only).