Ship Android app by wrapping the web build with Capacitor #20
Notifications
Due Date
No due date set.
Blocks
Depends on
#21 Ship iOS app by wrapping the web build with Capacitor
ai_ml_operations/chat_web_app
#22 Make auth work from a Capacitor WebView origin (JWT-only, CORS/CSRF for capacitor://localhost)
ai_ml_operations/chat_web_app
#23 Harden chat WebSocket for mobile lifecycle (background/resume, network switch, reconnect)
ai_ml_operations/chat_web_app
#24 Make routing work from a file-served bundle (React Router 6 under Capacitor)
ai_ml_operations/chat_web_app
Reference: ai_ml_operations/chat_web_app#20
Reference in New Issue
Block a user
Goal
Publish an Android app for chat.aimloperations.com that runs the existing CRA build inside a Capacitor WebView, so we ship one codebase (
llm-fe/) to web and Android.Approach
Add Capacitor to the existing
llm-fe/npm root instead of creating a separate mobile repo. The CRAbuild/output becomes the CapacitorwebDir, and the native Android project is committed alongside it.Scope
capacitor.config.ts(appIdcom.aimloperations.chat,webDir: build).android/project; add Gradle/build artifacts to.gitignore.build:mobile(prod web build +cap sync) andandroid:open..env.productionbakes inhttps://chatbackend.aimloperations.com/api/andwss://.../ws/chat_again/, which works from the WebView, but decide whether mobile needs its own env file (e.g..env.mobile) so we can flip beta/prod without touching web deploys.src/axiosApi.jsuses JWT plus a CSRF cookie viajs-cookie; under Capacitor the page origin ishttps://localhost(or a custom scheme), so cookies are cross-site relative to the backend domain. Confirm CSRF/session cookies are sent, or move fully to header-based JWT for the native client. Backend CORS/CSRF trusted-origins will likely need the Capacitor origin added (chat_backendchange).BrowserRouterneeds deep links to resolve against the bundledindex.html; confirm no 404s on reload, switch toHashRouteror Capacitor server config if needed.@capacitor/assets), app name, versionCode/versionName strategy.recharts), dark/light theme../gradlew bundleRelease).Out of scope
Push notifications, offline caching, and native-only features. File as follow-ups once the wrapper ships.
Notes
The iOS equivalent is tracked separately. Do the shared Capacitor scaffolding (config,
webDir, env, auth/CORS, routing fixes) here since it is a prerequisite for both, then the iOS ticket only adds theios/platform and Apple-specific work.Blockers filed and set as Gitea issue dependencies (Dependencies panel in the sidebar):
capacitor://localhost)Gitea will block closing this issue until those three are closed. #21 (iOS) carries the same three plus a dependency on this issue for the shared scaffolding.