AI-powered agricultural insights and plant disease detection system.
- Real-time Weather Integration: Get current weather data for any location
- Smart Crop Recommendations: AI-powered suggestions based on temperature and climate
- Agricultural Tips: Expert advice for optimal crop growing conditions
- Location-based Insights: Tailored recommendations for your specific area
- AI-Powered Disease Identification: Advanced machine learning models trained on thousands of plant disease images
- Instant Analysis: Get results in seconds with detailed confidence scores
- Treatment Recommendations: Expert advice on organic and chemical treatments
- Fertilizer Suggestions: Best fertilizers for plant recovery
- Mobile-Friendly: Works perfectly on all devices
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- Framer Motion - Smooth animations
- Lucide React - Beautiful icons
- shadcn/ui - Modern UI components
- FastAPI - High-performance Python web framework
- Transformers - Hugging Face ML models
- PyTorch - Deep learning framework
- Google Gemini AI - Advanced AI for treatment recommendations
- PIL (Pillow) - Image processing
- OpenWeatherMap API - Weather data integration
- Node.js 18+ and npm
- Python 3.8+
- Git
- Navigate to the frontend directory:
cd frontend- Install dependencies:
npm install- Start the development server:
npm run devThe frontend will be available at http://localhost:3000
- Navigate to the backend directory:
cd backend- Create and activate virtual environment:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Start the backend server:
python main.pyOr use the startup script:
chmod +x run.sh
./run.shThe backend API will be available at http://localhost:8002
Create a .env.local file in the frontend directory:
BACKEND_URL=http://localhost:8002GET /- API statusGET /health- Health checkPOST /predict- Plant disease prediction
POST /api/plant-health/predict- Proxy to backend prediction API
- Navigate to the dashboard
- Enter your city or location
- Get real-time weather data and crop recommendations
- View agricultural tips based on current conditions
- Go to the Plant Health page
- Upload an image of your plant
- Get instant AI-powered disease analysis
- Receive treatment and fertilizer recommendations
Botanic-defenders/
├── frontend/ # Next.js frontend application
│ ├── app/ # App Router pages
│ │ ├── dashboard/ # Main dashboard with crop yield
│ │ ├── plant-health/ # Plant disease detection page
│ │ └── api/ # API routes
│ ├── components/ # React components
│ │ ├── crops/ # Crop-related components
│ │ └── ui/ # UI components
│ └── lib/ # Utilities and configurations
├── backend/ # FastAPI backend application
│ ├── main.py # Main FastAPI application
│ ├── requirements.txt # Python dependencies
│ └── test_gemini.py # Gemini API testing
└── README.md # This file
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
For support and questions, please open an issue on GitHub.
Botanic Defenders - Empowering farmers and gardeners with AI-driven agricultural insights! 🌱🤖