Skip to content

Abdul9010150809/cropyield-pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

27 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒฑ CropYield Pro - AI-Powered Crop Yield Prediction and Optimization

Smart India Hackathon Problem Statement Category Theme

๐Ÿ† Smart India Hackathon 2025 Submission

Problem Statement ID: 25044
Problem Statement Title: AI-Powered Crop Yield Prediction and Optimization
Organization: Government of Odisha
Department: Electronics & IT Department
Category: Software
Theme: Agriculture, FoodTech & Rural Development


๐Ÿ“‹ Problem Statement

Description

Develop an AI-based platform to predict crop yields using historical agricultural data, weather patterns, and soil health metrics. The system should provide actionable recommendations for farmers to optimize irrigation, fertilization, and pest control, tailored to specific crops and regional conditions.

Expected Outcome

A scalable software solution (web/mobile app) that helps small-scale farmers increase productivity by at least 10% through data-driven insights, with an interface supporting regional languages for accessibility.

Technical Feasibility

Utilizes machine learning models (e.g., regression, neural networks) trained on open-source agricultural datasets, integrated with APIs for real-time weather and soil data.


๐Ÿš€ Live Deployment

๐ŸŽฏ Solution Overview

CropYield Pro is a comprehensive AI-driven platform that empowers farmers with predictive analytics and actionable insights to optimize agricultural productivity. Our solution addresses the core requirements of the problem statement through advanced machine learning and real-time data integration.

โœ… Key Achievements

Requirement Our Solution
Crop Yield Prediction AI models analyzing multiple parameters for accurate yield forecasting
Weather Pattern Integration Real-time weather API integration with historical analysis
Soil Health Metrics Comprehensive soil analysis and nutrient monitoring
Actionable Recommendations Personalized irrigation, fertilization, and pest control advice
Regional Adaptation Location-specific insights for different agricultural zones
Scalable Platform Full-stack web application with mobile-responsive design
Accessibility Multi-language support framework (ready for regional languages)

โœจ Core Features

๐Ÿค– AI-Powered Prediction Engine

  • Multi-factor Analysis: Historical data, weather patterns, soil metrics
  • Machine Learning Models: Regression algorithms for yield prediction
  • Real-time Processing: Instant predictions based on current conditions
  • Confidence Scoring: Accuracy indicators for each prediction

๐ŸŒฆ๏ธ Smart Weather Integration

  • Real-time Weather Data: Current conditions and forecasts
  • Historical Analysis: Seasonal pattern recognition
  • Micro-climate Consideration: Location-specific weather impacts
  • Extreme Event Alerts: Early warnings for adverse conditions

๐ŸŒฑ Comprehensive Soil Health

  • Nutrient Analysis: NPK (Nitrogen, Phosphorus, Potassium) monitoring
  • pH Level Tracking: Soil acidity/alkalinity optimization
  • Moisture Management: Irrigation recommendations based on soil type
  • Organic Matter Assessment: Soil fertility indicators

๐Ÿ’ก Actionable Recommendations

  • Irrigation Optimization: Water usage efficiency improvements
  • Fertilization Schedule: Nutrient application timing and quantities
  • Pest Control Strategies: Integrated pest management solutions
  • Crop Rotation Advice: Sustainable farming practices

๐Ÿ“Š Farmer-Centric Dashboard

  • Intuitive Interface: Designed for farmers with varying tech literacy
  • Visual Analytics: Easy-to-understand charts and graphs
  • Multi-language Ready: Framework prepared for regional language integration
  • Mobile Responsive: Accessible on smartphones and tablets

๐Ÿ› ๏ธ Technical Implementation

Architecture Overview

๐ŸŒ Frontend (React + TypeScript)
    โ†“
๐Ÿ”— REST API (Node.js + Express)
    โ†“
๐Ÿค– ML Services (Python + Scikit-learn)
    โ†“
๐Ÿ“Š Data Layer (MongoDB Atlas)
    โ†“
๐ŸŒค๏ธ External APIs (Weather + Soil Data)

Technology Stack

Frontend Layer

  • React 18 with TypeScript for type safety
  • React Router for seamless navigation
  • Context API for state management
  • Chart.js for data visualization
  • Bootstrap 5 for responsive UI
  • Axios for API communication

Backend Layer

  • Node.js with Express.js framework
  • MongoDB Atlas for cloud database
  • Mongoose ODM for database operations
  • JWT for secure authentication
  • CORS for cross-origin requests
  • BCrypt for password hashing

AI/ML Components

  • Regression Models for yield prediction
  • Historical Data Analysis for pattern recognition
  • Real-time Data Processing for current conditions
  • Recommendation Engine for actionable insights

External Integrations

  • Weather APIs for real-time meteorological data
  • Soil Health APIs for nutrient analysis
  • Agricultural Datasets for training ML models

๐Ÿ—‚๏ธ Project Structure

cropyield-pro/
โ”œโ”€โ”€ ๐Ÿ“‚ backend/                 # Node.js/Express Backend
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ config/             # Database & environment configuration
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ controllers/        # Business logic and API handlers
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ middleware/         # Auth, validation, error handling
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ models/            # MongoDB schemas (User, Prediction, etc.)
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ routes/            # API endpoints (auth, prediction, weather)
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ services/          # Core business services
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿค– mlService.js           # AI/ML prediction algorithms
โ”‚   โ”‚   โ”œ๏ธ ๐ŸŒค๏ธ weatherService.js       # Weather data processing
โ”‚   โ”‚   โ””๏ธ ๐ŸŒฑ soilHealthService.js    # Soil analysis logic
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ utils/             # Utilities, logger, helpers
โ”‚   โ””โ”€โ”€ ๐Ÿš€ server.js          # Application entry point
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ src/                   # React Frontend
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ components/        # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ ๐ŸŽจ AuthModals.tsx     # Login/Registration
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿค– Chatbot.tsx        # AI farming assistant
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿงญ Navbar.tsx         # Navigation with multi-language support
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿฆถ Footer.tsx         # Application footer
โ”‚   โ”‚   โ”œโ”€โ”€ ๐ŸŒŸ HeroSection.tsx    # Landing page hero
โ”‚   โ”‚   โ”œโ”€โ”€ ๐ŸŒพ CropsSection.tsx   # Crop selection and display
โ”‚   โ”‚   โ”œโ”€โ”€ โญ FeaturesSection.tsx # Feature showcase
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“ˆ PredictionForm.tsx # Yield prediction interface
โ”‚   โ”‚   โ”œ๏ธ ๐ŸŒฑ SoilHealth.tsx      # Soil analysis component
โ”‚   โ”‚   โ”œ๏ธ ๐ŸŒฆ๏ธ WeatherAnalysis.tsx # Weather insights
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ›ก๏ธ ErrorBoundary.tsx  # Error handling
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ contexts/          # React Context for state management
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ” AuthContext.tsx    # User authentication state
โ”‚   โ”‚   โ””โ”€โ”€ ๐ŸŒ LanguageContext.tsx # Multi-language support
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ hooks/             # Custom React hooks
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ”Œ useApiHealth.js    # Backend connectivity monitoring
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ pages/             # Application pages
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ  HomePage.tsx                   # Landing page
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“ˆ PredictionAndOptimizationPage.tsx # Main prediction interface
โ”‚   โ”‚   โ”œโ”€โ”€ ๐ŸŒฑ SoilHealthPage.tsx             # Soil analysis dashboard
โ”‚   โ”‚   โ”œโ”€โ”€ ๐ŸŒฆ๏ธ WeatherAnalysisPage.tsx       # Weather insights
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ‘ค ProfilePage.tsx               # User profile & history
โ”‚   โ”‚   โ””โ”€โ”€ โ„น๏ธ AboutPage.tsx                 # About & documentation
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ services/          # API communication layer
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ”— api.ts              # Axios configuration & interceptors
โ”‚   โ”‚   โ”œโ”€โ”€ ๐ŸŽญ mockApi.ts          Development mock data
โ”‚   โ”‚   โ””โ”€โ”€ ๐ŸŒค๏ธ weather.ts          # Weather API service
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ types/             # TypeScript type definitions
โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ utils/             # Frontend utilities
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ documentation/         # Project documentation
โ”œโ”€โ”€ ๐Ÿ“‚ public/               # Static assets
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ index.html
โ”‚   โ”œโ”€โ”€ ๐ŸŽฏ manifest.json
โ”‚   โ””โ”€โ”€ โ“ 404.html           # Client-side routing fallback
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ .github/workflows/    # CI/CD pipelines
โ”‚   โ””โ”€โ”€ โš™๏ธ deploy.yml         # Automated GitHub Pages deployment
โ”‚
โ”œโ”€โ”€ ๐Ÿ› ๏ธ config-overrides.js   # React app configuration
โ”œโ”€โ”€ ๐Ÿ“ฆ package.json          # Dependencies & scripts
โ”œโ”€โ”€ ๐Ÿ“š README.md             # Project documentation
โ””โ”€โ”€ ๐Ÿท๏ธ tsconfig.json         # TypeScript configuration

๐ŸŽฏ ML Models & Algorithms

Yield Prediction Model

# Pseudocode for our prediction algorithm
def predict_yield(crop_type, soil_metrics, weather_data, historical_yields):
    # Feature engineering
    features = extract_features(soil_metrics, weather_data, historical_yields)
    
    # Ensemble model approach
    base_predictors = [RandomForest, GradientBoosting, NeuralNetwork]
    predictions = [model.predict(features) for model in base_predictors]
    
    # Weighted average based on model confidence
    final_prediction = weighted_ensemble(predictions)
    
    return final_prediction, confidence_interval

Recommendation Engine

  • Apriori Algorithm for association rule mining
  • Collaborative Filtering for similar farmer recommendations
  • Content-Based Filtering for crop-specific advice

๐Ÿ“Š Performance Metrics

Target Outcomes

  • โ‰ฅ10% Productivity Increase through optimized practices
  • โ‰ฅ90% Prediction Accuracy for crop yields
  • โ‰ค5% Resource Waste through precise recommendations
  • โ‰ฅ95% System Uptime for reliable access

Current Achievements

  • โœ… Full-stack deployment with cloud infrastructure
  • โœ… Real-time prediction capabilities
  • โœ… Multi-parameter analysis (soil, weather, historical)
  • โœ… Scalable architecture supporting multiple users
  • โœ… Mobile-responsive design for field access

๐Ÿš€ Installation & Setup

Development Environment

# Clone repository
git clone https://github.com/Abdul9010150809/cropyield-pro.git
cd cropyield-pro

# Install dependencies
pnpm install
cd backend && pnpm install && cd ..

# Environment setup
cd backend
cp .env.example .env
# Configure MongoDB, JWT secret, and API keys

# Start development servers
pnpm run dev:backend  # Starts backend on port 5001
pnpm run dev:frontend # Starts frontend on port 3000

Production Deployment

# Build and deploy
pnpm run build
pnpm run deploy

๐Ÿ”ฎ Future Enhancements

Phase 2: Advanced Features

  • Regional Language Support (Odia, Hindi, Telugu)
  • Mobile App Development (React Native)
  • IoT Sensor Integration for real-time field data
  • Blockchain for supply chain transparency
  • Satellite Imagery Analysis for large-scale monitoring

Phase 3: Enterprise Features

  • Government Integration for policy support
  • Marketplace for agricultural inputs
  • Insurance Integration for crop insurance
  • Export Market Analytics for international trade

๐Ÿ‘ฅ Team Contribution

Team Name: VISION IGNITERS
Team Leader: SHAIK.ABDUL SAMMED

Team Members

  • SHAIK.ABDUL SAMMED - Full-stack Development & AI Integration
  • ANJALI PATTURU - Backend Development & Database
  • SHAIK.SHAFI - Frontend Development & UI/UX
  • MANIDEEP - ML Models & Data Analysis
  • AKHILA REKAPOKALA - Testing & Documentation
  • CHAITAGNA - Deployment & DevOps

๐Ÿ“ž Contact & Support

Project Repository: https://github.com/Abdul9010150809/cropyield-pro
Issue Tracking: GitHub Issues
Documentation: Project Wiki


๐Ÿ“„ License

This project is developed for Smart India Hackathon 2023 under Problem Statement ID: 25044.
All rights reserved by the development team and submission guidelines.


๐ŸŒพ Transforming Agriculture Through AI & Innovation ๐ŸŒพ

Empowering Farmers โ€ข Enhancing Productivity โ€ข Building Sustainable Futures

Submitted for Smart India Hackathon 2025 - Problem Statement ID: 25044

Live Demo โ€ข Report Issue โ€ข View Code

About

Develop an AI-based platform to predict crop yields using historical agricultural data, weather patterns, and soil health metrics.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors