A comprehensive Flask-based web application designed to help farmers with crop recommendations, soil analysis, and farming guidance in both English and Kannada.
- Crop Search: Search from 70+ crops with detailed information
- Soil-Based Recommendations: Get crop suggestions based on soil type (Laterite, Alluvial, Black, Red, Desert, Mountain)
- ML-Powered Crop Prediction: Text-based crop prediction using machine learning
- Favorites System: Save and manage favorite crops
- Language Toggle: Switch between English and Kannada
- Voice Support: Text-to-speech for farmer-friendly audio guidance
- User Registration & Login
- Password Recovery
- Responsive Design for Mobile/Desktop
raitha-main/
├── app.py # Main Flask application
├── requirements.txt # Python dependencies
├── runtime.txt # Python version specification
├── Procfile # Heroku deployment config
├── data/
│ ├── crops.json # Crop database (70+ crops)
│ ├── favorites.json # User favorites storage
│ ├── crop_text_model.pkl # ML prediction model
│ ├── crop_vectorizer.pkl # ML vectorizer
│ └── train_crop_model.py # Model training script
├── dataset/
│ └── crops_dataset_en_kn.csv # Bilingual crop dataset
├── static/
│ ├── css/
│ │ ├── style.css # Main styles
│ │ ├── data.js # Data constants
│ │ ├── i18n.js # Internationalization
│ │ └── language.js # Language management
│ ├── js/
│ │ └── main.js # Main JavaScript logic
│ ├── images/
│ │ └── placeholder.png
│ └── uploads/ # User uploaded images
└── templates/
├── index.html # Landing page
├── home.html # Main dashboard
├── login.html # User login
├── register.html # User registration
├── forgot_password.html # Password recovery
├── crop.html # Individual crop details
├── crop_search_full.html # Advanced search
├── categories.html # Crop categories
└── soil_scan.html # Soil analysis tool
- Python 3.8+
- pip
- Clone the repository:
git clone https://github.com/HarshithaSatthish/raitha-main.git
cd raitha-main- Create a virtual environment:
# Windows
python -m venv venv
.\venv\Scripts\Activate.ps1
# Linux/macOS
python3 -m venv venv
source venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Run the application:
# Windows
$env:FLASK_APP = 'app.py'
flask run
# Linux/macOS
export FLASK_APP=app.py
flask run- Open https://kisan-yojan-1.onrender.com/ in your browser
- Install Heroku CLI
- Login to Heroku:
heroku login- Create a new Heroku app:
heroku create your-app-name- Deploy the application:
git push heroku main- Open the app:
heroku open| Soil Type | Recommended Crops |
|---|---|
| Laterite | Tea, Coffee, Cashew, Coconut, Rubber |
| Alluvial | Rice, Wheat, Sugarcane, Jute, Maize |
| Black | Cotton, Soybean, Sunflower, Groundnut |
| Red | Groundnut, Millets, Cotton, Wheat, Pulses |
| Desert | Bajra, Barley, Guar, Mustard, Dates |
| Mountain | Maize, Barley, Tea, Walnut, Almond |
- Backend: Flask (Python)
- Frontend: HTML5, CSS3, JavaScript
- Database: JSON files (crops.json, favorites.json)
- ML: scikit-learn (Text classification)
- Deployment: Heroku
This project is open source and available for contributions.
Feel free to submit issues and pull requests to improve the project.
Made with 💚 for Indian Farmers