🌱 Inspiration
Farmers in India and developing countries lose 20-40% of their crops to diseases annually. Most farmers can't afford agricultural experts and need instant, accessible solutions in their native languages. AgriSakhi was born to democratize agricultural expertise using AI.
🚀 What It Does
AgriSakhi is a free, AI-powered Progressive Web App that:
- Identifies 38+ plant diseases using Google's Gemini Vision AI
- Works in 4 languages: English, Urdu (اردو), Hindi (हिंदी), Kannada (ಕನ್ನಡ)
- Generates professional PDF reports with organic, chemical, and cultural treatment recommendations
- Works offline as an installable mobile app
- Completely free - No subscriptions, no ads, no barriers
🛠️ How We Built It
Frontend & Architecture:
- Next.js 16 with Turbopack for blazing-fast performance
- React 19 with TypeScript for type-safe code
- TailwindCSS for beautiful, responsive UI
- Zustand for state management
- PWA with service workers for offline functionality
AI Integration:
- Google Gemini 1.5 Flash for real-time image analysis
- Custom prompt engineering for accurate disease detection
- Fallback system: Gemini → Hugging Face → Demo mode
Multi-Language System:
- react-i18next with 350+ translation keys
- RTL (Right-to-Left) support for Urdu/Arabic scripts
- Disease name translations for 20+ plant diseases
- Real-time language switching without reload
Backend & Database:
- Supabase for authentication and history storage
- PostgreSQL with Row Level Security
- Server-side API routes for secure AI calls
- PDF generation with jsPDF and autoTable
Key Features:
- Disease Detection - Upload or capture plant images
- AI Analysis - Gemini Vision identifies diseases with confidence scores
- Treatment Recommendations - Organic, chemical, cultural, and prevention methods
- Knowledge Base - 60+ diseases with symptoms, causes, and treatments
- History Tracking - Save and review past detections
- PDF Reports - Professional multi-language reports
- Chatbot - Agricultural Q&A powered by Gemini
💪 Challenges We Faced
1. Multi-Language Complexity
- Translating disease names and technical agricultural terms
- Supporting RTL scripts (Urdu) while maintaining LTR (English/Hindi)
- Creating a seamless language-switching experience
2. AI Integration
- Training Gemini to output consistent disease format
- Handling model loading times and API rate limits
- Creating fallback systems for reliability
3. Offline Functionality
- Implementing PWA with service workers
- Caching strategies for 100+ MB of app assets
- Offline-first architecture with sync on reconnection
4. PDF Generation
- Creating professional reports with embedded images
- Multi-language PDF support with proper fonts
- Keeping file sizes manageable (<2MB)
📚 What We Learned
- Advanced Next.js 16 features and Turbopack optimization
- Google Gemini Vision API and prompt engineering
- Complex i18n implementation with RTL support
- PWA development and service worker strategies
- Supabase real-time features and security policies
- Building accessible, farmer-friendly UI/UX
🎯 What's Next for AgriSakhi
- Voice Input: Add speech recognition in regional languages
- Soil Testing: Integrate soil health analysis
- Weather Integration: Provide disease risk predictions
- Community Features: Connect farmers for knowledge sharing
- Expert Network: Live consultation with agricultural experts
- Crop Planning: AI-powered crop recommendation system
🌍 Impact
AgriSakhi has the potential to help millions of farmers:
- Reduce crop losses by 15-30% through early detection
- Save costs on unnecessary treatments
- Bridge language barriers with native language support
- Democratize agricultural expertise for small-scale farmers
- Promote sustainable farming with organic treatment options
Built with ❤️ for farmers worldwide 🌾
Built With
- 16
- 19
- ai
- gemini
- git/github
- jspdf
- next.js
- postgresql
- pwa
- react
- react-i18next
- supabase
- tailwindcss
- typescript
- vercel
- zustand
Log in or sign up for Devpost to join the conversation.