An AI-powered Smart Fridge Assistant that helps you manage your fridge inventory, discover recipes, and track nutritionβall with offline AI capabilities.
FridgePal combines computer vision, natural language processing, and mobile-first design to transform how you manage food and plan meals.
Check out the demo of FridgePal in action: Watch Demo
- Smart Item Detection - Automatically detect and catalog items by taking photos of your fridge
- Inventory Management - Track food items, quantities, and expiration dates
- Smart Recipe Discovery - Get personalized recipe recommendations based on what you have
- Nutrition Tracking - Monitor daily calorie and macro intake
- Expiry Alerts - Get notified before items expire
- Food Recognition - Powered by YOLOv8 object detection and Google Gemini AI
- Profile Management - Set dietary goals, preferences, and health metrics
- Calorie & Macro Tracking - Monitor daily nutritional intake with detailed breakdowns
- Meal Planning - Plan meals and track what you've prepared
- Recipe Customization - Save favorite recipes and view personalized recommendations
- Water Intake Tracking - Stay hydrated with daily water reminders
- React Native (v0.83.1) - Cross-platform mobile development
- Redux Toolkit - State management
- React Navigation - Navigation and routing
- Supabase Client - Backend authentication and database
- Google Gemini AI - Recipe generation and food insights
- FastAPI - Modern Python web framework
- YOLOv8 (Ultralytics) - Object detection for food items
- Tesseract OCR - Optical character recognition for nutrition labels
- PyTorch - Deep learning inference
- OpenCV - Image processing
- Supabase (PostgreSQL) - User auth, profiles, and data storage
- iOS - Native iOS app with Swift integration
- Android - Native Android with React Native bridge
FridgePal/
βββ frontend/
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Screen components (Auth, Home, Scanner, etc.)
β β βββ services/ # API and service integrations
β β βββ hooks/ # Custom React hooks
β β βββ config/ # Configuration (backend, supabase)
β β βββ store/ # Redux store and slices
β β βββ utils/ # Helper functions
β βββ Navigation/ # Navigation structure
β βββ package.json
β βββ tsconfig.json
βββ backend/
β βββ main.py # FastAPI application
β βββ services/
β β βββ detection.py # YOLOv8 food detection
β β βββ ocr.py # Tesseract OCR
β β βββ food_inference.py # Food classification
β β βββ __init__.py
β βββ models/ # Pydantic schemas
β βββ utils/ # Image processing utilities
β βββ requirements.txt
β βββ config.py
βββ ios/ # iOS app configuration
βββ android/ # Android app configuration
βββ supabase/
β βββ schema.sql # Database schema
βββ README.md
- Node.js (v16+) and npm
- Python (3.9+) with pip
- React Native CLI
- Xcode (for iOS development)
- Android Studio (for Android development)
- Supabase Account (or local setup)
git clone https://github.com/Pallavi-Madhu/FridgePal.git
cd FridgePalcd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Create .env file with your configuration
cp .env.example .env # If available, or create manuallyRequired Environment Variables:
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key
GOOGLE_GENAI_KEY=your_gemini_api_key# Install Node dependencies
npm install
# Create .env or use react-native-dotenv
# Configure your backend URL and Supabase credentials- Create a Supabase project at supabase.com
- Run the SQL schema:
# Copy contents of supabase/schema.sql into Supabase SQL Editor
# Or use Supabase CLI
supabase db pushcd backend
python -m uvicorn main:app --reload --port 8000The API will be available at http://localhost:8000
API Documentation: http://localhost:8000/docs
npm startnpm run androidnpm run iosPOST /detect- Detect food items in image- Input: Base64 encoded image
- Output: Detected items with bounding boxes and confidence scores
POST /ocr- Extract text from nutrition labels- Input: Image region
- Output: Recognized text
POST /food-classify- Classify and get nutritional info- Input: Detected food items
- Output: Food names with nutritional data
POST /generate-recipes- Get recipe recommendations- Input: Available ingredients
- Output: Recipe suggestions with instructions
- Auth - Sign in and registration
- Home - Dashboard with fridge overview
- Scanner - Camera interface for item detection
- Recipe - Recipe discovery and saved recipes
- CalTracker - Nutrition and calorie tracking
- Profile - User settings and preferences
userSlice- User authentication and profilefridgeSlice- Fridge inventory managementrecipeSlice- Recipe managementnutritionSlice- Nutrition tracking
- DetectionService - YOLOv8 model inference
- OCRService - Tesseract OCR wrapper
- FoodInferenceEngine - Food classification and nutrition lookup
- ImageUtils - Image cropping and preprocessing
- profiles - User profiles with health goals
- fridge_items - Tracked food items with expiry dates
- recipes - Recipe database with ingredients and instructions
- saved_recipes - User's saved recipes (junction table)
- user_meals - Tracked meals with dates
- nutrition_logs - Daily nutrition data
See supabase/schema.sql for complete schema.
npm test # Frontend tests
cd backend && pytest # Backend testsnpm run lint- Use TypeScript in React components where possible
- Follow Redux pattern for state management
- Use custom hooks for reusable logic
- Implement error handling in API calls
- Add PropTypes or TypeScript types for components
- Image Capture - React Native Vision Camera
- Preprocessing - OpenCV for normalization
- Detection - YOLOv8 for food identification
- OCR - Tesseract for nutrition label reading
- Classification - Fine-tuned model for food names
- Food Recognition - YOLOv8 trained on food datasets
- Recipe Generation - Google Gemini for contextual recipes
- Nutrition Data - Database lookup + AI enhancement
- Personalization - Redux-based user preferences
- Model paths
- API endpoints
- Database connections
- CORS settings
backend.js- Backend API URLsupabase.js- Supabase credentials and settings
- Deploy to Heroku, AWS Lambda, or Docker
- Set environment variables for production
- Configure database URLs
- Build APK for Android:
./gradlew build - Build IPA for iOS using Xcode
- Distribute via app stores or TestFlight
- Fork the repository
- Create a 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 a Pull Request
- YOLOv8 detection performance depends on lighting conditions
- OCR accuracy varies with label quality
- Offline mode requires pre-downloaded models
- π Offline mode with cached recipes
- π€ Machine learning for personalized recommendations
- π± Widget support for quick inventory checks
- π Multi-language support
- π½οΈ Integration with meal planning services
- π Advanced nutrition analytics
- Model loading errors: Ensure YOLOv8 model is downloaded
- CORS errors: Check frontend URL in CORS middleware
- Database connection: Verify Supabase credentials in .env
- Camera permissions: Ensure app has camera access granted
- Image processing slow: Reduce image resolution
- Supabase auth errors: Check API keys and authentication config
This project is licensed under the MIT License - see LICENSE file for details.
For issues, questions, or suggestions:
- Open an issue on GitHub
- Contact the development team
- YOLOv8 by Ultralytics
- Google Gemini AI
- Supabase for backend services
- React Native community
Made with β€οΈ by the FridgePal Team