Skip to Content
Mobile orientation

Source document · Mobile-app/README.md

SB Relaxing Club Mobile App

This repository will contain the Kotlin Multiplatform application for Android and iOS.

Read first

DocumentPurpose
Mobile SRSComplete mobile behavior, screens, native integrations, offline behavior, and acceptance criteria
ArchitecturePlanned shared/platform module ownership and data flow
Documentation guideDocumentation updates required with mobile changes
Documentation changelogMaterial mobile documentation updates

Planned application shape

Shared Kotlin owns models, typed API access, validation, repositories, feature state, localization access, cache policy, and navigation intent. Android/iOS implementations provide secure storage, camera and pickers, push registration, deep links, sharing, permissions, and WebRTC integration.

The mobile app treats the Go API as authoritative for identity, permissions, prices, order/payment state, and moderation state.

Visual reference

The reference recording is available at ../API/reference/WhatsApp Video 2026-09-14 at 22.41.28.mp4. It governs the visual and interaction direction for Home, discovery, booking, orders, profile, and Provider Dashboard. The Mobile SRS explains how to extend that system to screens not shown.

Implementation status

The Kotlin Multiplatform project has an Android Compose client with live API integration for catalog/search, email/password plus email-OTP sign-in and session refresh, password recovery, guest booking and recovery, photo attachments for Moments, orders and booking/payment submission, order details and state actions, provider onboarding/dashboard and manual-sale entry, chat, notifications, Moments, Lifestyle profiles/content, and meeting membership controls. Android Settings supports confirmed account deletion and a persisted six-language selector with starter translations and Arabic RTL. The API supports authenticated Android device registration and optional Firebase Cloud Messaging delivery. Android registers FCM tokens after sign-in, asks for notification permission on Android 13+, and displays foreground pushes. Meetings use LiveKit-issued room tokens, Android camera/microphone permissions, local and remote video rendering, and in-call mute/camera controls. Translation coverage is still partial. Moments supports text comments, reporting, and member blocking. The light/dark appearance choice is saved on device. iOS has shared models but no UI shell.

Android development

Open this directory in Android Studio and sync the Gradle project. Run the androidApp configuration on an Android emulator or device. The current minimum Android version is API 26. The iOS target is included in the shared module and will receive its platform shell in the next mobile increment.

To enable Firebase on Android, pass -PfirebaseApiKey, -PfirebaseAppId, -PfirebaseProjectId, and -PfirebaseSenderId to Gradle. The server also needs FIREBASE_PROJECT_ID and FIREBASE_CREDENTIALS_FILE; mount the service account outside the repository. Live video also requires API-side LIVEKIT_URL (wss://), LIVEKIT_API_KEY, and LIVEKIT_API_SECRET values. The API returns short-lived meeting tokens; the LiveKit secret is never included in the Android app.

The project pins Gradle 8.9 in gradle/wrapper/gradle-wrapper.properties. Android Studio should use the Gradle wrapper, not a manually selected global Gradle installation. Android builds use Java 17.

The Android app defaults to the Android emulator host URL http://10.0.2.2:8080. To use a different API host, pass a Gradle property:

./gradlew :androidApp:assembleDebug -PapiBaseUrl=https://api.example.com

Cleartext HTTP is enabled only in the debug Android manifest for local emulator development. Production hosts should use HTTPS.

Release APK builds reject the emulator HTTP default. Pass the HTTPS production or staging API URL explicitly:

./gradlew :androidApp:assembleRelease -PapiBaseUrl=https://api.example.com

Build a debug APK from this directory with:

./gradlew :androidApp:assembleDebug

The APK is written to androidApp/build/outputs/apk/debug/androidApp-debug.apk. The Android APK GitHub Actions workflow runs this build for pushes, pull requests, and manual runs, then publishes the APK as the sb-relaxing-club-debug-apk workflow artifact. This debug APK is suitable for development and is not a release signed build.

API boundary

Shared models in shared/src/commonMain mirror API concepts. HttpApiClient decodes the API response envelope, while the Android adapter supplies the HTTP transport. Service categories, public listing discovery, sign-in, session refresh/logout, authenticated order history, and booking submission are connected on Android. Booking sends the selected active menu item, quantity, and notes to the API, displays its server-priced result, and uses an idempotency key when retrying. The confirmation flow can create a WeChat/Alipay payment attempt and submit it for manual provider verification. It displays the method-specific instructions returned by the API and blocks submission if the server has no instructions configured. Production API startup requires real WeChat and Alipay merchant instructions. Provider QR images and Stripe checkout are not connected.

Documentation requirement for each change

Update the Mobile SRS for user-visible behavior, navigation, platform capability, offline policy, or acceptance changes. Update architecture for module ownership or dependency changes. Update this README for setup, commands, build variants, signing, or repository layout. Record material changes in docs/CHANGELOG.md, then synchronize the workspace’s ../docs/ site.