Inspiration

Agriculture remains one of the most important sectors worldwide, yet many farmers still rely on experience and traditional knowledge when deciding which crops to plant. Incorrect crop selection often leads to lower yields, wasted resources, and reduced income.

Our team wanted to build a simple AI-powered solution that helps farmers make data-driven decisions. By analyzing soil nutrients and environmental conditions, AgroMind AI provides instant crop recommendations that can improve productivity while promoting sustainable agriculture.

What it does

AgroMind AI is a web-based crop recommendation platform powered by Machine Learning. Users simply input: Nitrogen (N) Phosphorus (P) Potassium (K) Temperature Humidity Soil pH Rainfall

The AI model then predicts:

  • The most suitable crop
  • Prediction confidence
  • Top 3 crop recommendations
  • Soil health indicator
  • Detailed crop information including harvest time, water requirements, temperature range, and soil pH. (The goal is to assist farmers, students, and agricultural practitioners in making faster and more accurate planting decisions.)

How we built it

We divided the project into three main components:

A) Machine Learning:

  • Trained a Random Forest classifier using a crop recommendation dataset.
  • Encoded crop labels using LabelEncoder.
  • Saved the trained model using Joblib.

B) Backend:

  • Developed with FastAPI for AI inference.
  • Built an Express.js middleware server to communicate between the frontend and AI model.
  • REST API handles prediction requests and returns recommendations with confidence scores.

C) Frontend:

  • Built using React and Vite.
  • Styled using Tailwind CSS.
  • Designed a modern responsive dashboard featuring prediction forms, animated confidence bars, crop information cards, and soil health visualization.

Challenges we ran into

During development we encountered several challenges:

  • Connecting the React frontend, Express backend, and FastAPI AI server simultaneously. Handling inconsistent crop name formatting between the Machine Learning model and frontend database.
  • Managing API communication and CORS configuration.
  • Creating an intuitive interface that presents AI predictions in a way that is easy for users to understand. -Optimizing the overall user experience within the limited hackathon development time.

Accomplishments that we're proud of

During development we encountered several challenges:

  • Connecting the React frontend, Express backend, and FastAPI AI server simultaneously.
  • Handling inconsistent crop name formatting between the Machine Learning model and frontend database.
  • Managing API communication and CORS configuration.
  • Creating an intuitive interface that presents AI predictions in a way that is easy for users to understand.
  • Optimizing the overall user experience within the limited hackathon development time.

What we learned

This project allowed us to gain practical experience in integrating Machine Learning with full-stack web development. We learned:

  • How to deploy ML models using FastAPI.
  • Communication between multiple backend services.
  • API integration using React and Express.
  • Building user-friendly AI applications.
  • Designing systems that translate complex AI outputs into understandable recommendations for end users.

What's next for AgroMind AI

We envision AgroMind AI becoming a more comprehensive digital farming assistant. Future improvements include:

  • Satellite and weather API integration.
  • Real-time climate prediction.
  • Fertilizer recommendation system.
  • Disease detection using computer vision.
  • Multi-language support.
  • Mobile application for Android and iOS.
  • Farmer dashboard with historical prediction records.
  • Personalized recommendations based on farm location and seasonal conditions.

Built With

Share this project:

Updates