Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

🌱 Smart Farm IoT & Weed Detection System

Flutter Firebase Dart Android iOS

A comprehensive IoT-powered smart farming solution with AI-driven weed detection and real-time monitoring capabilities.

πŸš€ Overview

Smart Farm IoT is a cutting-edge mobile application that revolutionizes modern agriculture by combining Internet of Things (IoT) sensors, machine learning-powered weed detection, and intuitive farm management tools. Built with Flutter for cross-platform compatibility, this app empowers farmers to monitor their crops in real-time, detect weeds automatically, and make data-driven decisions to optimize their farming operations.

✨ Key Features

πŸ” Authentication & Security

  • Firebase Authentication with email/password and Google Sign-In
  • Secure user registration and login system
  • Password reset functionality
  • Session management and auto-login

πŸ“Š Real-Time IoT Monitoring

  • Live sensor data from multiple farm locations
  • Temperature, humidity, soil moisture, and light intensity tracking
  • Interactive charts with historical data visualization
  • Real-time alerts and notifications for critical conditions
  • CORS-compliant API integration with fallback mock data

πŸ€– AI-Powered Weed Detection

  • Machine learning integration for automated weed identification
  • Camera-based weed detection with image upload
  • Real-time analysis and classification results
  • Detection history and analytics

🚜 Farm Management

  • Multi-farm support with detailed farm profiles
  • Comprehensive dashboard with key metrics
  • Equipment control and monitoring
  • Crop management and planning tools

πŸ“± Modern Mobile Experience

  • Cross-platform support (Android & iOS)
  • Intuitive navigation with bottom tab bar
  • Dark/Light theme support
  • Responsive design for all screen sizes
  • Offline capability with data synchronization

πŸ‘€ User Profile & Settings

  • Editable user profiles with image upload
  • Farm information management
  • Statistics and performance metrics
  • Notification preferences
  • Data export functionality

πŸ› οΈ Technology Stack

Frontend

  • Flutter 3.x - Cross-platform mobile framework
  • Dart - Programming language
  • Google Fonts - Typography
  • FL Chart - Interactive data visualization
  • Image Picker - Camera and gallery integration

Backend & Services

  • Firebase Authentication - User management
  • Firebase Cloud Firestore - Real-time database
  • REST API - IoT sensor data integration
  • Google Services - OAuth and cloud integration

Architecture

  • Feature-based architecture for scalability
  • Provider/Bloc pattern for state management
  • Repository pattern for data abstraction
  • Clean architecture principles

πŸ“ Project Structure

lib/
β”œβ”€β”€ features/
β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   β”œβ”€β”€ screens/
β”‚   β”‚   β”‚   β”œβ”€β”€ login_screen.dart
β”‚   β”‚   β”‚   └── register_screen.dart
β”‚   β”‚   └── services/
β”‚   β”œβ”€β”€ home/
β”‚   β”‚   └── screens/
β”‚   β”‚       β”œβ”€β”€ home_screen.dart
β”‚   β”‚       β”œβ”€β”€ farm_details_screen.dart
β”‚   β”‚       └── profile_screen.dart
β”‚   β”œβ”€β”€ weed_detection/
β”‚   β”‚   └── screens/
β”‚   β”‚       └── weed_detection_screen.dart
β”‚   β”œβ”€β”€ control/
β”‚   β”‚   └── screens/
β”‚   β”‚       └── control_car_screen.dart
β”‚   β”œβ”€β”€ notifications/
β”‚   β”‚   └── screens/
β”‚   β”‚       └── notifications_screen.dart
β”‚   └── camera/
β”‚       └── screens/
β”‚           └── camera_screen.dart
β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ auth_service.dart
β”‚   └── api_service.dart
β”œβ”€β”€ models/
β”‚   └── sensor_data.dart
β”œβ”€β”€ firebase_options.dart
└── main.dart

πŸš€ Getting Started

Prerequisites

  • Flutter SDK (3.0 or higher)
  • Dart SDK (3.0 or higher)
  • Android Studio or VS Code with Flutter extensions
  • Firebase project with Authentication and Firestore enabled
  • Android/iOS device or emulator

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/weed_detection_iot_ml.git
    cd weed_detection_iot_ml
  2. Install dependencies

    flutter pub get
  3. Firebase Setup

    • Create a new Firebase project at Firebase Console
    • Enable Authentication (Email/Password and Google Sign-In)
    • Enable Cloud Firestore
    • Download google-services.json (Android) and GoogleService-Info.plist (iOS)
    • Place the files in their respective platform directories
  4. Configure Firebase

    flutter packages pub run build_runner build
  5. Run the application

    flutter run

πŸ“± Screenshots & Demo

πŸŽ₯ App Demo Video

πŸ” Authentication Flow

Splash Screen Login Screen Register Screen

Clean, modern authentication with email/password and Google Sign-In integration

🏠 Dashboard & Home

Home Dashboard Sensor Overview Farm Statistics

Real-time dashboard with comprehensive farm monitoring and statistics

πŸ“Š Data Visualization & Analytics & Notification

Interactive Charts Sensor Details Historical Data

Interactive charts with real-time sensor data and historical analytics

πŸ€– AI Weed Detection

Weed Detection Camera Weed Analysis Detection Results

AI-powered weed detection with camera integration and real-time analysis

🚜 Farm Management & Control

Farm Details

Comprehensive farm management with equipment control and monitoring

πŸ‘€ Profile & Settings

Profile View Profile Edit Notifications

User profile management with editable information and notification settings

πŸ“± App Features Overview

Feature Screenshot Description
Login Login Secure authentication with form validation
Dashboard Dashboard Real-time farm monitoring overview
Charts Charts Interactive data visualization
Weed Detection Detection AI-powered weed identification
Profile Profile User and farm information management

πŸ“‚ Screenshots Folder Structure

To add your own screenshots, create a screenshots folder in your project root with these files:

screenshots/
β”œβ”€β”€ app_demo.mp4                    # App demo video
β”œβ”€β”€ login_screen.png               # Login screen
β”œβ”€β”€ register_screen.png            # Registration screen
β”œβ”€β”€ google_signin.png              # Google Sign-In flow
β”œβ”€β”€ home_dashboard.png             # Main dashboard
β”œβ”€β”€ sensor_overview.png            # Sensor data overview
β”œβ”€β”€ farm_stats.png                 # Farm statistics
β”œβ”€β”€ interactive_charts.png         # Data visualization charts
β”œβ”€β”€ sensor_details.png             # Detailed sensor view
β”œβ”€β”€ historical_data.png            # Historical data analysis
β”œβ”€β”€ weed_detection_camera.png      # Weed detection camera
β”œβ”€β”€ weed_analysis.png              # Weed analysis results
β”œβ”€β”€ detection_results.png          # Detection outcome
β”œβ”€β”€ farm_details.png               # Farm management details
β”œβ”€β”€ control_panel.png              # Equipment control panel
β”œβ”€β”€ equipment_control.png          # Equipment monitoring
β”œβ”€β”€ profile_view.png               # User profile view
β”œβ”€β”€ profile_edit.png               # Profile editing mode
└── notifications.png              # Notifications screen

🎯 How to Capture Screenshots

  1. Run your Flutter app on a device or emulator
  2. Navigate to each screen you want to capture
  3. Take screenshots using:
    • Android: Power + Volume Down
    • iOS: Power + Volume Up
    • Emulator: Use built-in screenshot tools
  4. Save images in the screenshots folder with the names listed above
  5. Record a demo video showing the app's key features

πŸ”§ Configuration

API Configuration

Update the API endpoints in lib/services/api_service.dart:

static const String baseUrl = 'YOUR_IOT_API_ENDPOINT';

Firebase Configuration

Ensure your firebase_options.dart is properly configured with your project credentials.

πŸ§ͺ Testing

Run the test suite:

flutter test

For integration tests:

flutter drive --target=test_driver/app.dart

πŸ“¦ Build & Deployment

Android

flutter build apk --release
# or for app bundle
flutter build appbundle --release

iOS

flutter build ios --release

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow Flutter/Dart style guidelines
  • Write comprehensive tests for new features
  • Update documentation for API changes
  • Ensure cross-platform compatibility

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Flutter Team for the amazing framework
  • Firebase for backend services
  • Material Design for UI components
  • IoT sensor manufacturers for hardware integration
  • Open source community for various packages and tools

πŸ“ž Support & Contact


Made with ❀️ for sustainable agriculture

Empowering farmers with technology for a greener future

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages