This is the React Native frontend for the FoodRemedy platform.
It uses Expo for fast development and cross-platform compatibility.
Make sure you have:
- Node.js installed
- Expo CLI:
npm install -g expo-cli
- Install the Expo Go app on your iOS or Android device to preview the app via QR code.
- Navigate to the mobile-app folder
cd mobile-app - Install Dependencies (First Time Only)
npm install
- Start the App
npm start
It is reccomended to use your phone for best compatability. This works for both android and iOS.
β οΈ Make sure your phone is on the same Wi-Fi network if scanning QR
Choose one of the following:
- π± Physical Device:
- Scan the QR code with the Expo Go app (Android)
- Or use your iPhone Camera app (iOS)
- π» Simulators:
- Press
ito open in iOS Simulator (Mac only) - Press
ato open in Android Emulator (if available)
- Press
βββββββββββββββββββββββββββ
β βββββ βββββββββ β βββββ β
β β β βββββββββββ β β β
β βββββ ββββ ββββββ βββββ β
βββββββββ βββ βββ βββββββββ
ββ ββββββββββββββ βββββββββ
ββ ββββββββββββββββββββββ β
ββββ ββββββ ββββ β βββββ ββ
β βββ ββ ββββββββββββββββ β
βββββββββ β ββ β βββ ββββ
β βββββ ββββββ β βββ βββ β
β β β β βββ βββ β β ββββ
β βββββ ββββββββ ββββββ β
βββββββββββββββββββββββββββ
βΊ Metro waiting on exp://192.165.0.146:8081
βΊ Scan the QR code above with Expo Go (Android) or the Camera app (iOS)
βΊ Using Expo Go
βΊ Press s β switch to development build
βΊ Press a β open Android
βΊ Press w β open web
Logs for your project will appear below. Press Ctrl+C to exit.You can create a new account for the app using your own email and password.
This is handled securly by Google Firebase Authentication, and as such, no one in the project has access to your password. Only your email. Regardless, you need to manage your own security.
Expo reads public environment variables from .env:
EXPO_PUBLIC_API_BASE_URLβ Backend base URL (e.g.http://127.0.0.1:8000)EXPO_PUBLIC_API_SOURCEβbackend(default via auto) orfirestoreto force Firestore-only data access.EXPO_PUBLIC_RECOMMENDATION_SOURCEβbackend(default) orfirestoreto switch recommendation logic.
Example .env:
EXPO_PUBLIC_API_BASE_URL=http://127.0.0.1:8000
EXPO_PUBLIC_API_SOURCE=firestore
EXPO_PUBLIC_RECOMMENDATION_SOURCE=firestoreWhen EXPO_PUBLIC_RECOMMENDATION_SOURCE=firestore:
- The app computes suitability and recommendations locally via
services/recommendations.ts. - Candidate products are fetched from Firestore
PRODUCTSusing category-based queries (seeservices/database/products/getCandidatesForRecommendations.ts). - Ensure
PRODUCTSdocuments havecategories: string[]and create indexes when Firestore prompts forarray-contains-anyqueries.
Backend mode remains available by default. The app will use server-provided alternatives from POST /scan/alternatives and only fall back to Firestore when needed.
Begin contributing to the project.
Now read: