This project aims to develop a mobile application for analyzing the contents of supermarket products to identify minerals or components that may increase the risk of kidney stones. Users can scan product barcodes using a barcode reader to determine the risk level.
- Barcode Scanning: Allows users to scan product barcodes using the camera.
- OpenFoodFacts API Integration: Retrieves product content information using barcode data.
- Kidney Stone Risk Analysis: Identifies components in the product that could increase kidney stone risk.
- User-Friendly Interface: Provides a clean and modern design for optimal user experience.
- Information Screen: Displays results after scanning a barcode while keeping the camera running in the background for further scans.
- Programming Language: Kotlin
- Development Environment: Android Studio
- Libraries:
- ZXing: For barcode scanning.
- Retrofit: For making requests to the OpenFoodFacts API.
- Gson: For JSON data parsing.
- Glide: For loading product images from the API.
- ViewModel and LiveData: For MVVM architecture support.
- Room: For local database (optional, to store previously scanned product information).
- OpenFoodFacts: Provides data on product barcodes and contents.
- Data: Handles data retrieval from the API and local database.
ApiService.kt: Communicates with the OpenFoodFacts API.ProductRepository.kt: Abstracts data sources.
- Domain: Business logic and use cases.
- Example:
AnalyzeProductUseCase.kt
- Example:
- UI: Contains screens and components presented to the user.
- Barcode scanning screen
- Result information screen
-
User Data Privacy:
- No user data is stored on servers.
- All analyses are performed on the user's device.
-
Minimal Dependencies:
- No Firebase or complex/paid infrastructure is used, relying solely on APIs and local solutions.
-
Performance:
- Ensures smooth app performance even when the camera is active.
- Avoids unnecessary API calls.
-
Error Handling:
- Provides accurate error messages for API failures.
- Displays user-friendly notifications when a barcode cannot be recognized.
-
Accessibility:
- Designed to adhere to Android accessibility standards.
- Android Studio Arctic Fox or later
- Minimum Android SDK 23 (Marshmallow)
-
Clone the project:
git clone https://github.com/baranselklnc/KidneyStone.git
-
Open the project in Android Studio.
-
Add the required API keys to the
local.propertiesfile:OPENAI_API_KEY=your_openai_api_key_here -
Build and run the application.
- Launch the application.
- Accept the camera permission request.
- Scan a barcode.
- View the risk analysis result screen.
- Tap the information screen to scan a new barcode.
- Planned Features:
- Product history and favorites.
- Personalized dietary recommendations for users.
- Multi-language support.
To contribute, please create a pull request. You can ask questions under the issues section.
This project is licensed under the MIT License.
