An intelligent agricultural assistance application that provides farmers with AI-powered advice, weather information, crop diagnosis, and market price insights. Built with modern web technologies to deliver a seamless mobile-first experience.
- Intelligent farming advice using Groq AI API
- Weather-aware recommendations
- Voice input and output support
- Context-aware conversations about crops, diseases, and farming practices
- Real-time location-based weather data
- Weather forecasts for agricultural planning
- Automatic location detection with IP-based fallback
- AI-powered crop disease identification
- Treatment recommendations
- Preventive measures suggestions
- Real-time crop market prices
- Price trends and analytics
- Support for various crops and commodities
- Progressive Web App (PWA) capabilities
- Responsive design for all devices
- Offline functionality
- Clean, intuitive interface
- React 18 - Modern React with hooks and functional components
- TypeScript - Type-safe development
- Vite - Fast build tool and development server
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Beautiful and accessible UI components
- Groq SDK - Fast AI inference for agricultural advice
- Speech Recognition API - Voice input capabilities
- Geolocation API - Location-based weather data
- Weather API - Real-time weather information
- React Router - Client-side routing
- TanStack Query - Server state management
- React Context - Theme and global state management
- PWA Support - Installable web app with service worker
- IndexedDB - Local data storage
- Workbox - PWA utilities and caching strategies
- Node.js 16+ or Bun
- npm, yarn, or bun package manager
-
Clone the repository
git cloneYOUR_GIT_URL>gt; cd krishi-sahayak -
Install dependencies
# Using npm npm install # Using bun (recommended) bun installl
-
Set up Groq AI API (Required for AI features)
- Visit Groq Console
- Create an account and get your API key
- See
GROQ_SETUP.mdfor detailed setup instructions
-
Start development server
# Using npm npm run dev # Using bun bun run devv
-
Open in browser Navigate to
http://localhost:5173
src/
βββ components/
β βββ layout/ # Layout components (headers, navigation)
β βββ ui/ # Reusable UI components
βββ contexts/ # React contexts (theme, etc.)
βββ data/ # Mock data and constants
βββ hooks/ # Custom React hooks
βββ lib/ # Utility functions and API clients
βββ pages/ # Page components (routes)
βββ types/ # TypeScript type definitions
initions
# Development
npm run dev # Start dev server
npm run build # Production build
npm run build:dev # Development build
npm run preview # Preview production build
npm run lint # Run ESLintThe AI chat system provides intelligent responses about:
- Crop cultivation techniques
- Disease identification and treatment
- Soil management
- Seasonal farming advice
- Weather-based recommendations
- Automatic location detection
- IP-based location fallback
- 7-day weather forecasts
- Agricultural weather alerts
- Real-time commodity prices
- Historical price trends
- Regional market data
- Price comparison tools
Create a .env.local file for local development:
VITE_GROQ_API_KEY=your_groq_api_key_here
VITE_WEATHER_API_KEY=your_weather_api_key_herenpm run buildThe dist folder contains the production-ready files.
- Vercel (Recommended)
- Netlify
- GitHub Pages
- Railway
- Any static hosting service
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the GitHub repository
- Check the documentation in the
/docsfolder - Review the
GROQ_SETUP.mdfor AI configuration help
Made with β€οΈ for farmers and agricultural communities