A cross-platform mobile app that helps households minimize food waste through barcode scanning, smart inventory management, and nutritional tracking
β¨ PRODUCTION-READY WITH AZURE INTEGRATION & REAL BARCODE SCANNING! β¨
- What's New
- Project Overview
- Core Features
- Tech Stack
- Quick Start
- Project Structure
- Scripts
- Documentation
- Contributing
- License
β
Azure Authentication - Secure user accounts with Azure authentication services
β
Azure Table Storage - Cloud-based data storage with Azure integration
β
Real Barcode Scanning - Scan actual product barcodes with your camera using mobile_scanner
β
Open Food Facts API - Automatic product info lookup from 2+ million products
β
Household Management - Multi-member household setup and nutrition tracking
β
Offline Support - Works without internet using Hive local storage
β
Shopping List - Integrated cloud-synced shopping list feature
β
Nutrition Insights - Track household nutrition needs and dietary preferences
SmartCart is a cross-platform mobile application built with Flutter that helps households reduce food waste by making smarter grocery purchasing decisions. The app integrates barcode scanning, Azure cloud storage, household nutrition tracking, and inventory management to promote responsible consumption.
- Reduce household food waste at the point of purchase
- Align grocery decisions with household nutritional needs
- Promote sustainability through awareness and insights
- Provide cloud-synced inventory management via Azure
- Enable household member management and personalized nutrition tracking
This project directly contributes to:
- SDG 12: Responsible Consumption and Production
- SDG 2: Zero Hunger
- SDG 13: Climate Action (reduced food waste = reduced emissions)
| Feature | Status | Description |
|---|---|---|
| π User Authentication | β LIVE | Azure authentication with secure login/signup |
| π· Barcode Scanning | β LIVE | Scan real product barcodes using mobile_scanner |
| π Product Database | β LIVE | Access to 2+ million products via Open Food Facts |
| βοΈ Cloud Storage | β LIVE | Azure Table Storage for cloud data persistence |
| π¦ Smart Inventory | β LIVE | Track products with expiry, quantities, categories |
| π Nutrition Data | β LIVE | Automatic nutrition info from Open Food Facts |
| π₯ Household Management | β LIVE | Multi-member household setup and tracking |
| β LIVE | Get notified about expiring products | |
| π Shopping List | β LIVE | Cloud-synced shopping list management |
| π± Offline Mode | β LIVE | Works offline with Hive local storage |
| π¨ Onboarding | β LIVE | Interactive introduction screens for new users |
| Layer | Tools & Frameworks |
|---|---|
| Language | Dart 3.0+ |
| Framework | Flutter 3.0+ |
| Authentication | Azure Authentication Services |
| Cloud Storage | Azure Table Storage |
| Local Database | Hive (NoSQL, offline storage) |
| State Management | Provider |
| Barcode API | Open Food Facts API |
| Scanner | mobile_scanner, qr_code_scanner |
| API Client | Dio (HTTP), http |
| Charts | fl_chart |
| UI | Material Design 3, Google Fonts |
| Permissions | permission_handler |
| PDF Export | pdf, printing |
| Onboarding | introduction_screen |
- Flutter SDK 3.0+ (Install Flutter)
- Dart SDK 3.0+
- VS Code or Android Studio with Flutter extensions
- Git
- Azure account with Table Storage configured
- For Android: Android SDK, emulator or physical device
- For Windows: Windows 10+ (for Windows desktop builds)
-
Clone the repository
git clone https://github.com/yourusername/smartcart.git cd smartcart -
Install dependencies
flutter pub get
Or use the setup script:
.\scripts\setup.ps1 get
-
Configure Azure credentials (Important!)
Copy-Item lib\config\azure_config.dart.template lib\config\azure_config.dartEdit
lib/config/azure_config.dartwith your Azure Storage account credentials.π See docs/SETUP_CREDENTIALS.md and docs/AZURE_SETUP.md for details.
-
Generate Hive adapters
flutter pub run build_runner build --delete-conflicting-outputs
-
Run the app
flutter run
For detailed setup instructions, see docs/QUICK_START.md.
smartcart/
βββ lib/ # Main application code
β βββ main.dart # App entry point
β βββ config/ # Configuration files
β β βββ azure_config.dart # Azure credentials (gitignored)
β β βββ azure_config.dart.template
β βββ models/ # Data models (Hive)
β β βββ product.dart
β β βββ household_member.dart
β β βββ nutrition.dart
β β βββ sustainability.dart
β βββ screens/ # UI screens
β β βββ home_screen.dart
β β βββ login_screen.dart
β β βββ register_screen.dart
β β βββ splash_screen.dart
β β βββ onboarding_screen.dart
β β βββ scanner_screen.dart
β β βββ inventory_screen.dart
β β βββ initial_inventory_setup_screen.dart
β β βββ shopping_list_screen.dart
β β βββ nutrition_screen.dart
β β βββ household_setup_screen.dart
β β βββ household_management_screen.dart
β β βββ household_nutrition_screen.dart
β β βββ product_detail_screen.dart
β βββ services/ # Business logic & APIs
β β βββ azure_auth_service.dart
β β βββ azure_table_service.dart
β β βββ barcode_service.dart
β β βββ local_storage_service.dart
β βββ providers/ # State management
β β βββ inventory_provider.dart
β β βββ nutrition_provider.dart
β βββ widgets/ # Reusable widgets
β βββ product_card.dart
β βββ household_info_card.dart
βββ assets/ # Images, icons
β βββ icons/
β βββ images/
βββ android/ # Android platform code
βββ windows/ # Windows platform code
βββ test/ # Unit & widget tests
βββ docs/ # Documentation
β βββ QUICK_START.md
β βββ BUILD_GUIDE.md
β βββ HOT_RELOAD_GUIDE.md
β βββ SETUP_CREDENTIALS.md
β βββ ARCHITECTURE.md
β βββ FIREBASE_STRUCTURE.md
β βββ ...
βββ scripts/ # Build & setup scripts
β βββ setup.ps1
β βββ build_playstore.ps1
β βββ clean_build_apk.ps1
β βββ quick_build.ps1
β βββ fix_qr_scanner.ps1
βββ pubspec.yaml # Dependencies
βββ analysis_options.yaml # Linting rules
βββ README.md # This file
For detailed architecture, see docs/ARCHITECTURE.md.
All scripts are located in the scripts/ folder:
| Script | Description |
|---|---|
setup.ps1 |
Interactive setup and run helper |
build_playstore.ps1 |
Build release APK/AAB for Play Store |
clean_build_apk.ps1 |
Clean build directory and rebuild APK |
quick_build.ps1 |
Quick debug APK build |
fix_qr_scanner.ps1 |
Fix QR scanner permissions |
add_keells_products.ps1 |
Populate product database with Keells products |
add_biscuits_crackers.ps1 |
Add biscuits and crackers to product database |
populate_shopping_list.ps1 |
Populate shopping list with sample data |
save_to_shopping_table.ps1 |
Save data to Azure shopping table |
setup.bat |
Windows batch setup script |
# Interactive setup
.\scripts\setup.ps1
# Get packages
.\scripts\setup.ps1 get
# Build for production
.\scripts\build_playstore.ps1
# Clean and rebuild
.\scripts\clean_build_apk.ps1For more details, see docs/BUILD_GUIDE.md.
All documentation is organized in the docs/ folder:
- π Quick Start Guide - Get up and running in minutes
- π§ Setup Credentials - Configure Azure & Firebase
- ποΈ Build Guide - Building for different platforms
- ποΈ Architecture Overview - System design and patterns
- π Architecture Diagram - Visual system overview
- π₯ Firebase Structure - Database schema (legacy reference)
- π₯ User Data Separation - Privacy & security
- π Shopping List Feature - Shopping list implementation
- βοΈ Azure Setup - Complete Azure configuration
- π Azure Tables Quickstart - Table storage guide
- π Azure Authentication - Auth setup
- π Azure Only Auth - Azure-only authentication
- π¦ Azure Table Creation - Creating tables
- π₯ Hot Reload Guide - Fast development workflow
- π Secure Credentials - Credential management
- π οΈ Implementation Summary - Feature implementation
- πΊοΈ Roadmap - Future features & plans
- π± QR Code Samples - Test barcodes
- π§ Login/Signup Fix - Auth troubleshooting
We welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please ensure:
- Code follows Dart/Flutter style guidelines
- All tests pass
- Documentation is updated
- No credentials are committed
This project is licensed under the MIT License - see the LICENSE file for details.
- Open Food Facts - Product database API providing nutrition information
- Azure - Cloud infrastructure and storage services
- Flutter Team - Amazing cross-platform framework
- Keells Supermarket - Product data for Sri Lankan grocery items
- Contributors - Thank you for your support!
Made with β€οΈ for a sustainable future
Reducing food waste, one scan at a time