Mobile (apps/mobile)
Native mobile app wrapper using Capacitor, sharing the SPA build from the website workspace.
Overview
The mobile workspace wraps the website's SPA build into a native mobile application using Capacitor. It provides native features like biometric authentication, push notifications, haptics, camera, and geolocation.
Tech Stack
| Layer | Technology | Version |
|---|---|---|
| Mobile Framework | Capacitor | ^8.4.1 |
| Platform | iOS & Android | - |
| WebDir | ../website/dist-spa | - |
Capacitor Plugins
| Plugin | Description |
|---|---|
@capacitor/android | Android platform support |
@capacitor/app | App lifecycle management |
@capacitor/camera | Camera access |
@capacitor/core | Capacitor core runtime |
@capacitor/geolocation | Location services |
@capacitor/haptics | Haptic feedback |
@capacitor/local-notifications | Local notifications |
@capacitor/preferences | Key-value storage |
@capacitor/push-notifications | Push notifications |
@capacitor/share | Native share sheet |
@capgo/capacitor-native-biometric | Biometric authentication |
Key Scripts
bash
# Sync SPA build with native project
moon run apps-mobile:cap-sync
# Open native IDEs
moon run apps-mobile:cap-open-ios # Open Xcode
moon run apps-mobile:cap-open-android # Open Android Studio
# Run on device/emulator
moon run apps-mobile:cap-run-ios
moon run apps-mobile:cap-run-android
# Build SPA first, then sync
moon run apps-mobile:build # Builds website SPAArchitecture
apps/mobile/
├── capacitor.config.ts # Capacitor configuration
├── ios/ # iOS native project (generated)
├── android/ # Android native project (generated)
└── package.jsonThe mobile app uses the SPA build from apps/website/dist-spa as its web content. The SPA is built with moon run apps-website:build-spa and then synced with cap sync.