A Flutter application that helps users track their nutritional intake by analyzing food product labels and meals using AI, built with clean MVVM architecture.
- πΈ Scan product labels and food items using your device's camera
- π AI-powered nutrition analysis using Google's Gemini API
- π Track daily nutrient intake with detailed breakdowns
- π View historical food consumption data
- π Visual representations of macronutrient distribution
- β‘ Real-time nutritional insights and recommendations
- π§© Built with MVVM architecture for clean, maintainable code
- π Provider for robust state management
FoodScanAI_Recording.mp4
Food Scan AI follows the MVVM (Model-View-ViewModel) architecture pattern:
- Models: Data structures and business logic
- Views: UI components (screens and widgets)
- ViewModels: Intermediaries that handle UI logic and data operations
- Repositories: Abstractions for data sources (AI API, local storage)
lib/
βββ core/
β βββ constants/ # App-wide constants
βββ config/
β βββ env_config.dart # Environment configuration
βββ models/ # Data models
βββ repositories/ # Data access layer with interfaces
βββ theme/ # App theme definitions
βββ viewmodels/ # ViewModels for business logic
βββ views/ # UI components
β βββ screens/ # Full page views
β βββ widgets/ # Reusable UI components
βββ main.dart # Application entry point
- Flutter SDK (>=3.4.3)
- Dart SDK
- Google Gemini API key
- Clone the repository
git clone https://github.com/nikhileshmeher0204/read_the_label.git- Navigate to the project directory
cd read_the_label- Create a .env file in the root directory and add your Gemini API key:
GEMINI_API_KEY=your_api_key_here- Install dependencies
flutter pub get- Run the app
flutter runThis application uses Provider for state management:
- BaseViewModel: Foundation class for all ViewModels
- ViewModels:
- UiViewModel: Handles UI state and navigation
- ProductAnalysisViewModel: Manages product scanning and analysis
- MealAnalysisViewModel: Handles food image analysis
- DailyIntakeViewModel: Controls daily consumption tracking
- Flutter SDK (>=3.4.3)
- Dart SDK
- Google Generative AI (Gemini) for AI-powered analysis
- Provider for state management
- SharedPreferences for local storage
- Material Design 3 with custom theme
- Various Flutter packages:
image_pickerfor camera integrationflutter_dotenvfor environment variablesfl_chartfor data visualizationrivefor animations
- Spring Boot backend integration for cross-device synchronization
- User authentication and profiles
- Enhanced nutritional insights with AI recommendations
- Social sharing features
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Generative AI for the Gemini API
- Flutter team for the amazing framework