Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Raitha - Smart Farming Assistant

A comprehensive Flask-based web application designed to help farmers with crop recommendations, soil analysis, and farming guidance in both English and Kannada.

🌾 Features

Core Functionality

  • 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 Features

  • User Registration & Login
  • Password Recovery
  • Responsive Design for Mobile/Desktop

📁 Project Structure

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

🚀 Getting Started

Prerequisites

  • Python 3.8+
  • pip

Installation

  1. Clone the repository:
git clone https://github.com/HarshithaSatthish/raitha-main.git
cd raitha-main
  1. Create a virtual environment:
# Windows
python -m venv venv
.\venv\Scripts\Activate.ps1

# Linux/macOS
python3 -m venv venv
source venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application:
# Windows
$env:FLASK_APP = 'app.py'
flask run

# Linux/macOS
export FLASK_APP=app.py
flask run
  1. Open https://kisan-yojan-1.onrender.com/ in your browser

🌐 Deployment

Heroku Deployment

  1. Install Heroku CLI
  2. Login to Heroku:
heroku login
  1. Create a new Heroku app:
heroku create your-app-name
  1. Deploy the application:
git push heroku main
  1. Open the app:
heroku open

📱 Soil Type Guide

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

🛠️ Tech Stack

  • Backend: Flask (Python)
  • Frontend: HTML5, CSS3, JavaScript
  • Database: JSON files (crops.json, favorites.json)
  • ML: scikit-learn (Text classification)
  • Deployment: Heroku

📄 License

This project is open source and available for contributions.

🤝 Contributing

Feel free to submit issues and pull requests to improve the project.


Made with 💚 for Indian Farmers

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages