Skip to content

feat(mobile): add Kotlin Multiplatform mobile client under apps/mobile - #777

Open
kareemessam09 wants to merge 2 commits into
oblien:mainfrom
kareemessam09:feat/mobile-app
Open

feat(mobile): add Kotlin Multiplatform mobile client under apps/mobile#777
kareemessam09 wants to merge 2 commits into
oblien:mainfrom
kareemessam09:feat/mobile-app

Conversation

@kareemessam09

Copy link
Copy Markdown

Summary

Adds the OpenShip mobile client under apps/mobile, implemented with Kotlin Multiplatform and Compose Multiplatform for Android.

This integrates the mobile application directly into the monorepo as @repo/mobile, adhering to the client-side architecture discussed in the repository discussions.


Architecture & Design Alignment

  1. Client-Side Single Source of Truth:

    • The mobile client interacts directly with standard OpenShip HTTP, SSE, and MCP API endpoints (/api/projects, /api/deployments, /api/system/monitor/stream, and /api/mcp).
    • Introduces no intermediate proxy servers or local daemons.
  2. Monorepo Integration (@repo/mobile):

    • Registered as a workspace package under apps/mobile.
    • Added root build script "build:mobile": "bun run --cwd apps/mobile build".
    • Scoped .gitignore rules for Android and Gradle build artifacts.
  3. Security & Credentials:

    • Personal Access Tokens (PATs) are encrypted on-device via Android KeyStore with AES-256 GCM (AndroidTokenStorage.kt).
    • Cleartext HTTP is strictly limited to local subnets and loopback addresses in network_security_config.xml.
  4. Brand & Design Parity:

    • Integrated official OpenShip branding and SVG/vector assets.
    • 1:1 token-level theme parity (theme.css) supporting Dark, Dim, and Light modes.

Core Features

  • Instance Connection: Multi-instance configuration with health probing (/api/health/env), authentication mode resolution (local, saas, none), and token validation.
  • Projects & Deployments: Real-time project overview, active deployment status, framework identification, and commit metadata.
  • Live Deployment Logs: Real-time SSE streaming (/api/deployments/:id/stream) with Base64 decoding, ANSI color parsing, build stage indicators, and auto-scrolling.
  • Server Telemetry: Real-time SSE telemetry (/api/system/monitor/stream) with gauges and sparkline charts for CPU, RAM, disk, and load averages.
  • MCP Actions: Gated Redeploy and Rollback write actions via /api/mcp with confirmation dialogs and automatic fallback for read-only tokens.
  • Packaging: Configured R8 minification, resource shrinking, and per-ABI APK splits (~4.7MB per release binary).

Verification

All automated test suites pass locally:

cd apps/mobile
./gradlew allTests
./gradlew assembleRelease

Planned Follow-up

  • SSH Fresh Server Bootstrap: A dedicated onboarding step for fresh VPS instances (installing the OpenShip CLI over SSH and establishing local port forwarding) will be submitted as a separate, focused pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant