� FarmForward is an AI-powered agriculture management platform that helps farmers make data-driven decisions for crop cultivation. The platform integrates machine learning models with environmental data to provide personalized crop recommendations and farm management tools.
- 📍 Features: AI Crop Recommendations, Plot Management, Environmental Monitoring
- 🎓 Technology: React + TypeScript, Firebase, Python ML Models
- 📅 Built During: MLH Hackathon 2025
- ML Model Integration — Uses RandomForest classifier trained on environmental data (temperature, humidity, pH, rainfall) to recommend optimal crops
- Real-time Predictions — Provides instant crop recommendations with confidence scores and detailed reasoning
- Comprehensive Database — Includes yield expectations, market prices, and growth duration for recommended crops
- Plot Management — Create and manage multiple farm plots with environmental data tracking
- Environmental Monitoring — Track temperature, humidity, pH levels, and rainfall data
- Data Visualization — Interactive charts for weather forecasts and agricultural metrics
- User Authentication — Secure user accounts with plot-specific data
- Real-time Database — Firestore integration for plot and crop data management
- Cloud Storage — Scalable data storage for farm records and ML predictions
hackthon/
├── webapp/ # React TypeScript frontend
│ ├── src/
│ │ ├── components/ # UI components including PlotSetupDialog
│ │ ├── lib/ # Services (database, ML, Firebase)
│ │ ├── hooks/ # Custom React hooks (useAuth, usePlots)
│ │ └── types/ # TypeScript type definitions
│ └── package.json
├── python-ML/ # Machine Learning model
│ ├── train_crop_recommendation.py
│ ├── Crop_recommendation.csv
│ └── artifacts/ # Trained model files
└── README.md
- Temperature (°C) - Average temperature conditions
- Humidity (%) - Average humidity levels
- pH Level (0-14) - Soil acidity/alkalinity
- Rainfall (mm) - Annual precipitation
Rice, Maize, Wheat, Cotton, Sugarcane, Coffee, Coconut, Jute
- Algorithm: RandomForest Classifier
- Features: 4 environmental parameters
- Training Data: Crop recommendation dataset with 2200+ samples
- Accuracy: 95%+ on test data
- Node.js 18+
- Firebase account
- Python 3.8+ (for ML model training)
-
Clone the repository
git clone https://github.com/bakardd/hackthon.git cd hackthon -
Setup Frontend
cd webapp npm install cp .env.example .env # Add your Firebase configuration to .env npm run dev
-
Setup ML Model (Optional - pre-trained model included)
cd python-ML pip install -r requirements.txt python train_crop_recommendation.py --csv Crop_recommendation.csv --out-dir artifacts
Create webapp/.env with your Firebase configuration:
VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_auth_domain
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_storage_bucket
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
VITE_FIREBASE_MEASUREMENT_ID=your_measurement_id
- Create Account - Sign up for a new farmer account
- Add Plots - Create farm plots with environmental data
- Get Recommendations - Receive AI-powered crop recommendations
- Monitor Progress - Track crop growth and environmental conditions
- Manage Farm - Update plot information and harvest records
- React 18 with TypeScript
- Vite for fast development
- Tailwind CSS + Shadcn/UI for styling
- React Router for navigation
- TanStack Query for state management
- Firebase Authentication - User management
- Firestore - NoSQL database
- Firebase Storage - File uploads
- Firebase Analytics - Usage tracking
- Python with scikit-learn
- RandomForest Classifier
- Feature Engineering (StandardScaler, LabelEncoder)
- Model Persistence (joblib)
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- MLH - For organizing amazing hackathons
- Firebase - For backend infrastructure
- Scikit-learn - For ML model capabilities
- Shadcn/UI - For beautiful React components
This profile was generated by GitHub Copilot using the GitHub and MyMLH MCP Servers at an MLH (Major League Hacking) student hackathon. Find events near you at mlh.io/events.