Mobile application client built with React Native and Expo.
- React Native
- Expo
- TypeScript
- Firebase (for configuration)
npm installCreate a firebaseConfig.js file in the Client folder (or copy from config.example.ts):
export const firebaseConfig = {
apiKey: "your-api-key",
authDomain: "your-auth-domain",
projectId: "your-project-id",
storageBucket: "your-storage-bucket",
messagingSenderId: "your-messaging-sender-id",
appId: "your-app-id"
};Ask your team lead for the actual Firebase credentials.
Important: You need to update the API URL to point to your local machine's IP address.
-
Find your computer's IP address:
- Windows: Run
ipconfigin terminal, look for "IPv4 Address" - Mac/Linux: Run
ifconfig, look for your network interface
- Windows: Run
-
Edit
Client/config/api.ts:
const DEFAULT_BASE = __DEV__
? (isWeb ? 'http://localhost:4000' : 'http://YOUR_IP_ADDRESS:4000') // Replace with your IP
: 'https://your-production-api.com';Example: 'http://192.168.1.100:4000'
Before starting the client, make sure the backend service is running:
cd ../Service
npm run devnpx expo start- iOS Simulator: Press
i - Android Emulator: Press
a - Web: Press
w - Physical Device: Scan QR code with Expo Go app
- Your phone/emulator must be on the same WiFi network as your computer running the service
- Each team member runs their own backend server locally - you don't need to connect to each other's servers
- All team members connect to the same Azure database (shared data)
- If using a physical device, make sure your firewall allows connections on port 4000
- If the API isn't connecting, double-check your IP address in
config/api.ts
The app uses different API URLs based on the platform:
- Web: Uses
http://localhost:4000 - Mobile: Uses your computer's IP address (e.g.,
http://192.168.1.100:4000)
- Check that the Service is running (
npm run devin Service folder) - Verify your IP address in
config/api.tsmatches your current IP - Make sure your phone and computer are on the same WiFi
- Try restarting the Expo dev server
- Clear Expo cache:
npx expo start -c
- Make sure
firebaseConfig.jsexists and has valid credentials - Ask team lead for the Firebase configuration if you don't have it