AI-powered mobile app for instant food nutrition analysis
An intelligent food analyzer that uses Google Gemini AI to provide comprehensive nutrition insights from photos, gallery images, or text input. Built with React Native and Expo.
- 📸 Camera Integration - Capture food photos instantly
- 🖼️ Gallery Upload - Analyze existing photos
- ✍️ Text Input - Search by food name
- 🤖 AI-Powered - Google Gemini AI recognition
- 📊 Nutrition Facts - Detailed breakdown of calories, macros, and micronutrients
- 💯 Health Score - 0-100 rating system
- 💡 Smart Insights - Personalized health recommendations
- 🔄 Alternatives - Healthier food suggestions
- 🎨 Modern UI - Clean interface with TailwindCSS
- Node.js (v16+)
- Expo Go app on your mobile device
- Google Gemini API Key
-
Clone the repository
git clone https://github.com/tejasnasre/foodlens.git cd foodlens -
Install dependencies
npm install
-
Start the development server
npm start
-
Run the app
- Scan the QR code with Expo Go (Android) or Camera app (iOS)
- Or press
afor Android emulator /ifor iOS simulator
- Visit Google AI Studio
- Sign in with your Google account
- Create a new API key
- Copy the key for app configuration
On first launch, you'll be prompted to enter your Gemini API key. The key is stored securely on your device.
Choose one of three methods:
📷 Camera
- Tap "Take Photo"
- Grant camera permissions
- Capture your food
- View instant results
🖼️ Gallery
- Tap "Gallery"
- Select a food image
- Wait for AI analysis
⌨️ Text Input
- Type the food name
- Tap "Analyze"
- Get nutrition facts
| Score | Status | Description |
|---|---|---|
| 71-100 | ✅ Healthy | Rich in nutrients, low in harmful components |
| 41-70 | Okay in moderation, watch portion sizes | |
| 0-40 | ❌ Unhealthy | High in calories/sugar/fat, consider alternatives |
- Framework: React Native with Expo
- Language: TypeScript
- Styling: TailwindCSS (NativeWind)
- AI: Google Gemini AI
- Navigation: Expo Router
- Storage: AsyncStorage
- Image Handling: Expo Image Picker & Camera
foodlens/
├── app/ # App screens (Expo Router)
│ ├── index.tsx # Home screen
│ ├── history.tsx # Analysis history
│ ├── settings.tsx # App settings
│ └── _layout.tsx # Root layout
├── components/ # Reusable components
├── services/ # API services (Gemini AI)
├── utils/ # Helper functions
├── types/ # TypeScript types
├── config/ # App configuration
└── assets/ # Images and static files
npm start # Start Expo development server
npm run android # Run on Android device/emulator
npm run ios # Run on iOS device/simulator
npm run web # Run on web browser
npm run lint # Run ESLint checks- ✓ Check internet connection
- ✓ Verify API key is valid
- ✓ Ensure image is clear and contains food
- ✓ Grant camera permissions in device settings
- ✓ Restart the app
- ✓ Check device camera functionality
- ✓ Get a new key from Google AI Studio
- ✓ Ensure the entire key is copied correctly
- ✓ Check for extra spaces or characters
- 🔒 API keys stored locally on device
- 🚫 No external servers except Google Gemini
- 🖼️ Images processed securely and not stored
- 📱 All data remains on your device
MIT License - see LICENSE for details
Tejas Nasre
- GitHub: @tejasnasre
Built with Google Gemini AI ✨