Technology Stack
The mobile app is built with modern React Native technologies:React Native 0.81
Native iOS and Android support with New Architecture enabled
Expo 54
Managed workflow with Expo Router for file-based routing
React 19
Latest React features with React Compiler enabled
NativeWind 4
TailwindCSS for React Native with native styling
Core Technologies
React Native Framework
- React Native 0.81.4 with New Architecture enabled
- React 19.1.0 with experimental React Compiler support
- Expo SDK 54 for managed development workflow
- Expo Router 6.0 for file-based navigation
- TypeScript 5.8.2 for type safety
The mobile app uses React Native’s New Architecture with Fabric renderer and TurboModules for improved performance and modern capabilities.
Navigation & Routing
- Expo Router 6.0: File-based routing system
- React Navigation 7: Bottom tabs and drawer navigation
@react-navigation/bottom-tabsfor tab-based navigation@react-navigation/drawerfor side drawer menu@react-navigation/nativefor core navigation primitives
Styling
- NativeWind 4.1.23: TailwindCSS for React Native
- TailwindCSS 3.4.17: Utility-first CSS framework
- Native styling with
react-native-reanimatedfor animations - Gesture support via
react-native-gesture-handler
State Management
- Server State
- Form State
TanStack Query 5.85.5 for server state management:
- Automatic caching and synchronization
- Background refetching
- Optimistic updates
- Offline support
Authentication
The mobile app uses Better-Auth 1.3.13 with Expo integration:@better-auth/expo
Expo-specific Better-Auth adapter for session management
expo-secure-store
Secure token storage using device keychain
expo-web-browser
OAuth flow handling with in-app browser
expo-crypto
Cryptographic operations for secure authentication
- Secure session token storage in device keychain
- OAuth provider support with web browser flow
- Automatic session refresh and token management
- Cross-platform compatibility (iOS/Android)
Expo Modules
The app leverages several Expo modules for native functionality:Core Modules
- expo-constants: Access to system and app constants
- expo-linking: Deep linking and URL scheme handling
- expo-splash-screen: Splash screen management during app load
- expo-status-bar: Status bar customization
UI/UX Modules
- expo-navigation-bar: Android navigation bar styling
- expo-system-ui: System UI customization (status bar, navigation bar)
- @expo/vector-icons: Icon library with multiple icon sets
Security & Storage
- expo-secure-store: Encrypted key-value storage
- expo-crypto: Cryptographic operations
- expo-web-browser: Secure in-app browser for OAuth
Project Structure
The mobile app follows Expo Router file-based routing conventions:Expo Configuration
The app is configured inapp.json with:
App Metadata
Platform Support
- iOS
- Android
- Web
- iPad support enabled
- Automatic interface style (light/dark mode)
- Custom URL scheme for deep linking
Experimental Features
- Typed Routes: Type-safe navigation with autocomplete
- React Compiler: Automatic optimization of React components
- New Architecture: Fabric renderer and TurboModules
Development Workflow
Local Development
- Expo Go
- Native Builds
- Prebuild
- iOS: Camera app
- Android: Expo Go app
Expo Go provides a quick development experience but has limitations with custom native modules. For full functionality, use development builds.
Development Scripts
Cross-Platform Support
The mobile app is designed for cross-platform compatibility:Platform-Specific Code
Use platform-specific extensions when needed:Responsive Design
- Safe Area Context:
react-native-safe-area-contextfor notch and navigation bar handling - Responsive Layouts: NativeWind utilities for breakpoint-based styling
- Gesture Handling:
react-native-gesture-handlerfor platform-native gestures - Animations:
react-native-reanimatedfor 60fps native animations
Performance Optimizations
New Architecture
Fabric renderer and TurboModules for improved performance
React Compiler
Automatic component memoization and optimization
Native Animations
Reanimated worklets run on the UI thread
Metro Bundling
Optimized JavaScript bundling for React Native
Reanimated Worklets
The app usesreact-native-reanimated 4.1.0 for performant animations:
- Worklets: JavaScript code running on the UI thread
- Shared Values: Reactive state synchronized across threads
- Gesture-driven animations: Direct gesture handling without bridge
Environment Variables
Create.env file in apps/native/ based on .env.example:
Building for Production
EAS Build (Recommended)
Local Builds
Deep Linking
The app supports deep linking with the custom schememybettertapp://:
- OAuth callback handling
- Push notification navigation
- Cross-app communication
- Universal links (iOS) and App Links (Android)
Testing
No testing framework is currently configured. Consider adding Jest and React Native Testing Library for unit and integration tests.
- Jest: Unit testing framework
- React Native Testing Library: Component testing
- Detox: End-to-end testing
- Maestro: UI testing alternative
Next Steps
Add Features
Extend the mobile app with additional AI assistant features
Setup EAS
Configure Expo Application Services for cloud builds
Add Testing
Implement unit and integration tests with Jest
App Store
Prepare for iOS App Store and Google Play submission