An AI-powered Flutter app that identifies fruits instantly from your camera and answers any fruit-related question through a built-in voice assistant.
- 📷 AI Fruit Classification — Identify fruits in real time using TensorFlow Lite (on-device, no internet needed for ML)
- 🎤 Voice Assistant — Ask any question about a fruit and get a spoken answer powered by OpenAI GPT
- 🔐 Authentication — Secure login and registration via Firebase Auth
- ☁️ Cloud Storage — Firestore integration for user data and history
- 🗣 Speech-to-Text & TTS — Fully hands-free experience
- 📱 Multi-platform — Android, iOS, Web, Windows, macOS
| Layer | Technology |
|---|---|
| Framework | Flutter 3 / Dart 3 |
| ML Model | TensorFlow Lite (on-device) |
| Backend | Firebase Auth, Firestore, Storage |
| Voice | speech_to_text + flutter_tts |
| AI Assistant | OpenAI GPT via HTTP |
| Platforms | Android, iOS, Web, Windows, macOS |
- Flutter 3.0+ — install guide
- Dart 3.0+
- A Firebase project — console.firebase.google.com
- OpenAI API key (optional — for voice assistant)
git clone https://github.com/YOUR_USERNAME/smartfruit.git
cd smartfruitflutter pub get# Install Firebase CLI if you haven't
npm install -g firebase-tools
# Login and init
firebase login
flutterfire configureThis generates lib/firebase_options.dart automatically.
Place these files in the assets/ folder:
fruit_classifier.tflite— your TFLite modellabels.txt— fruit label list (one per line)
In your environment or a config file:
const openAiApiKey = 'sk-...';# Android / iOS
flutter run
# Web
flutter run -d chrome
# Windows
flutter run -d windowssmartfruit/
├── lib/
│ ├── firebase_options.dart # Auto-generated Firebase config
│ ├── main.dart # Entry point
│ ├── screens/
│ │ ├── login_screen.dart
│ │ ├── home_screen.dart
│ │ ├── classification_screen.dart
│ │ └── voice_assistant_screen.dart
│ └── services/
│ ├── ml_service.dart # TFLite inference
│ ├── voice_service.dart # STT + TTS
│ └── gpt_service.dart # OpenAI calls
├── assets/
│ ├── fruit_classifier.tflite
│ └── labels.txt
├── firestore.rules
├── storage.rules
└── pubspec.yaml
Rules are configured in firestore.rules. Each user can only read and write their own data.
Pull requests are welcome. For major changes, open an issue first to discuss what you'd like to change.
MIT — free to use and modify.