Skip to content

StrataMind/FARMLINK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒพ FarmLink: Agricultural Intelligence Assistant

An agentic AI-powered platform that democratizes agricultural knowledge through intelligent assistance, voice input, and SMS support - completely FREE for farmers worldwide.

License Live Demo Backend Status Last Commit


๐Ÿ“– Table of Contents


๐ŸŒพ Overview

FarmLink addresses the critical information gap faced by farmers globally, particularly in developing regions. By leveraging cutting-edge agentic AI technology, it provides instant access to expert agricultural knowledge through multiple channels including voice input, text queries, and SMS integration.

๐ŸŽฏ Problem Statement

  • Information Gap: Farmers lack timely access to scientific best practices
  • Language Barriers: Limited multilingual agricultural resources
  • Accessibility: Low literacy rates and limited internet connectivity
  • Cost: Expensive agricultural consultation services
  • Coverage: Understaffed traditional extension services

๐Ÿ’ก Solution Approach

FarmLink uses Retrieval-Augmented Generation (RAG) architecture with agentic AI to deliver:

  • Real-time, context-aware agricultural advice
  • Multi-modal input (voice, text, SMS)
  • 100% FREE service model
  • Multilingual support (English/Hindi, expandable)
  • Mobile-first responsive design

โœจ Features

๐Ÿง  AI Intelligence

  • Agentic AI System: Context-aware responses using advanced language models
  • Knowledge Retrieval: FAISS-powered semantic search through agricultural databases
  • Multi-language Support: English and Hindi with expansion capabilities

๐ŸŽค Voice Integration

  • Real-time Speech Recognition: Web Speech API integration
  • Live Transcription: See your words as you speak
  • Voice-to-Text: Perfect for farmers with literacy challenges

๐Ÿ“ฑ SMS Integration

  • Multi-provider Support: TextLocal, Fast2SMS, Twilio Sandbox
  • Smart Routing: Automatic fallback between SMS providers
  • Demo Mode: Always-working demonstration capability

๐ŸŒ Modern UI/UX

  • Glass Morphism Design: Modern, accessible interface
  • Responsive Design: Mobile-first approach
  • Animated Interactions: Smooth, professional user experience
  • Progressive Web App: Installable on mobile devices

๐Ÿ“š Agricultural Knowledge

  • Comprehensive Database: Covers crops, fertilizers, pests, diseases
  • Government Schemes: PM-KISAN and other farmer benefits
  • Best Practices: Scientific agricultural recommendations
  • Seasonal Guidance: Timing for sowing, harvesting, and care

๐Ÿ› ๏ธ Tech Stack

Frontend

  • React.js - Modern component-based UI framework
  • CSS3 & Custom Properties - Advanced styling with glass morphism
  • Web Speech API - Real-time voice recognition
  • Lucide React - Beautiful, consistent icons
  • Vercel - Global CDN deployment

Backend

  • FastAPI - High-performance Python web framework
  • Pydantic - Data validation and serialization
  • CORS Middleware - Cross-origin resource sharing
  • Uvicorn - ASGI server for production
  • Render.com - Scalable cloud deployment

AI & ML

  • Sentence Transformers - Semantic text embeddings
  • FAISS - Vector similarity search
  • Retrieval-Augmented Generation - Context-aware AI responses
  • Multi-provider LLM Integration - Flexible AI model support

Integration Services

  • SMS Providers: TextLocal, Fast2SMS, Twilio
  • Voice Recognition: Browser-native Web Speech API
  • Translation Services: Multi-language support system

๐Ÿš€ Live Demo

๐ŸŒ Frontend Application

Live URL: https://farmlink-omega.vercel.app

Features to Try:

  • Ask agricultural questions in natural language
  • Test voice input (click microphone icon)
  • Try SMS demo with your phone number
  • Switch between English/Hindi languages
  • Explore quick question suggestions

๐Ÿ”ง Backend API

API URL: https://farmlink-backend-iq4o.onrender.com

Endpoints:

  • GET /health - System health check
  • POST /ask - Submit agricultural questions
  • GET /free-services - Available service information
  • POST /sms/send - SMS integration demo

โšก Quick Start

Prerequisites

Node.js 16+ 
Python 3.8+
Git

๐Ÿ”ฅ Installation

# Clone the repository
git clone https://github.com/surajsk2003/FARMLINK.git
cd FARMLINK

# Setup Backend
cd agrisage-backend
pip install -r requirements.txt

# Setup Frontend  
cd ../agrisage-frontend
npm install

๐Ÿš€ Running Locally

# Terminal 1: Start Backend
cd agrisage-backend
python -m uvicorn app.main:app --reload --port 8000

# Terminal 2: Start Frontend
cd agrisage-frontend
npm start

Access Application: http://localhost:3000

๐Ÿณ Docker Support (Optional)

# Backend Docker
cd agrisage-backend
docker build -t farmlink-backend .
docker run -p 8000:8000 farmlink-backend

# Frontend builds automatically on Vercel

๐Ÿ—๏ธ Architecture

FarmLink Architecture (RAG-based)
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Frontend      โ”‚    โ”‚    Backend       โ”‚    โ”‚   AI Services   โ”‚
โ”‚   (React)       โ”‚    โ”‚   (FastAPI)      โ”‚    โ”‚                 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค    โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค    โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ โ€ข Voice Input   โ”‚โ—„โ”€โ”€โ–บโ”‚ โ€ข RAG Pipeline   โ”‚โ—„โ”€โ”€โ–บโ”‚ โ€ข Vector Search โ”‚
โ”‚ โ€ข Modern UI     โ”‚    โ”‚ โ€ข API Endpoints  โ”‚    โ”‚ โ€ข LLM Models    โ”‚
โ”‚ โ€ข SMS Demo      โ”‚    โ”‚ โ€ข CORS Handling  โ”‚    โ”‚ โ€ข Knowledge DB  โ”‚
โ”‚ โ€ข Responsive    โ”‚    โ”‚ โ€ข Multi-language โ”‚    โ”‚ โ€ข Embeddings    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                        โ”‚                        โ”‚
         โ–ผ                        โ–ผ                        โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Deployment    โ”‚    โ”‚   Integration    โ”‚    โ”‚   Data Layer    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค    โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค    โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ โ€ข Vercel CDN    โ”‚    โ”‚ โ€ข SMS Providers  โ”‚    โ”‚ โ€ข FAISS Index   โ”‚
โ”‚ โ€ข Render Cloud  โ”‚    โ”‚ โ€ข Voice APIs     โ”‚    โ”‚ โ€ข Vector Store  โ”‚
โ”‚ โ€ข Auto-deploy   โ”‚    โ”‚ โ€ข Translation    โ”‚    โ”‚ โ€ข Knowledge KB  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“ Project Structure

FARMLINK/
โ”œโ”€โ”€ ๐ŸŒ agrisage-frontend/          # React frontend application
โ”‚   โ”œโ”€โ”€ public/                    # Static assets (favicon, manifest)
โ”‚   โ”œโ”€โ”€ src/                      # Source code
โ”‚   โ”‚   โ”œโ”€โ”€ App.js                # Main application component
โ”‚   โ”‚   โ”œโ”€โ”€ App.css               # Glass morphism styling
โ”‚   โ”‚   โ””โ”€โ”€ services/api.js       # Backend API integration
โ”‚   โ”œโ”€โ”€ package.json              # Frontend dependencies
โ”‚   โ””โ”€โ”€ vercel.json               # Vercel deployment config
โ”œโ”€โ”€ ๐Ÿ”ง agrisage-backend/           # FastAPI backend application  
โ”‚   โ”œโ”€โ”€ app/                      # Application code
โ”‚   โ”‚   โ”œโ”€โ”€ main.py               # FastAPI application entry
โ”‚   โ”‚   โ”œโ”€โ”€ main_simple.py        # Lightweight version
โ”‚   โ”‚   โ”œโ”€โ”€ routers/              # API route handlers
โ”‚   โ”‚   โ””โ”€โ”€ services/             # Business logic services
โ”‚   โ”œโ”€โ”€ Dockerfile                # Container configuration
โ”‚   โ”œโ”€โ”€ requirements.txt          # Python dependencies
โ”‚   โ””โ”€โ”€ railway.json.backup       # Deployment configuration
โ””โ”€โ”€ ๐Ÿ“š README.md                  # Project documentation

๐Ÿ“ฑ Usage

๐Ÿ—ฃ๏ธ Voice Input

  1. Click microphone icon in the question input area
  2. Allow microphone access when prompted
  3. Speak your question clearly in English or Hindi
  4. Watch live transcription appear in real-time
  5. Click "Stop Recording" when finished
  6. Submit your question for AI processing

๐Ÿ’ฌ Text Input

  1. Type your agricultural question in the text area
  2. Select language (English/Hindi) from dropdown
  3. Click "Get FREE Answer" to submit
  4. View AI response with confidence score and source

๐Ÿ“ฑ SMS Demo

  1. Enter your phone number with country code (+91XXXXXXXXXX)
  2. Type your question in the main input area
  3. Click "Send SMS Demo" button
  4. Receive confirmation of SMS processing status

๐Ÿ’ก Quick Questions

  • Click any suggested question in the sidebar
  • Questions auto-populate in the main input
  • Submit directly or modify before asking

๐Ÿ“Š Response Analysis

Each AI response includes:

  • โœ… Confidence Score: How certain the AI is about the answer
  • ๐Ÿ“š Source Information: Where the knowledge comes from
  • ๐Ÿค– Model Used: Which AI system provided the response
  • โšก Processing Time: How quickly the response was generated
  • ๐Ÿ’ฐ Cost: Always shows "FREE" for our service

๐ŸŽฏ Problem Statement Deep Dive

๐ŸŒ Global Agricultural Challenges

Information Accessibility:

  • 570+ million farms worldwide lack access to timely agricultural information
  • Traditional extension services reach <30% of farmers in developing countries
  • Language barriers prevent access to international best practices

Economic Impact:

  • Suboptimal farming practices cause 20-40% yield losses annually
  • Information gaps cost farmers billions in potential income
  • Lack of government scheme awareness limits benefit utilization

Technology Gap:

  • 67% of farmers lack internet access for research
  • Limited multilingual agricultural content
  • Complex technical information not farmer-friendly

๐ŸŽฏ Target Users

Primary: Small-scale farmers in developing regions Secondary: Agricultural extension workers, rural communities Tertiary: Agricultural students, researchers, policy makers


๐Ÿ’ก Solution Approach

๐Ÿค– Agentic AI Architecture

Retrieval-Augmented Generation (RAG):

  1. Knowledge Ingestion: Curated agricultural databases from trusted sources
  2. Vector Indexing: Semantic search capabilities using FAISS
  3. Query Processing: Multi-language natural language understanding
  4. Context Retrieval: Relevant information extraction from knowledge base
  5. Response Generation: AI synthesis of contextual, actionable advice

Multi-Modal Access:

  • Voice: Web Speech API for low-literacy accessibility
  • Text: Traditional input with multilingual support
  • SMS: Offline-capable service for remote areas

Intelligence Features:

  • Context Awareness: Understands farming context and regional practices
  • Confidence Scoring: Transparent reliability indicators
  • Source Attribution: Traceable advice to trusted agricultural sources
  • Continuous Learning: Expandable knowledge base architecture

๐Ÿ”ฎ Future Scope

๐ŸŒฑ Short-term Enhancements (3-6 months)

  • Image Recognition: Plant disease diagnosis from photos
  • Weather Integration: Hyperlocal weather-based recommendations
  • Regional Languages: Add 5+ Indian regional languages
  • Offline Mode: Progressive Web App with offline capabilities
  • Farmer Profiles: Personalized recommendations based on farm data

