Smart Agro Advisor is a comprehensive web application designed to assist farmers and gardeners by leveraging machine learning and AI to provide instant, data-driven solutions for plant care.

This application is a complete ecosystem of tools for every stage of the plant care journey:
- Secure User Authentication: A robust, two-step registration process using Email OTP verification to keep user data private.
- Plant Disease Diagnosis: Instantly identify plant diseases by uploading a photo. A k-NN machine learning model analyzes the image and provides detailed information on symptoms and treatments.
- Crop & Fertilizer Recommender: A powerful two-step tool that uses Random Forest models to first recommend the ideal crop for specific soil/climate conditions, and then the most effective fertilizer for that crop.
- My Garden & Plant Journal: A personal dashboard to log a collection of plants, track their progress with photos, and receive smart reminders for watering and fertilizing.
- AI Growth Analyzer: A unique feature that uses Google's Gemini AI to analyze journal photos and provide a professional rating of a plant's growth along with actionable recommendations.
- AI Plant Guide: An intelligent guide powered by Gemini AI. Users can enter any plant name to get a detailed, structured care guide tailored to their local conditions.
- Weather Forecast: Provides real-time weather and a 5-day forecast for any city, powered by the OpenWeatherMap API.
- Community Forum: A social hub where users can create posts (with text and images), ask questions, and share advice with other members.
The application is built on a modern, robust, and scalable technology stack.
- Backend: Python, Django, Django REST Framework
- Frontend: React.js, Modern CSS
- Database: SQLite (managed by Django ORM)
- Machine Learning: Scikit-learn, Pandas, Joblib, OpenCV
- External APIs: Google Gemini (for AI), OpenWeatherMap (for weather)
To run this project locally, follow these steps:
- Python 3.10+
- Node.js and npm
- Git
- Clone the repository:
git clone https://github.com/YourUsername/smart-agro-advisor.git - Navigate to the backend directory:
cd plant_doctor_project/backend - Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install Python dependencies:
pip install -r requirements.txt(Note: You should create arequirements.txtfile by runningpip freeze > requirements.txt) - Create a
.envfile and add your secret API keys. - Run database migrations:
python manage.py migrate - Start the server:
python manage.py runserver
- Navigate to the frontend directory:
cd plant_doctor_project/frontend - Install JavaScript dependencies:
npm install - Start the React development server:
npm start
The application will be available at http://localhost:3000.