The Raffi mobile app is a companion application for iOS and Android that syncs your watch progress, library, and authentication with the desktop app. Built with React Native and Expo SDK 54.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/kaleidal/raffi/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Raffi Mobile provides a Netflix-style mobile experience with browse, search, continue watching, and native video playback. It connects to the desktop server for torrent transcoding and syncs all data via Supabase.Tech Stack
- Framework: React Native 0.81.5 with React 19.1.0
- Expo SDK: 54.0.29 with new architecture enabled
- Router: Expo Router 6.0.19 (file-based routing)
- Video Player: Expo Video 3.0.15 (native playback)
- State Management: Zustand 5.0.9
- Database: Supabase (shared with desktop) + Convex
- Navigation: React Navigation 7.1.8 with bottom tabs
- UI: React Native Reanimated 4.1.1 for animations
Key Dependencies
Supported Platforms
- iOS
- Android
iOS
Supported Versions: iOS 13.0 and laterSystem Requirements
- OS: iOS 13.0+ or iPadOS 13.0+
- Devices: iPhone 6S and later, iPad Air 2 and later
- Storage: 100 MB for app + space for cache
- Network: Wi-Fi or cellular data for streaming
App Configuration
- Bundle ID:
al.kaleid.mobile - Tablet Support: Yes (iPadOS optimized)
- Orientation: All orientations supported
- Full Screen: Not required (allows PiP and multitasking)
- Dark Mode: Dark theme enforced
iOS-Specific Features
- Native Video Player: Expo Video with native controls
- Picture-in-Picture: Native PiP support (expo-pip)
- Face ID/Touch ID: Biometric authentication (planned)
- Background Audio: Continue playback when app is backgrounded
- Network Security:
NSAllowsArbitraryLoadsenabled for local server connections
Limitations
Torrent Streaming- ❌ Direct torrenting NOT supported on iOS
- iOS restricts background networking and P2P connections
- Native torrent module requires compiling libtorrent for iOS (not yet implemented)
-
Debrid Services (Recommended):
- Real-Debrid
- AllDebrid
- Premiumize Configure a debrid service in Settings to convert torrent links to direct HTTP streams.
- Desktop Server: Connect to Raffi desktop server for transcoding (requires desktop app running on same network)
Building for iOS
Development BuildFeatures
Browse Content
- Cinemeta Integration: Popular movies and TV shows from Stremio’s Cinemeta catalog
- Hero Banner: Auto-rotating featured content
- Content Rows: Organized by Popular, Trending, Genres
- Poster Cards: Netflix-style grid with smooth loading
Continue Watching
- Cross-Device Sync: Start on desktop, continue on mobile (via Supabase)
- Episode Progress: Per-episode tracking with resume position
- Watched/Unwatched: Automatic state management
- Resume Prompts: “Continue from XX:XX” on playback start
Search
- Instant Search: Real-time results as you type
- Multi-source: Search across all configured Stremio addons
- Filters: Movies, TV Shows, by genre, year
- Search History: Recent searches saved locally
Video Playback
- Native Player: Expo Video with hardware acceleration
- Seek Controls: Gesture-based seeking with thumbnail preview
- Quality Selection: Automatic or manual quality picker
- Subtitle Support: SRT/VTT with configurable size and position
- Audio Tracks: Switch between multiple audio streams
- Screen Orientation: Auto-rotate to landscape for fullscreen
- Brightness Control: Vertical swipe gesture (expo-brightness)
- Volume Control: System volume integration
- Keep Awake: Screen stays on during playback (expo-keep-awake)
Stremio Addon Support
- Shared Addons: Same addons as desktop app
- Addon Management: Install/remove from mobile
- Multi-source Streams: Aggregate from multiple addons
- Cinemeta: Default catalog for metadata
Authentication
- Supabase Auth: Shared with desktop app
- Email/Password: Standard authentication
- Session Sync: Automatic token refresh
- Secure Storage: AsyncStorage for credentials
UI/UX
- Dark Theme: Netflix-style dark interface
- Tab Navigation: Home, Search, Downloads, Profile
- Smooth Animations: React Native Reanimated for 60fps
- Blur Effects: expo-blur for overlays
- Haptic Feedback: expo-haptics for button presses
- Linear Gradients: expo-linear-gradient for visual polish
Project Structure
Development
Prerequisites
- Node.js 18+ and npm
- Expo CLI:
npm install -g expo-cli - iOS Development (macOS only):
- Xcode 14+
- iOS Simulator
- Android Development:
- Android Studio
- Android SDK (API 23+)
- Android Emulator or physical device
Setup
Running on Device/Emulator
iOS Simulator (macOS only)- Install Expo Go app from App Store/Play Store
- Scan QR code from
npm start - App loads in Expo Go
Connecting to Desktop Server
For torrent streams, updateSTREAMING_SERVER in app/player.tsx:
- Windows:
ipconfig - macOS/Linux:
ifconfigorip addr - Should be something like
192.168.1.100
- Desktop app is running
- Mobile device on same Wi-Fi network
- Firewall allows port 6969
Development Scripts
Building for Production
Expo Application Services (EAS)
Prerequisites:- Create EAS account: https://expo.dev/
- Install EAS CLI:
npm install -g eas-cli - Login:
eas login
Local Builds (Advanced)
Android APK:Configuration
App Metadata (app.json)
Expo Plugins
- expo-router: File-based routing
- expo-screen-orientation: Landscape for video playback
- expo-splash-screen: Custom splash with dark theme
- withTorrentStreamer: Native torrent module integration
- expo-pip: Picture-in-picture support
Expo Experiments
Cross-Device Sync
Raffi Mobile shares data with desktop via Supabase:Synced Data
- Authentication: Shared user accounts and sessions
- Watch Progress: Resume position synced in real-time
- Library: Custom lists, favorites, collections
- Addon Settings: Configured addons available on all devices
- Watched States: Marked as watched/unwatched across platforms
Sync Stores (Zustand)
authStore.ts:Limitations
iOS
- No Direct Torrenting: Requires debrid service or desktop server
- Background Limits: iOS suspends background tasks after 3 minutes
- File System: Limited access to local file system
- Unsigned App: Requires Apple Developer account for TestFlight/App Store
Android
- Battery Optimization: Aggressive battery savers may kill background downloads
- Storage Permissions: Required for torrent cache (auto-requested)
- Play Protect: May flag torrent module as risky (false positive)
General
- Expo Go: Torrent streaming NOT available in Expo Go (requires development build)
- Offline Downloads: Download content for offline playback (available in downloads tab)
- Transcoding: Some codecs require desktop server for transcoding
- Network: Torrent streaming requires Wi-Fi or unlimited data plan
Troubleshooting
App won’t connect to desktop server
- Check same network: Desktop and mobile must be on same Wi-Fi
- Firewall: Desktop firewall must allow port 6969
- Correct IP: Update
STREAMING_SERVERwith desktop’s local IP (not 127.0.0.1) - Server running: Desktop app must be open and server started
Torrent streaming not working (Android)
-
Development build required: Doesn’t work in Expo Go
- Storage permission: Grant storage access when prompted
-
Check module loaded:
Build errors
EAS build fails:- Check
eas.jsonconfiguration - Verify credentials:
eas credentials - Check build logs in Expo dashboard
Next Steps
- Desktop App - Full-featured desktop application
- Streaming Server - HLS transcoding server details
- Configure Debrid Services for iOS torrent streaming
- Learn about Expo Router file-based routing