A comprehensive agriculture assistant app that provides real-time weather updates, crop information, disease detection, mandi prices, and government schemes for farmers.
- GPT-powered farming assistant
- Real-time farming advice and solutions
- Crop-specific recommendations
- Disease diagnosis and treatment suggestions
- Government scheme guidance
- Voice interaction support
- Multilingual responses (Hindi/English)
- Real-time weather forecast (rainfall, humidity, temperature)
- Location-based weather data
- Weather-based crop disease prediction
- 7-day weather forecast
- Detailed crop information including seed types and best practices
- Soil compatibility guidance
- Fertilizer and pesticide recommendations
- Seasonal planting guides
- AI-powered crop disease detection from images
- Pesticide usage recommendations
- Safety guidelines and dosage information
- Common disease database
- Daily market prices from Agmarknet
- Crop-wise and location-wise filtering
- Price trend analysis
- Market recommendations
- Latest government schemes and subsidies
- Eligibility criteria and application process
- Direct links to official portals
- Multi-language support
- Weather warnings and forecasts
- Crop care reminders
- Price alerts and market updates
- Government scheme notifications
- Hindi and English language support
- Easy language switching
- Localized content for farmers
- Frontend: React 18 with TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS
- Icons: Lucide React
- Routing: React Router DOM
- Internationalization: React i18next
- HTTP Client: Axios
The app follows a modular architecture with separate pages for each feature:
src/
βββ components/ # Reusable UI components
β βββ Navbar.tsx # Navigation component
βββ pages/ # Main application pages
β βββ Dashboard.tsx # Main dashboard
β βββ Weather.tsx # Weather information
β βββ CropInfo.tsx # Crop details and guides
β βββ DiseaseDetection.tsx # Disease detection
β βββ MandiPrices.tsx # Market prices
β βββ GovernmentSchemes.tsx # Govt schemes
β βββ Profile.tsx # User profile
βββ i18n/ # Internationalization
β βββ config.ts # i18n configuration
β βββ locales/ # Translation files
β βββ en.json # English translations
β βββ hi.json # Hindi translations
βββ App.tsx # Main app component
βββ main.tsx # App entry point
βββ index.css # Global styles
-
Clone the repository
git clone <repository-url> cd smart-krishi-sahayak
-
Install dependencies
npm install
-
Start development server
npm run dev
-
Build for production
npm run build
Create a .env file in the root directory:
# OpenAI API for AI Agriculture Agent
VITE_OPENAI_API_KEY=sk-proj-your-openai-api-key-here
# Weather API (Optional - has fallback data)
VITE_OPENWEATHER_API_KEY=your_openweather_api_key
# Government APIs (Optional - has fallback data)
VITE_AGMARKNET_API_URL=https://api.data.gov.in/resource/- Go to OpenAI Platform
- Create an account or sign in
- Generate a new API key
- Copy the key and add it to your
.envfile - Restart the development server
Note: The AI Agent will work with sample responses if no API key is provided, but for genuine agricultural advice, an OpenAI API key is required.
The app integrates with several APIs:
- OpenWeatherMap API: For weather data
- Agmarknet API: For mandi prices
- Government APIs: For scheme information
- Welcome screen with quick access to all features
- Today's weather summary
- Market price highlights
- Recent alerts and notifications
- Current weather conditions
- 7-day forecast
- Weather-based farming recommendations
- Location-based weather data
- Comprehensive crop database
- Seed varieties and recommendations
- Soil compatibility information
- Best practices for cultivation
- Image-based disease identification
- Treatment recommendations
- Pesticide safety guidelines
- Prevention strategies
- Real-time market prices
- Price trend analysis
- Multi-location price comparison
- Market timing recommendations
- Active scheme listings
- Eligibility checker
- Application process guides
- Direct portal links
The app supports:
- Hindi (ΰ€Ήΰ€Ώΰ€ΰ€¦ΰ₯): Primary language for farmers
- English: Secondary language support
Switch languages using the language toggle in the navigation bar.
The app is fully responsive and works seamlessly on:
- Desktop computers
- Tablets
- Mobile phones
- Small and marginal farmers
- Agricultural extension workers
- Farm advisors
- Agricultural students
- Rural entrepreneurs
- AI-powered crop disease detection: Advanced image recognition
- Voice assistant: Hindi voice commands for farmers
- IoT sensor integration: Real-time field monitoring
- Blockchain integration: Supply chain transparency
- Offline mode: Core features without internet
- GPS integration: Location-based recommendations
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and queries:
- Email: abhibro936@gmail.com
- Website: https://smartkrishisahayak.com
- Phone: +91-7841938644
- Thanks to all farmers who provided feedback
- Government of India for open data APIs
- Open source community for amazing tools
- Agriculture departments for domain knowledge
Smart Krishi Sahayak - Empowering Farmers with Technology πΎ