Skip to content

About

AI Based Web Application For Farmers.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

ย 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒพ AGRIGUIDE - AI-Based Web Application For Farmers

AGRIGUIDE is a comprehensive web application designed to empower farmers with AI-driven tools and resources for modern agriculture. The platform combines machine learning, real-time data, and user-friendly interfaces to provide farmers with intelligent solutions for crop management, disease detection, and agricultural decision-making.

๐Ÿ“‹ Table of Contents

โœจ Features

๐Ÿ”ฌ AI-Powered Plant Disease Detection

  • Advanced Image Recognition: Upload plant images to detect diseases using trained machine learning models
  • Multi-Crop Support: Supports disease detection for various crops including Apple, Corn, Grape, Tomato, Potato, and more
  • Instant Diagnosis: Get immediate results with disease classification and confidence scores
  • Treatment Recommendations: Receive actionable advice for identified plant diseases

๐Ÿค– Intelligent Chatbot

  • 24/7 Agricultural Assistant: Get instant answers to farming-related questions
  • Multilingual Support: Communicate in your preferred language
  • Expert Knowledge Base: Access agricultural best practices and solutions

๐ŸŒค๏ธ Weather Integration

  • Real-time Weather Data: Stay updated with current weather conditions
  • Forecast Predictions: Plan agricultural activities with weather forecasts
  • Location-based Information: Get weather data specific to your farming location

๐Ÿ“Š Farm Management Tools

  • Expense Tracking: Monitor and manage farm-related expenses
  • Dashboard Analytics: Visualize farm performance with interactive charts
  • Crop Planning: Plan and track crop cycles efficiently

๐ŸŽ“ Agricultural Education

  • Learning Resources: Access educational content on modern farming techniques
  • Best Practices: Learn about sustainable farming methods
  • Skill Development: Enhance farming knowledge with curated content

๐Ÿ‘ฅ Labor Management

  • Labor Registration: Register and manage farm workers
  • Appointment Booking: Schedule appointments with agricultural experts
  • Resource Allocation: Efficiently manage human resources on the farm

๐Ÿ“ฐ Agricultural News & Schemes

  • Latest News: Stay updated with agricultural news and market trends
  • Government Schemes: Discover and apply for agricultural schemes and subsidies
  • Policy Updates: Get notified about new agricultural policies

๐Ÿ› ๏ธ Tech Stack

Frontend

  • React 19.0.0 - Modern JavaScript library for building user interfaces
  • Vite - Fast build tool and development server
  • React Router DOM - Client-side routing
  • Axios - HTTP client for API communications
  • Tailwind CSS - Utility-first CSS framework
  • Lucide React - Beautiful & consistent icons
  • Recharts - Composable charting library
  • React Webcam - Camera integration for image capture

Backend

  • Django 5.1.6 - High-level Python web framework
  • Django REST Framework - Powerful toolkit for building Web APIs
  • TensorFlow/Keras - Machine learning model integration
  • MongoDB - NoSQL database for user management
  • OpenCV - Computer vision library for image processing
  • PIL (Pillow) - Python Imaging Library

AI/ML Components

  • Pre-trained Disease Detection Models - Custom trained models for plant disease classification
  • Image Preprocessing - Advanced image processing for accurate predictions
  • Model Optimization - Efficient model loading and inference

๐Ÿ“ Project Structure

AGRIGUIDE Web Application/
โ”œโ”€โ”€ frontend/                    # React frontend application
โ”‚   โ”œโ”€โ”€ public/                 # Static assets
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ assets/            # Images and static resources
โ”‚   โ”‚   โ”œโ”€โ”€ components/        # Reusable React components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ui/           # UI components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Navbar.jsx    # Navigation component
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Footer.jsx    # Footer component
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”‚   โ”œโ”€โ”€ layout/           # Layout components
โ”‚   โ”‚   โ”œโ”€โ”€ pages/            # Page components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Home.jsx      # Landing page
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Login.jsx     # User authentication
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ PlantDiseasePrediction.jsx
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Chatbot.jsx   # AI chatbot interface
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Weather.jsx   # Weather dashboard
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Dashboard.jsx # Analytics dashboard
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”‚   โ”œโ”€โ”€ App.jsx           # Main App component
โ”‚   โ”‚   โ””โ”€โ”€ main.jsx          # Entry point
โ”‚   โ”œโ”€โ”€ package.json          # Dependencies and scripts
โ”‚   โ””โ”€โ”€ vite.config.js        # Vite configuration
โ”‚
โ”œโ”€โ”€ backend/                     # Django backend application
โ”‚   โ”œโ”€โ”€ backend/                # Django project settings
โ”‚   โ”‚   โ”œโ”€โ”€ settings.py        # Django configuration
โ”‚   โ”‚   โ”œโ”€โ”€ urls.py           # URL routing
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ agri_app/              # Main Django app
โ”‚   โ”‚   โ”œโ”€โ”€ models/           # AI/ML model files
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ trained_plant_disease_model_apple.keras
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ trained_plant_disease_model_all.keras
โ”‚   โ”‚   โ”œโ”€โ”€ migrations/       # Database migrations
โ”‚   โ”‚   โ”œโ”€โ”€ views.py          # API endpoints
โ”‚   โ”‚   โ”œโ”€โ”€ models.py         # Data models
โ”‚   โ”‚   โ”œโ”€โ”€ urls.py           # App URL routing
โ”‚   โ”‚   โ””โ”€โ”€ db.py             # Database configuration
โ”‚   โ”œโ”€โ”€ media/                # Uploaded media files
โ”‚   โ”œโ”€โ”€ manage.py             # Django management script
โ”‚   โ””โ”€โ”€ db.sqlite3            # SQLite database
โ”‚
โ””โ”€โ”€ README.md                   # Project documentation

๐Ÿš€ Installation

Prerequisites

  • Node.js (v16 or higher)
  • Python (v3.8 or higher)
  • MongoDB (for user management)
  • Git

Backend Setup

  1. Clone the repository

    git clone https://github.com/Destron7/AGRIGUIDE-AI-Based-WebApp-For-Farmers.git
    cd AGRIGUIDE-AI-Based-WebApp-For-Farmers
  2. Navigate to backend directory

    cd backend
  3. Create virtual environment

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  4. Install Python dependencies

    pip install django djangorestframework django-cors-headers tensorflow opencv-python pillow pymongo python-dotenv
  5. Environment Configuration

    # Create .env file in backend directory
    echo "SECRET_KEY=your_secret_key_here" > .env
  6. Run database migrations

    python manage.py migrate
  7. Start the Django server

    python manage.py runserver

Frontend Setup

  1. Navigate to frontend directory (in a new terminal)

    cd frontend
  2. Install Node.js dependencies

    npm install
  3. Start the development server

    npm run dev

Database Setup

  1. Install MongoDB and ensure it's running
  2. Configure database connection in backend/agri_app/db.py

๐Ÿ’ป Usage

  1. Access the application

    • Frontend: http://localhost:5173
    • Backend API: http://localhost:8000
  2. User Registration/Login

    • Enter name and phone number to register or login
    • No password required for simplicity
  3. Plant Disease Detection

    • Navigate to Plant Disease Prediction page
    • Upload an image of the affected plant
    • Get instant AI-powered disease diagnosis
    • Follow recommended treatment suggestions
  4. Explore Features

    • Use the chatbot for agricultural queries
    • Check weather updates for your location
    • Track farm expenses and view analytics
    • Access educational resources
    • Stay updated with agricultural news

๐Ÿ”Œ API Endpoints

Authentication

  • POST /api/login/ - User registration/login

Plant Disease Detection

  • POST /api/predict_disease/ - Upload image for disease prediction

Response Format

{
  "prediction": "Disease Name",
  "confidence": 95.5,
  "treatment": "Recommended treatment options"
}

๐Ÿ“ฑ Screenshots

Add screenshots of your application here to showcase the user interface and features

๐Ÿค Contributing

We welcome contributions to AGRIGUIDE! Here's how you can help:

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

Development Guidelines

  • Follow PEP 8 for Python code
  • Use ESLint configuration for JavaScript/React code
  • Write meaningful commit messages
  • Add comments for complex logic
  • Test your changes thoroughly

๐Ÿ› Known Issues

  • Model loading time may be slow on first request
  • Large image uploads might timeout on slow connections
  • MongoDB connection needs to be configured manually

๐Ÿ”ฎ Future Enhancements

  • Crop Yield Prediction - Predict crop yields based on historical data
  • Soil Analysis Integration - Add soil health monitoring capabilities
  • IoT Device Integration - Connect with farm sensors and IoT devices
  • Mobile Application - Develop native mobile apps
  • Multi-language Support - Add support for regional languages
  • Advanced Analytics - Implement more sophisticated farm analytics
  • Marketplace Integration - Add crop selling and buying features
  • Expert Consultation - Video calling with agricultural experts

๐Ÿ“„ License

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

๐Ÿ‘จโ€๐Ÿ’ป Author

Destron7

๐Ÿ™ Acknowledgments

  • Thanks to the agricultural community for inspiring this project
  • TensorFlow team for the excellent ML framework
  • React and Django communities for the robust frameworks
  • Open source contributors who made this project possible

๐Ÿ“ž Support

If you have any questions or need help setting up the project, please:

  1. Check the Issues page
  2. Create a new issue if your problem isn't already listed
  3. Provide detailed information about your setup and the issue you're facing

Made with โค๏ธ for the farming community

Empowering farmers with AI-driven solutions for sustainable agriculture

About

AI Based Web Application For Farmers.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages