React Native mobile application for the RAG (Retrieval-Augmented Generation) Financial Analysis System.
- Node.js 18+
- Expo CLI (
npm install -g @expo/cli) - Android Studio (for Android development)
- Xcode (for iOS development, Mac only)
-
Install dependencies
npm install
-
Setup environment for your target platform
# For Android Emulator npm run dev:android # For iOS Simulator (Mac only) npm run dev:ios # For Physical Device npm run env:device # Then edit .env file with your computer's IP address npm run start
Important: When running with local backend, you need different API URLs for different platforms:
- Android Emulator:
http://10.0.2.2:5013 - iOS Simulator:
http://localhost:5013 - Physical Device:
http://YOUR_COMPUTER_IP:5013
# Automatically detect your IP and backend port
npm run detect-network
# Then run your preferred platform
npm run dev:android # Android Emulator
npm run dev:ios # iOS Simulator
npm run dev:device # Physical Device# Android Emulator (recommended for development)
npm run dev:android
# iOS Simulator
npm run dev:ios
# Physical Device
npm run env:device
# Edit .env file with your IP, then:
npm run startSee NETWORK_SETUP_GUIDE.md for detailed troubleshooting.
- Authentication: Login/Register with role-based access (Admin/Analyst)
- AI Assistant: Chat interface for financial analysis
- File Upload: PDF report upload and processing
- Real-time Chat: WebSocket-based messaging
- Offline Support: Basic offline functionality
- Dark/Light Theme: Automatic theme switching
app/ # Expo Router screens (file-based routing)
βββ loginPage.tsx # Authentication screen
βββ homePage.tsx # Main dashboard
βββ aiAssitant.tsx # AI chat interface
βββ ...
components/ # Reusable UI components
βββ common/ # Shared components
βββ auth/ # Authentication components
βββ ui/ # Base UI components
βββ ...
services/ # API services & business logic
βββ auth.service.ts # Authentication service
βββ api.config.ts # API configuration
βββ ...
types/ # TypeScript definitions
context/ # React Context providers
hooks/ # Custom React hooks
# Switch between environments
npm run env:android # Android Emulator
npm run env:ios # iOS Simulator
npm run env:device # Physical Device
npm run env:local # Local developmentnpm start # Start Expo dev server
npm run detect-network # Auto-detect IP and port
npm run android # Run on Android
npm run ios # Run on iOS
npm run web # Run on web
npm run lint # Run ESLint
npm run test # Run tests
npm run test:watch # Run tests in watch modeThe app supports role-based authentication:
- Admin: Full system access
- Analyst: Limited access to analysis features
Admin: admin@rag.com / Admin@123!!
Analyst: analyst@rag.com / Analyst@123!!
Mock: demo@mock.com / 123456
- Framework: Expo React Native
- Language: TypeScript
- Navigation: Expo Router (file-based)
- Styling: NativeWind (Tailwind CSS)
- State Management: React Context + Hooks
- HTTP Client: Axios
- Storage: AsyncStorage
- Icons: Expo Vector Icons
- Testing: Jest + React Native Testing Library
{
"expo": "~54.0.33",
"react-native": "0.81.5",
"expo-router": "~6.0.23",
"nativewind": "^4.2.1",
"@react-navigation/native": "^7.1.28",
"axios": "^1.13.6",
"@react-native-async-storage/async-storage": "2.2.0"
}-
"Network Error" when connecting to backend
- Check if backend is running on port 5000
- Use correct IP for your platform (see Network Configuration)
- Check firewall settings
-
"Metro bundler failed to start"
npx expo start --clear
-
"Unable to resolve module"
rm -rf node_modules npm install
-
Android build issues
cd android ./gradlew clean cd .. npx expo run:android
Enable debug logging:
# Set in .env file
EXPO_PUBLIC_DEBUG_MODE=true
EXPO_PUBLIC_LOG_LEVEL=debugEdit .env file and update the backend URL:
EXPO_PUBLIC_API_URL=https://your-deployed-backend-url.com# Install dependencies
npm install
# Start development server
npm start
# Run on specific platform
npm run android # Android
npm run ios # iOS
npm run web # WebThe app uses a single .env file for configuration. Update the following variables:
- EXPO_PUBLIC_API_URL: Your backend API URL
- EXPO_PUBLIC_ENVIRONMENT: production/development
- EXPO_PUBLIC_DEBUG_MODE: true/false for debugging
- Network Setup Guide - Detailed network configuration
- Expo Documentation
- React Native Documentation
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
This project is part of the RAG Financial Analysis System.
Need Help? Check the troubleshooting guide or contact the development team.