๐ŸŒพ Medium-term Features (6-12 months)

  • IoT Integration: Soil sensors and smart farming devices
  • Market Prices: Real-time crop pricing and market intelligence
  • Community Platform: Farmer-to-farmer knowledge sharing
  • Government Integration: Direct scheme application assistance
  • Expert Consultation: Video calls with agricultural experts

๐ŸŒ Long-term Vision (1-2 years)

  • Global Expansion: Support for 20+ languages and regions
  • Advanced AI: Specialized models for different crop types
  • Blockchain: Transparent supply chain and certification
  • Carbon Credits: Sustainable farming practice tracking
  • Predictive Analytics: AI-powered yield and risk predictions

๐Ÿงฉ Known Issues & Limitations

Current Limitations

  • Voice Recognition: Works best in Chrome, Edge, Safari browsers
  • SMS Integration: Demo mode only (no actual SMS delivery in free tier)
  • Knowledge Base: Limited to general agricultural practices (expanding)
  • Languages: Currently supports English and Hindi only
  • Offline: Requires internet connection for AI processing

๐Ÿ”ง Planned Fixes

  • Browser compatibility improvements for voice features
  • Enhanced SMS provider integration with larger free tiers
  • Expanded knowledge base with region-specific information
  • Progressive Web App features for offline basic functionality

๐Ÿค Contributing

We welcome contributions from the agricultural technology community!

๐ŸŒŸ Ways to Contribute

  • Agricultural Knowledge: Add region-specific farming practices
  • Language Support: Translations and localized content
  • UI/UX Improvements: Accessibility and design enhancements
  • Technical Features: Voice recognition, SMS integration improvements
  • Documentation: Guides, tutorials, and example usage

๐Ÿ“ Contribution Process

# Fork the repository
git fork https://github.com/surajsk2003/FARMLINK.git

# Create feature branch  
git checkout -b feature/amazing-feature

# Make changes and commit
git commit -m 'Add amazing agricultural feature'

# Push to branch
git push origin feature/amazing-feature

# Open Pull Request

๐ŸŽฏ Areas Needing Help

  • Regional agricultural practices database
  • Multi-language translations
  • Mobile app development (React Native)
  • Advanced AI model fine-tuning
  • Government scheme database updates

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

Why Open Source?

  • Agricultural knowledge should be freely accessible
  • Community-driven improvements benefit all farmers
  • Transparent AI systems build trust with users
  • Collaborative development accelerates innovation

๐Ÿ† Recognition & Awards

Capital One Launchpad 2025 Hackathon

  • Category: Agentic AI Solutions for Agriculture
  • Focus: High-impact societal applications of AI technology
  • Theme: Democratizing agricultural knowledge through intelligent systems

๐Ÿ‘จโ€๐Ÿ’ป Author

Suraj Kumar
B.Tech Computer Science
National Institute of Technology Karnataka (NITK), Surathkal

๐ŸŒ Connect With Me

๐ŸŽ“ Background

Passionate about leveraging AI technology for social impact, particularly in agricultural development. Experienced in full-stack development, machine learning, and creating accessible technology solutions for underserved communities.


๐Ÿ™ Acknowledgments

๐ŸŒพ Agricultural Expertise

  • Government Agricultural Portals: PM-KISAN, Kisan Call Center resources
  • Agricultural Universities: Best practices and research publications
  • Extension Services: Field-tested farming recommendations
  • Farmer Communities: Real-world insights and feedback

๐Ÿค– Technology Partners

  • Vercel: Frontend hosting and global CDN
  • Render: Backend deployment and scaling
  • Open Source Community: React, FastAPI, and ML libraries
  • AI Research: Transformer models and RAG architectures

๐Ÿ’ก Inspiration

Special thanks to farmers worldwide who inspired this project through their dedication to feeding the world despite facing information and resource challenges.


๐ŸŒพ Made with โค๏ธ for Farmers Worldwide

Star โญ this repo if FarmLink helped you or could help farmers in your community!

GitHub stars GitHub forks


๐Ÿš€ Try FarmLink Live | ๐Ÿ“š Explore Code | ๐Ÿค Contribute

Empowering farmers through intelligent technology - one question at a time.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •