Skip to content

asheesh109/KisanAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

45 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

KisanAI

KisanAI an open source, farmer facing Next.js app providing curated government schemes, market prices, voice assistant, and tools to help farmers make informed decisions.

Badges: [build] [license] [contributors]

Overview

  • Purpose: central portal for Indian farmers with translations, AI assisted insights, and offline friendly features.
  • Tech: Next.js (App Router), React, TypeScript, Tailwind CSS, Jest

Quick links

  • Documentation: docs/
  • Contributing: CONTRIBUTING.md
  • Issue templates: .github/ISSUE_TEMPLATE/
  • CI: .github/workflows/

Getting started (developer) See docs/LOCAL_SETUP.md for local setup instructions and environment variables.

Contributing We welcome contributions. Read CONTRIBUTING.md and the code of conduct before opening issues or PRs.

Community

Maintainers

  • See CODEOWNERS and repository maintainers in the docs.

KisanAI

KisanAI AI powered assistant for farmers to access crop insights, schemes, market data, and voice tools.

Table of Contents

  • About
  • Features
  • Screenshots
  • Architecture
  • Folder Structure
  • Quick Start
  • Local Development Badges: [build] [license] [contributors] [GSSoC]
  • Tech Stack
  • Contributing
  • Open Source Programs
  • Maintainers
  • Roadmap
  • License

About

KisanAI is a progressive web app built with Next.js + TypeScript that provides farmers with contextual agricultural information, government scheme guidance, calendar/task management, and voice-based interactions.

Features

  • AI-assisted crop analysis

  • Voice assistant (speech recognition + synthesis)

  • Offline-first data with IndexedDB

  • Market price and weather integrations

  • Government scheme tracking

  • Responsive, accessible UI

  • Maintainer: Ashish Parab (asheesh109) β€” ashishparab03@gmail.com

Architecture Overview

  • Next.js for SSR/SSG and API routes
  • React components structured under src/components
  • Business logic and utilities under src/lib
  • Hooks under src/hooks
  • Data seeds under src/data

Folder Structure

Key folders:

  • src/app/ β€” Next.js routes and pages
  • src/components/ β€” UI components
  • src/hooks/ β€” Reusable hooks
  • src/lib/ β€” Utilities, API, DB adapters
  • src/data/ β€” Seed data and fixtures
  • src/types/ β€” Shared TypeScript types

Quick Start

  1. Clone
git clone https://github.com/asheesh109/KisanAI.git
cd KisanAI
npm install
  1. Run locally
npm run dev
  1. Run tests / lint
npm run test
npm run lint
npm run type-check

Environment Variables

Create .env.local with at least:

  • NEXT_PUBLIC_API_URL β€” API base URL
  • MONGODB_URI β€” optional DB connection
  • OPENAI_API_KEY β€” optional for AI features

Tech Stack

  • Next.js, React, TypeScript
  • TailwindCSS
  • Jest + React Testing Library
  • GitHub Actions for CI

Contributing

We welcome contributions. Please read CONTRIBUTING.md first.

Open Source Programs

This repo is organized and labeled to support GSSoC and Hacktoberfest contributors.

Contributor Journey

A concise flow for new contributors:

Discover issue -> Claim -> Create branch -> Implement -> Open PR -> Review -> Merge
  • Beginner-friendly: look for good first issue or beginner labels.
  • For program-specific guidance see docs/GSSOC_GUIDE.md and docs/HACKTOBERFEST_GUIDE.md.

Community & Maintainer Support

Maintainers

  • See CODEOWNERS for primary maintainers.

Roadmap

See ROADMAP.md

License

MIT β€” see LICENSE

🌾 KisanAI - AI-Powered Farmer Assistant Platform

Next.js React TypeScript Tailwind CSS

GSSoC-2025 Hacktoberfest Open Source

Empowering Indian Farmers with AI-Powered Intelligence πŸš€

Features β€’ Demo β€’ Installation β€’ Contributing β€’ Roadmap β€’ Community


πŸ“± About KisanAI

KisanAI is a cutting edge AI powered farmer assistant platform designed specifically for Indian farmers. Built with modern web technologies and powered by advanced AI models, KisanAI provides intelligent, actionable insights to help farmers make better decisions.

Whether it's crop disease analysis, weather forecasting, market prices, or government scheme navigation, KisanAI delivers comprehensive assistance through an intuitive, voice-enabled interface in Hindi and English.

🎯 Mission

To democratize AI-powered agricultural intelligence, making it accessible to every farmer in India through simple, voice-enabled technology.

πŸ’‘ Vision

A future where every farmer has access to real-time insights, AI-powered decision support, and government benefit information, breaking down barriers of literacy and technology adoption.


✨ Features

🎀 Voice Assistant

  • Hindi & English Support: Natural language voice interaction
  • Speech Recognition: Accurate voice input processing
  • Text-to-Speech: Clear audio responses
  • Offline Capable: Works without internet connection
  • Multi-turn Conversations: Context-aware dialogues

πŸ“Έ Crop Disease Analysis

  • Image Upload: Analyze crop diseases from photos
  • AI Detection: Using Gemini Vision API
  • Disease Identification: Instant diagnosis with confidence scores
  • Treatment Recommendations: Actionable solutions
  • Disease Prevention: Tips for future prevention

🌦️ Weather Forecasting

  • Location-Based: Precise weather data for farmer's location
  • 7-Day Forecast: Extended weather predictions
  • Alerts: Severe weather notifications
  • Rainfall Data: Monsoon and precipitation tracking
  • Historical Data: Seasonal patterns and analysis

πŸ“ˆ Market Prices

  • Real-Time Updates: Live market data
  • Price Trends: Historical price analysis
  • Market Insights: Supply-demand indicators
  • Price Alerts: Notification system for price changes
  • Multi-Commodity: Coverage of major agricultural commodities

πŸ“‹ Government Schemes Portal

  • Scheme Discovery: Browse all major government schemes
  • Eligibility Checker: Interactive tool to find applicable schemes
  • Application Support: Step-by-step KCC and other applications
  • Benefits Lookup: Understand scheme benefits clearly
  • Application Status: Track submitted applications

πŸ’³ KCC Application System

  • Digital Forms: Streamlined application process
  • Document Management: Upload and manage documents
  • Status Tracking: Real-time application status
  • Mobile Optimized: Complete on mobile devices
  • Hindi Support: Forms available in Hindi

🌐 Internationalization

  • Hindi Language: Complete Hindi localization
  • English Support: Full English interface
  • Easy Addition: Extensible i18n system for more languages
  • Regional Context: Location-specific content

πŸ“± Progressive Web App

  • Offline First: Works without internet
  • Install to Home: App-like experience
  • Push Notifications: Stay updated
  • Fast Loading: Optimized performance
  • Mobile Responsive: Perfect on all devices

πŸ–ΌοΈ Screenshots

Feature Preview
Home Page Dashboard with quick access to all features
Voice Assistant Conversational AI in Hindi and English
Crop Analysis Disease detection from images
Market Prices Real-time commodity pricing
Schemes Portal Government schemes discovery
Weather Location-based weather forecasts

Screenshots coming soon - Help us add them!


πŸš€ Live Demo

Live URL: kisanai (Demo environment - May contain sample data)

Try features:


πŸ’» Tech Stack

Frontend

  • Framework: Next.js 16 (React 19)
  • Language: TypeScript 5
  • Styling: Tailwind CSS 4.1
  • UI Components: Radix UI, Lucide Icons
  • Animations: Framer Motion
  • Forms: Custom React forms with validation

Backend

  • Runtime: Node.js
  • Database: MongoDB with Mongoose
  • API Client: Axios
  • AI Integration: Google Generative AI (Gemini)
  • Voice: ElevenLabs TTS

Development

  • Testing: Jest + React Testing Library
  • Linting: ESLint
  • Type Checking: TypeScript
  • Build Tool: Next.js Build System
  • Package Manager: npm

Deployment

  • Target: Vercel / Self-hosted
  • PWA: next-pwa for offline support

πŸ“ Project Structure

