Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.
/ Mivro Public archive

Cross-Platform App and Web Extension for Personalized Product Profiling

License

Notifications You must be signed in to change notification settings

SpaceTesla/Mivro

Repository files navigation

Project Logo

Project Archived

This repository has been archived and is no longer actively maintained here. The project has been split and is now maintained under the 1Mind Labs organization.

For the latest updates and continued development, please visit the respective repositories within the 1Mind Labs organization.

Project Description

The app supports barcode scanning for foods, drinks, cosmetics, medicines, and pet foods. It provides detailed ingredient information, categorizes nutrients into positive and negative (either generally or based on user-specific health data), identifies associated health risks, and suggests alternatives using an AI recommendation engine.

Key Features

  • Search Engine: Easily find products without barcode scanning, with upcoming support for image and live product recognition.
  • Meal Tracker: Monitor your daily nutritional intake by scanning product barcodes, allowing you to easily track and manage your meals.
  • Marketplace: Discover and purchase for healthier alternatives from our trusted partners.
  • Browser Extension: Integrate app features seamlessly into your online shopping experience.

Additionally, the app includes a Recipe Chatbot for personalized recipe recommendations and an Account Activity feature to track your scan history, searches, and payments.

System Architecture

System Architecture


  1. Barcode Scan: Utilizes the zxing_flutter library to capture barcode input from the user via the Flutter app. The scanned barcode is then sent to the Django server for further processing.

  2. Text Search: Accepts text input from the user through the Flutter app for product lookup. This input is forwarded to the Django server to query the Firestore database for relevant product information.

  3. Django Server: Serves as the central backend server responsible for user authentication, data cleaning, integration with the Gemini API, and interaction with Google Firebase services.

  4. OpenFoodFacts API: Fetches raw, detailed information about products based on barcode or text search inputs. This API provides comprehensive ingredient and nutritional data, including metadata such as name, brand, and more.

  5. Gemini API: Analyzes data from the OpenFoodFacts API, sorting nutrients into positive and negative categories, flagging potential health risks, and offering product recommendations.

  6. Firestore Database: Stores processed product information, facilitating quick lookups for both the browser extension and the Flutter app. If no barcode is detected, it searches the database for relevant details.

  7. Flutter App: Cross-platform mobile application enabling users to scan barcodes for offline shopping, access features such as a recipe chatbot, meal tracker for monitoring nutritional intake, and a marketplace for healthy products.

  8. Browser Extension: Extends the features of the Flutter app to the user's online shopping experience, allowing product lookups using our search engine directly within the browser.

Getting Started

Follow these steps to set up and run the Mivro software on your local machine, or you can watch the demo video.

Prerequisites

Installation

Python Server

  1. Fork the repository:

    • Go to the Mivro repository on GitHub and click the "Fork" button at the top right corner to create a copy under your GitHub account.
  2. Clone the repository to your local machine:

    git clone https://github.com/<your-username>/Mivro.git
  3. Navigate to the project directory:

    cd Mivro
  4. Create a virtual environment (optional but recommended):

    python -m venv .venv
  5. Activate the virtual environment:

    • Windows:
      .venv\Scripts\activate
    • macOS and Linux:
      source .venv/bin/activate
  6. Install the project dependencies:

    pip install -r requirements.txt
  7. Set up the configuration files:

    • Create a .env file in the project root directory with the following template:

      FLASK_SECRET_KEY=your_secret_key
      GEMINI_API_KEY=your_gemini_api_key
    • Create a firebase-adminsdk.json file in the project root directory with the following template:

      {
        "type": "service_account",
        "project_id": "your_project_id",
        "private_key_id": "your_private_key_id",
        "private_key": "-----BEGIN PRIVATE KEY-----\nYOUR_PRIVATE_KEY\n-----END PRIVATE KEY-----\n",
        "client_email": "your_client_email",
        "client_id": "your_client_id",
        "auth_uri": "https://accounts.google.com/o/oauth2/auth",
        "token_uri": "https://oauth2.googleapis.com/token",
        "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
        "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/your_client_email",
        "universe_domain": "googleapis.com"
      }
  8. Run the Python application:

    python python-app/app.py

Browser Extension

  1. Set up the Chrome extension:

    • Open Chrome and go to chrome://extensions.
    • Enable "Developer mode" (top right corner).
    • Click "Load unpacked" (top left corner).
    • Select the browser-extension folder in the Mivro repository.
  2. Using the Browser Extension:

Flutter Application

  1. Navigate to the flutter-app directory:

    cd flutter-app
  2. Get Flutter dependencies:

    flutter pub get
  3. Prepare your device:

    • Ensure an Android device is connected and debugging is enabled, or start an Android emulator.
  4. Run the Flutter app:

    flutter run

License

This project is licensed under the MIT License.

Authors

Areeb Ahmed - Shivansh Karan - Shashwat Kumar - Rishi Chirchi