-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
featureNew functionality or major improvementNew functionality or major improvementhelp wantedExtra attention is neededExtra attention is neededplatform: desktopJava desktop appJava desktop appplatform: mobile.NET MAUI app.NET MAUI appplatform: webBlazor web client or admin panelBlazor web client or admin panelpriority: lowNice to have or minor taskNice to have or minor taskstatus: todoTask is defined but not yet startedTask is defined but not yet started
Milestone
Description
Milestone: Milestone 5: Infrastructure & Tools
Category: 5.5 Barcode Scanner
Task: Implement a system for looking up food items in a database (e.g., OpenFoodFacts) after scanning their barcode.
Description
This task involves connecting the mobile app to a food database (such as OpenFoodFacts) after a user scans a barcode. The app should query the database using the barcode to retrieve relevant information about the food item (e.g., name, calories, macronutrients). If the barcode is not found in the database, the user should be notified, and the option to manually add the item should be provided.
Subtasks:
- Database/API Setup:
- Integrate the OpenFoodFacts API (or similar database) for food item lookup based on barcode
- Ensure the app can handle responses from the API, including success and error messages
- Handle different barcode formats (e.g., EAN, UPC)
- Food Item Data Retrieval:
- Query the OpenFoodFacts database/API with the scanned barcode
- Retrieve relevant food item details, including:
- Name
- Calories
- Macronutrients (carbs, fats, protein)
- Ingredients (if available)
- Serving size
- Ensure proper error handling if no match is found (e.g., display a message like “Item not found”)
- UI and UX:
- Display the fetched food details to the user in a clear, readable format
- Allow the user to add the fetched food item to their meal log with an option to edit details
- Provide an option to manually add missing items if the barcode is not found in the database
- Error Handling:
- Provide a fallback if the food item cannot be found (e.g., show an error message or suggest a manual entry)
- Ensure proper error handling for API failures or connectivity issues
- Testing:
- Test the API integration with a variety of barcodes and ensure accurate lookups
- Validate that the user interface handles missing or incorrect barcodes gracefully
- Test error cases (e.g., API not available, no match found)
- Documentation:
- Document the food item lookup process, including API usage, error handling, and UI elements
- Provide instructions for users on how to manually add missing food items
Technical Considerations:
- Use the OpenFoodFacts API or another reliable food database API for lookups
- Ensure that the barcode scanning system integrates seamlessly with the lookup process
- Handle error cases where the barcode is not found in the database
- Ensure a smooth user experience, even when items are missing from the database
Acceptance Criteria:
- The app can look up food items in the database based on scanned barcodes
- Food item details (e.g., name, calories, macronutrients) are correctly displayed to the user
- The user can add the food item to their meal log after it is fetched from the database
- The user can manually add items if the barcode is not found in the database
- The app gracefully handles errors (e.g., no match found, API failure)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew functionality or major improvementNew functionality or major improvementhelp wantedExtra attention is neededExtra attention is neededplatform: desktopJava desktop appJava desktop appplatform: mobile.NET MAUI app.NET MAUI appplatform: webBlazor web client or admin panelBlazor web client or admin panelpriority: lowNice to have or minor taskNice to have or minor taskstatus: todoTask is defined but not yet startedTask is defined but not yet started
Projects
Status
No status