KisanAI/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                      # Next.js App Router
β”‚   β”‚   β”œβ”€β”€ api/                  # API routes
β”‚   β”‚   β”œβ”€β”€ layout.jsx            # Root layout
β”‚   β”‚   β”œβ”€β”€ page.jsx              # Home page
β”‚   β”‚   β”œβ”€β”€ crop-analysis/        # Crop disease analysis
β”‚   β”‚   β”œβ”€β”€ kcc-application/      # KCC application form
β”‚   β”‚   β”œβ”€β”€ market-prices/        # Market prices
β”‚   β”‚   β”œβ”€β”€ schemes/              # Government schemes
β”‚   β”‚   β”œβ”€β”€ voice-assistant/      # Voice chat interface
β”‚   β”‚   β”œβ”€β”€ weather/              # Weather forecasting
β”‚   β”‚   └── calendar/             # Farming calendar
β”‚   β”‚
β”‚   β”œβ”€β”€ components/               # React components
β”‚   β”‚   β”œβ”€β”€ layout/               # Layout components
β”‚   β”‚   β”œβ”€β”€ ui/                   # Reusable UI components
β”‚   β”‚   └── [feature]/            # Feature-specific components
β”‚   β”‚
β”‚   β”œβ”€β”€ hooks/                    # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ useSpeechRecognition.js
β”‚   β”‚   β”œβ”€β”€ useSpeechSynthesis.js
β”‚   β”‚   └── [custom hooks]/
β”‚   β”‚
β”‚   β”œβ”€β”€ lib/                      # Utility libraries
β”‚   β”‚   β”œβ”€β”€ api.ts               # API client
β”‚   β”‚   β”œβ”€β”€ mongodb.ts           # Database connection
β”‚   β”‚   β”œβ”€β”€ geminiTranslate.ts   # AI integration
β”‚   β”‚   └── [utilities]/
β”‚   β”‚
β”‚   β”œβ”€β”€ data/                     # Static data
β”‚   β”œβ”€β”€ types/                    # TypeScript types
β”‚   β”œβ”€β”€ contexts/                 # React contexts
β”‚   └── __tests__/                # Test files
β”‚
β”œβ”€β”€ public/                       # Static assets
β”œβ”€β”€ docs/                         # Documentation
β”œβ”€β”€ .github/                      # GitHub config
β”‚   β”œβ”€β”€ workflows/                # CI/CD workflows
β”‚   β”œβ”€β”€ ISSUE_TEMPLATE/           # Issue templates
β”‚   └── pull_request_template.md
β”‚
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
β”œβ”€β”€ tailwind.config.js
β”œβ”€β”€ next.config.js
β”œβ”€β”€ jest.config.js
β”œβ”€β”€ eslint.config.mjs
β”œβ”€β”€ README.md                     # You are here
β”œβ”€β”€ CONTRIBUTING.md               # Contribution guide
β”œβ”€β”€ CODE_OF_CONDUCT.md           # Community guidelines
β”œβ”€β”€ ROADMAP.md                    # Development roadmap
β”œβ”€β”€ SECURITY.md                   # Security policy
└── LICENSE                       # MIT License

πŸ—οΈ Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     User Interface                   β”‚
β”‚  (Next.js/React Components + Tailwind CSS)          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                 β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  API Routes Layer                    β”‚
β”‚  (Voice Processing, Image Analysis, Data Fetch)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                 β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Service Layer                          β”‚
β”‚  (AI Integration, Data Processing, Business Logic) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                 β”‚
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚                     β”‚                β”‚            β”‚
β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  MongoDB   β”‚  β”‚ Gemini API    β”‚  β”‚ ElevenLabs    β”‚  β”‚ Weather API β”‚
β”‚  Database  β”‚  β”‚ (AI/Vision)   β”‚  β”‚ (Voice)       β”‚  β”‚ (Data)      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Installation & Setup

Prerequisites

  • Node.js: 18.0 or higher (Download)
  • npm: 9.0 or higher (comes with Node.js)
  • Git: Latest version (Download)
  • MongoDB: Local instance or cloud connection string

Quick Start (5 minutes)

# 1. Clone the repository
git clone https://github.com/yourusername/KisanAI.git
cd KisanAI

# 2. Install dependencies
npm install

# 3. Configure environment variables
cp .env.example .env.local
# Edit .env.local with your API keys

# 4. Start development server
npm run dev

# 5. Open in browser
open http://localhost:3000

Environment Variables

Create .env.local file:

# MongoDB
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/kisanai

# Google Gemini API
NEXT_PUBLIC_GEMINI_API_KEY=your_gemini_api_key
GEMINI_MODEL=gemini-pro-vision

# ElevenLabs Voice API
ELEVENLABS_API_KEY=your_elevenlabs_key

# Weather API
WEATHER_API_KEY=your_weather_api_key

# App Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3000
NODE_ENV=development

Development Commands

# Start development server with turbopack
npm run dev

# Build for production
npm run build

# Start production server
npm start

# Run tests
npm test

# Run tests in watch mode
npm run test:watch

# Generate coverage report
npm run test:coverage

# Lint code
npm run lint

# Format code
npm run format

πŸ§ͺ Testing

We use Jest and React Testing Library for comprehensive testing.

# Run all tests
npm test

# Watch mode (re-run on changes)
npm run test:watch

# Generate coverage report
npm run test:coverage

# CI mode (for GitHub Actions)
npm run test:ci

Testing Structure

src/__tests__/
β”œβ”€β”€ components/     # Component tests
β”œβ”€β”€ hooks/         # Hook tests
β”œβ”€β”€ pages/         # Page tests
└── lib/           # Utility tests

Testing Guide | Example Tests


πŸ“– Documentation

Complete documentation is available in the docs/ directory:

Document Purpose
CONTRIBUTING.md How to contribute to the project
CODE_OF_CONDUCT.md Community guidelines
ROADMAP.md Development timeline and features
docs/ARCHITECTURE.md Technical architecture
docs/API.md API documentation
docs/SETUP.md Detailed setup guide
docs/CODING_STANDARDS.md Code style guide

πŸŽ“ Getting Started as a Contributor

For Beginners

  1. Read CONTRIBUTING.md - Understand our process
  2. Check Good First Issues - Find starter tasks
  3. Follow Setup Guide - Get development environment running
  4. Read CODING_STANDARDS.md - Learn code style
  5. Create your PR! - Submit changes

For Intermediate Developers

For Advanced Contributors

  • Check Advanced Issues
  • Lead feature implementation
  • Review and mentor other contributors
  • Help maintain architecture quality

πŸ”— GSSoC 2025 & Hacktoberfest

GSSoC 2025 Support ✨

KisanAI is an official GSSoC 2025 project!

  • πŸ“ 110+ Issues specifically curated for different skill levels
  • πŸ† Regular Milestones with achievable goals
  • πŸ‘₯ Active Mentorship from core team
  • 🎯 Clear Learning Path for beginners
  • πŸš€ Real-world Impact helping Indian farmers

Start Contributing to make a difference!

Hacktoberfest Support πŸŽƒ

Perfect for Hacktoberfest participation:

  • βœ… Beginner-friendly issues tagged good-first-issue
  • βœ… Issues labeled hacktoberfest for easy filtering
  • βœ… Quick-win tasks perfect for month-long challenge
  • βœ… Supportive community for first-time contributors

Find Hacktoberfest Issues


🌟 Features Roadmap

βœ… Current Phase (v0.1.0)

  • Voice Assistant with Hindi support
  • Crop disease analysis
  • Market prices tracking
  • Government schemes portal
  • KCC application system
  • Weather forecasting

πŸ”„ Next Phase (v0.2.0)

  • User authentication & profiles
  • Saved preferences & bookmarks
  • Community discussions
  • Expert consultation booking
  • Mobile app (React Native)

πŸš€ Future Phase (v0.3.0+)

  • IoT sensor integration
  • Predictive analytics
  • Blockchain for certifications
  • Farmer marketplace
  • Insurance integration

See Full Roadmap


πŸ‘₯ Contributors

We ❀️ our contributors!

Want to join? Start here!


🀝 Community

Get Help

Connect With Us

Code of Conduct

Please read our CODE_OF_CONDUCT.md - we are committed to providing a welcoming and inclusive environment.


πŸ“„ License

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

By contributing, you agree that your contributions will be licensed under its MIT License.


πŸ™ Acknowledgments

Mentors & Advisors

  • Special thanks to all GSSoC mentors
  • Community moderators and code reviewers
  • Agricultural domain experts

Libraries & Resources


πŸ“š Additional Resources


Made with ❀️ for Indian Farmers

⭐ Star us on GitHub if you find this project helpful!

Contribute β€’ Discuss β€’ Report Bug β€’ Request Feature

🌾 KisanAI - Empowering Farmers with AI πŸš€
- **Production Ready**: Optimized build with zero errors

πŸ“– Documentation

🀝 Contributing

This project is designed to help Indian farmers access technology and government benefits. Contributions are welcome!

πŸ“„ License

This project is developed as part of the Digital India initiative to empower farmers.


Demo URL: http://localhost:3001 (when running locally)
Status: Phase 1 Complete - Ready for AI/ML Integration
Last Updated: August 8, 2025

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

About

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

Β 
Β 
Β 

Contributors