Skip to content

fparismusic/FridgeWizard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ§™β€β™‚οΈ FridgeWizard

Magic in tracking. Mastery in planning ✨

A modern Flutter application for smart fridge management and recipe discovery. Track your ingredients, get expiration reminders, and find recipes based on what you have!

Flutter Firebase Gemini AI License

Developed by: Matteo Delogu Β· Filippo Paris Β· Alberto Brignola


Table of Contents

  1. πŸ“œ Overview
  2. πŸ“± Key Features
  3. πŸš€ Getting Started
  4. πŸ›  Tech Stack
  5. πŸ“ Project Structure
  6. 🌍 API Credits & Attribution
  7. πŸ” Security & Privacy
  8. πŸ“Έ Visual Preview
  9. πŸ“Š Project Statistics
  10. πŸ“„ License & Usage Terms

πŸ“œ Overview

FridgeWizard is a smart inventory management app designed to help users reduce food waste and shop more consciously. By streamlining product registration via barcode scanning, the app tracks quantities and expiration dates, sending timely alerts for items nearing shelf life.

Beyond simple tracking, FridgeWizard transforms inventory into inspiration: it suggests recipes based on expiring ingredients and syncs meal plans directly to the device calendar. With personalized statistics on consumption habits and a customizable user profile, FridgeWizard turns pantry management into an efficient, zero-waste routine.

πŸ“± Key Features

🏠 Smart Fridge Management

  • Manual Entry: Add products manually with all details
  • Barcode Scanning: Scan product barcodes for instant information using OpenFoodFacts API
  • Expiration Tracking: Dynamic color-coded alerts for expiring items
  • AI Translation: Automatic product name translation and generic extraction via Gemini AI
  • Category Classification: Smart ingredient categorization with AI-powered recognition
  • Detailed View: Edit, update, or delete products with ease
  • Customizable Alerts: User-defined expiration warning periods (1-14 days)

πŸ” Recipe Discovery

  • Search by Name: Find recipes using keywords from Spoonacular API
  • Search by Ingredients: Get recipe suggestions based on your fridge contents
  • Smart Matching: See how many ingredients you have vs. need for each recipe
  • Detailed Instructions: Step-by-step cooking guides with images and timing
  • Nutritional Information: Servings, cooking time, and ingredient lists

πŸ“… Meal Planning

  • Recipe Calendar: Plan your meals chronologically
  • Shopping List: Automatically generated from planned recipes
  • Smart Sync: Ingredients added to fridge are removed from shopping list
  • Quick Add: Add shopping list items directly to fridge with pre-filled forms

πŸ“Š User Profile & Settings

  • Basic Statistic Dashboard: Saved recipes and estimated savings (will be incremented)
  • Custom Notifications: Push notifications for expiring items
  • Configurable Reminders: Set expiration warnings (1 to 14 days before)
  • Avatar Selection: Choose from 6 unique monster-themed avatars
  • User Profiles: Sync data across devices with Firebase Authentication

βš™οΈ Personalization

  • Dynamic Color Coding: Product cards change color based on expiration proximity
  • Theme Support: Automatic dark/light mode switching (In Development)
  • User-Specific Settings: Personalized notification preferences per account

πŸ€– AI Assistant (Coming Soon)

  • Natural language product addition
  • Conversational recipe search
  • Smart suggestions based on fridge contents

πŸš€ Getting Started

Prerequisites

  • Flutter SDK: 3.0 or higher (Install Guide)
  • Xcode (for iOS development) or Android Studio (for Android)
  • Firebase Project: Set up at Firebase Console
  • API Keys (all free tier available):

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/Project_App_Ricette_DIMA.git
    cd Project_App_Ricette_DIMA/app_ricette
  2. Install dependencies

    flutter pub get
  3. Configure Firebase

    • Create a new Firebase project at Firebase Console
    • Enable Authentication (Email/Password & Google)
    • Enable Cloud Firestore database
    • Download configuration files:
      • google-services.json (Android) β†’ place in android/app/
      • GoogleService-Info.plist (iOS) β†’ place in ios/Runner/
    • or use the FlutterFire CLI:
      dart pub global activate flutterfire_cli
      flutterfire configure
  4. Set up API Keys

    Create .env:

    GEMINI_API_KEY=your_gemini_api_key_here
    GEMINI_MODEL=gemini-2.5-flash
    
     SPOONACULAR_API_KEY=your_spoonacular_api_key_here

    ⚠️ Note: Never commit API keys to version control. Add .env to .gitignore

  5. Run the app

    # Check connected devices
    flutter devices
    
    # Run
    flutter run

πŸ›  Tech Stack

Frontend

  • Flutter/Dart - Cross-platform UI framework (iOS & Android)
  • Cupertino Widgets - Native iOS-style design components

Backend & Services

  • Firebase Authentication - Email/Password and Google Sign-In with OAuth 2.0
  • Cloud Firestore - Real-time NoSQL database for user data synchronization
  • Google Gemini AI - Product name translation, generic extraction, and categorization
  • Spoonacular API - Comprehensive recipe database (640,000+ recipes)
  • OpenFoodFacts API - Open product barcode database (2M+ products)

Key Packages

dependencies:
  # Firebase & Authentication
  firebase_core: ^2.24.2
  firebase_auth: ^4.16.0
  cloud_firestore: ^4.14.0
  google_sign_in: ^6.2.1
  
  # Barcode & Camera
  mobile_scanner: ^5.2.3
  
  # Networking
  http: ^1.1.0

 # Permissions
  permission_handler: ^11.3.0
  
  # Local Storage
  shared_preferences: ^2.2.2

  # Notifications
  flutter_local_notifications: ^18.0.1
  timezone: ^0.9.4
  workmanager: ^0.9.0

  # Calendar
  device_calendar: ^4.3.2

  # UI & Animations
  lottie: ^3.1.0

  # Testing
  fake_cloud_firestore: ^3.0.0
  firebase_auth_mocks: ^0.14.0 
  
  # AI Integration
  google_generative_ai: ^0.4.6

πŸ“ Project Structure

app_ricette/
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ models/                # Data models
β”‚   β”‚   β”œβ”€β”€ ingredient.dart       # Product/ingredient model
β”‚   β”‚   β”œβ”€β”€ recipe.dart           # Recipe data model
β”‚   β”‚   β”œβ”€β”€ planned_meal.dart     # Meal planning
|   |   β”œβ”€β”€ category_price.dart   # Prices categorization
β”‚   β”‚   └── category_mapper.dart  # Ingredient categorization logic
β”‚   β”‚ 
β”‚   β”‚
β”‚   β”œβ”€β”€ screens/                      # UI screens
β”‚   β”‚   β”œβ”€β”€ auth_page.dart                # Authentication state handler
β”‚   β”‚   β”œβ”€β”€ login_page.dart               # Login & registration UI
β”‚   β”‚   β”œβ”€β”€ home_page.dart                # Main fridge view with navigation
β”‚   β”‚   β”œβ”€β”€ barcode_page.dart             # Barcode scanning interface
β”‚   β”‚   β”œβ”€β”€ add_product_manual_page.dart  # Manual product entry
β”‚   β”‚   β”œβ”€β”€ product_page.dart             # Product detail & edit view
β”‚   β”‚   β”œβ”€β”€ recipes_page.dart             # Recipe search interface
β”‚   β”‚   β”œβ”€β”€ show_recipe.dart              # Recipe detail view
β”‚   β”‚   β”œβ”€β”€ missing_ingredient_page.dart  # Missing ingredients for recipes
β”‚   β”‚   β”œβ”€β”€ settings_page.dart            # User profile & settings
β”‚   β”‚   β”œβ”€β”€ saved_recipes_page.dart       # Saved recipes list
β”‚   β”‚   └── plan_page.dart                # Meal planning 
β”‚   β”‚
β”‚   β”œβ”€β”€ services/                  # Business logic & API integration
β”‚   β”‚   β”œβ”€β”€ FirestoreService.dart     # Firebase CRUD operations
β”‚   β”‚   β”œβ”€β”€ BarcodeService.dart       # OpenFoodFacts API integration
β”‚   β”‚   β”œβ”€β”€ RecipesService.dart       # Spoonacular API wrapper
β”‚   β”‚   β”œβ”€β”€ gemini_service.dart       # Gemini AI integration
β”‚   β”‚   β”œβ”€β”€ meal_planner_service.dart # Meal planning logic
β”‚   β”‚   └── notification_service.dart # Push notifications (TBD)
β”‚   β”‚
β”‚   β”œβ”€β”€ utils/                     # Utility functions & constants
|   |   β”œβ”€β”€ app_events.dart         # Notifier
β”‚   β”‚   β”œβ”€β”€ categories.dart         # Ingredient categories
β”‚   β”‚   β”œβ”€β”€ is_tablet.dart          # Device type detection
β”‚   β”‚   └── my_theme_data.dart      # Theme data & styles
β”‚   β”‚
β”‚   β”œβ”€β”€ widgets/                  # Reusable UI components
β”‚   β”‚   └── nav_bar.dart          # Bottom navigation bar
β”‚   β”‚
β”‚   β”œβ”€β”€ firebase_options.dart      # Firebase configuration
β”‚   └── main.dart                  # App entry point
β”‚
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ avatars/                   # User avatar images (6 monsters)
β”‚   β”‚   β”œβ”€β”€ alien.png
β”‚   β”‚   β”œβ”€β”€ mummy.png
β”‚   β”‚   β”œβ”€β”€ vampire.png
β”‚   β”‚   β”œβ”€β”€ wolf.png
β”‚   β”‚   β”œβ”€β”€ yeti.png
β”‚   β”‚   └── zombie.png
β”‚   └── lottie/                    # Animation files
β”‚       └── magic.json
β”‚
β”œβ”€β”€ android/                      # Android-specific configuration
β”œβ”€β”€ ios/                          # iOS-specific configuration
└── pubspec.yaml                  # Dependencies & assets

πŸ” Security & Privacy

  • βœ… Firebase Authentication for secure login (OAuth 2.0)
  • βœ… User data isolation - each user's data is separated by UID
  • βœ… No sensitive data stored locally - API keys in separate file (gitignored)
  • βœ… HTTPS-only communications - all API calls are encrypted
  • βœ… Barcode processing - handled locally on device
  • βœ… Firestore security rules - read/write only for authenticated users
  • βœ… GDPR Compliance - user data handled per regulations

🌍 API Credits & Attribution

  • Spoonacular - Recipe data and search (spoonacular.com)
    • 640,000+ recipes with detailed instructions
    • Free tier: 150 requests/day
  • OpenFoodFacts - Product barcode database (openfoodfacts.org)
    • Open database with 2M+ products
    • Completely free and open-source
  • Google Gemini - AI-powered text processing (ai.google.dev)
    • Product name translation and extraction
    • Category classification

πŸ“Έ Visual Preview

Home Screen Barcode Scanner Recipe Search
Home Barcode Search
Recipe Details Profile & Settings Login
Recipe Settings Login

πŸ“Š Project Statistics

  • Lines of Code: ~10000
  • Screens: 10+
  • API Integrations: 3 (Firebase, Spoonacular, OpenFoodFacts, Gemini)
  • Device plugins: 4 (Camera, Calendar, Notifications, SharedPreferences)
  • Supported Platforms: iOS, Android
  • Language: Dart
  • Framework: Flutter 3.0+

πŸ“„ License & Usage Terms

FridgeWizard Β© 2026 All Rights Reserved.

No part of this project may be reproduced or used without permission. This project is developed for academic purposes as part of the DIMA (Design and Implementation of Mobile Applications) course at Politecnico di Milano.

Made with ❀️ and Flutter

About

A modern Flutter application for smart fridge management and recipe discovery. Track your ingredients, get expiration reminders, and find recipes based on what you have!

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages