Files
orca/mobile
Jinwoo-HandOrca 95324c686e feat(mobile): add Expo mobile app with QR pairing and WebSocket RPC transport
Adds the Orca Mobile companion app (Expo SDK 55 / React Native 0.83) with:
- QR code pairing flow: scan orca://pair# URL, validate auth, save host profile
- WebSocket RPC client with auto-reconnect, exponential backoff, streaming support
- Three screens: host list, worktree list, terminal session with live output
- Mock WebSocket server for development without a running Orca desktop instance
- Desktop-side: TLS certificate management, device registry, mobile IPC handlers,
  WebSocket transport layer, and pairing offer encode/decode with Zod validation
- Unit tests for WebSocket transport and pairing codec

Co-authored-by: Orca <help@stably.ai>
2026-04-30 18:03:22 -04:00
..

Orca Mobile

React Native companion app for Orca. Monitor worktrees, view terminal output, and send commands from your phone.

Prerequisites

  • Node.js 24+
  • pnpm
  • Expo Go app on your phone (from App Store / Google Play), or a dev client build

Quick Start

cd mobile
pnpm install
pnpm start                 # starts Expo dev server

Scan the QR code shown in the terminal with your phone's camera (iOS) or the Expo Go app (Android).

Development Paths

I have an Android phone

  1. Install Expo Go from Google Play
  2. Run pnpm start, scan QR with Expo Go
  3. For native modules (camera): npx expo prebuild --platform android && cd android && ./gradlew assembleDebug
  4. Install APK: adb install android/app/build/outputs/apk/debug/app-debug.apk
  5. Run with pnpm start --dev-client

I only have a Mac (iOS Simulator)

  1. Install Xcode from the App Store
  2. Run pnpm start --ios to open in iOS Simulator

Mock Server

Develop the mobile app without a running Orca desktop instance:

pnpm mock-server           # starts mock WebSocket server on port 6768

Connect from the app using endpoint ws://localhost:6768 and token mock-device-token.

Connecting to Real Orca

  1. Start Orca desktop with WebSocket transport enabled
  2. In Orca, go to Settings > Mobile and scan the QR code with this app
  3. The QR encodes the connection endpoint, device token, and TLS fingerprint

Project Structure

mobile/
├── app/                   # Expo Router screens (file-based routing)
│   ├── _layout.tsx        # Root layout with navigation stack
│   ├── index.tsx          # Home screen — paired hosts list
│   └── pair-scan.tsx      # QR code scanning screen
├── src/
│   └── transport/         # WebSocket RPC client (TBD)
├── scripts/
│   └── mock-server.ts     # Standalone mock WebSocket server
└── assets/                # App icons and splash screen