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.
- 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 alternative partnered healthy products.
- Browser Extension: Integrate app features seamlessly into your online shopping experience.
Additionally, the app includes a Recipe Chatbot for personalized recipe recommendations and a Scan History feature to track previously scanned products.
-
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. -
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.
-
Django Server: Serves as the central backend server responsible for data cleaning, user authentication, integration with the Gemini API, and interaction with Google Firebase services.
-
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.
-
Gemini API: Processes the raw data obtained from the OpenFoodFacts API, categorizing nutrients into positive and negative groups and identifying any health risks associated with the product.
-
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.
-
Flutter App: Cross-platform mobile application enabling users to scan barcodes for offline shopping, access features such as a recipe chatbot, scan history, and a marketplace for healthy products.
-
Browser Extension: Extends the features of the Flutter app to the user's online shopping experience, allowing barcode scanning, product lookups, and health risk assessments directly within the browser.
Follow these steps to set up and run the Mivro software on your local machine, or you can watch the demo video.
-
Clone the repository to your local machine:
git clone https://github.com/SpaceTesla/Mivro.git
-
Navigate to the project directory:
cd Mivro
-
Create a virtual environment (optional but recommended):
python -m venv .venv
-
Activate the virtual environment:
- Windows:
.venv\Scripts\activate
- macOS and Linux:
source .venv/bin/activate
- Windows:
-
Install the project dependencies:
pip install -r requirements.txt
-
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" }
-
-
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.
- Open Chrome and go to
-
Launch the application by clicking the run button in the top right of VS Code, or execute:
python python-app/app.py
-
Using the Browser Extension:
-
Navigate to any of the following supported websites:
-
Select and open any product. The browser extension will appear on the right side of the screen. Click on the extension icon to access detailed information.
-
-
For Contributors:
- To apply changes made to the browser extension, visit
chrome://extensions
, click the "Update" button at the top left, and reload the product page to see the updates.
- To apply changes made to the browser extension, visit
This project is licensed under the MIT License.