Skip to content

Eshajha19/agri

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

316 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒฑ Fasal Saathi

NSoC 2026

๐Ÿš€ This project is a part of Nexus Spring of Code (NSoC) 2026


๐Ÿ“˜ Nexus Spring of Code 2026

This repository is officially participating in Nexus Spring of Code 2026 (NSoC'26).

We welcome contributors from the NSoC program to collaborate and improve this project.

๐Ÿง‘โ€๐Ÿ’ป For Contributors

  • Pick an issue labeled with level1, level2, or level3 or raise an issue
  • Ask to be assigned before starting work
  • Submit a Pull Request with NSoC'26 in the title
  • Follow proper contribution guidelines

๐Ÿ“Œ Contribution Rules (NSoC Specific)

  • โœ… PR must include NSoC'26 tag
  • โœ… Issue must be assigned before PR
  • โŒ PR without assignment will be closed
  • โŒ Inactive contributors (7 days) may be unassigned

๐Ÿท๏ธ Issue Labels

  • level1 โ€” Beginner (level 1)
  • level2 โ€” Intermediate (level 2)
  • level3 โ€” Advanced (level 3)

โš ๏ธ Note

This project follows all rules and guidelines defined under the Nexus Spring of Code 2026 program.

Any misuse, spam, or low-quality contributions will not be accepted.


๐ŸŒพ Fasal Saathi

Fasal Saathi is a smart agriculture assistance platform built with React (frontend), Python (backend) and Firebase (database/auth). The app delivers crop recommendations, weather-based alerts, soil health analysis, and fertilizer guidance to help farmers make informed decisions.


๐Ÿš€ Features

  • ๐ŸŒฑ Crop recommendation based on soil profile and regional climate
  • โ˜๏ธ Real-time weather updates and custom farming alerts
  • ๐Ÿงช Soil health analysis & nutrient suggestions
  • ๐ŸŒพ Fertilizer and pesticide guidance
  • ๐Ÿ“Š Responsive and user-friendly dashboard (React)
  • ๐Ÿ” Authentication & user profiles (Firebase)
  • ๐ŸŒ Multi-language support (planned / optional)

๐Ÿ› ๏ธ Tech Stack

  • Frontend: React.js (Create React App / Vite)
  • Backend: Python ( FastAPI)
  • Database: Firebase (Firestore / Realtime DB)
  • Auth: Firebase Authentication
  • External APIs: Weather API (e.g., OpenWeatherMap), Soil/Agro data APIs
  • Deployment: Vercel (frontend), Render (backend- in process)

๐Ÿ“ Project structure

<<<<<<< HEAD

=======

>>>>>>> upstream/main
Fasal-Saathi/
โ”œโ”€โ”€ backend/
โ”‚ โ”œโ”€โ”€ app.py # Flask/FastAPI app entry
โ”‚ โ”œโ”€โ”€ requirements.txt
โ”‚ โ”œโ”€โ”€ services/
โ”‚ โ”‚ โ”œโ”€โ”€ weather.py # Weather API wrapper
โ”‚ โ”‚ โ””โ”€โ”€ soil.py # Soil analysis logic / wrapper
โ”‚ โ””โ”€โ”€ utils/
โ”‚ โ””โ”€โ”€ ml_models.py # Optional: model for crop recommendation
โ”‚
โ”œโ”€โ”€ frontend/ # React application
โ”‚ โ”œโ”€โ”€ package.json
โ”‚ โ”œโ”€โ”€ public/
โ”‚ โ”‚ โ””โ”€โ”€ index.html
โ”‚ โ””โ”€โ”€ src/
โ”‚ โ”œโ”€โ”€ App.jsx
โ”‚ โ”œโ”€โ”€ index.jsx
โ”‚ โ”œโ”€โ”€ api/
โ”‚ โ”‚ โ””โ”€โ”€ apiClient.js # communicates with backend
โ”‚ โ”œโ”€โ”€ components/
โ”‚ โ”‚ โ”œโ”€โ”€ Dashboard/
โ”‚ โ”‚ โ”œโ”€โ”€ CropRecommender/
โ”‚ โ”‚ โ””โ”€โ”€ Auth/
โ”‚ โ”œโ”€โ”€ pages/
โ”‚ โ””โ”€โ”€ assets/
โ”‚
โ”œโ”€โ”€ firebase/ # firebase rules / config (optional)
โ”‚ โ””โ”€โ”€ firestore.rules
โ”‚
โ”œโ”€โ”€ scripts/
โ”‚ โ””โ”€โ”€ deploy.sh
โ”‚
โ”œโ”€โ”€ .env.example
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ LICENSE
<<<<<<< HEAD

=======

upstream/main


โš™๏ธ Installation & Local setup

Requirements: Node.js (v16+), npm/yarn, Python 3.9+, pip, Firebase CLI (optional).

<<<<<<< HEAD

1) Clone repository

git clone https://github.com/your-username/fasal-saathi.git
cd fasal-saathi

2) Frontend (React)
cd frontend
# Install dependencies
npm install
# Start dev server
npm start
# Build for production
npm run build

3) Backend (Python โ€” Flask example)
cd ../backend
# Create virtual env (optional)
python -m venv venv
source venv/bin/activate      # Windows: venv\Scripts\activate
pip install -r requirements.txt
# Run app
export FLASK_APP=app.py
export FLASK_ENV=development
# Set environment variables (see .env.example)
flask run


# 4) Firebase

Create a Firebase project.

Enable Firestore (or Realtime DB) and Firebase Auth (Email/Phone).

Add Firebase config to frontend env (see .env.example).

(Optional) Deploy security rules found in firebase/.

๐Ÿ” Environment variables (.env.example)
# Backend
=======
## Clone repository

```bash
git clone https://github.com/your-username/fasal-saathi.git
cd fasal-saathi

Frontend (React)

cd frontend

1. Install dependencies

npm install

2. Start dev server

npm start

3. Build for production

npm run build

Backend (Python โ€” Flask example)

cd ../backend

1. Create virtual env (optional)

python -m venv venv
source venv/bin/activate      # Windows: venv\Scripts\activate
pip install -r requirements.txt

2. Run app

export FLASK_APP=app.py
export FLASK_ENV=development

3. Set environment variables (see .env.example)

flask run

Firebase

  • Create a Firebase project.

  • Enable Firestore (or Realtime DB) and Firebase Auth (Email/Phone).

  • Add Firebase config to frontend env (see .env.example).

  • (Optional) Deploy security rules found in firebase/.

๐Ÿ” Environment variables (.env.example)

Backend

>>>>>>> upstream/main
WEATHER_API_KEY=your_weather_api_key
SOIL_API_KEY=your_soil_api_key
FIREBASE_ADMIN_CRED=/path/to/serviceAccountKey.json
BACKEND_PORT=5000
<<<<<<< HEAD

# Frontend
=======

Frontend

>>>>>>> upstream/main
REACT_APP_FIREBASE_API_KEY=xxxxxxxxxxxx
REACT_APP_FIREBASE_AUTH_DOMAIN=your-app.firebaseapp.com
REACT_APP_FIREBASE_PROJECT_ID=your-app
REACT_APP_BACKEND_URL=http://localhost:5000
<<<<<<< HEAD

๐Ÿงฉ API Endpoints (examples)

Backend (Flask)

GET /api/weather?lat={lat}&lon={lon} โ€” returns current weather + forecast

POST /api/soil/analyze โ€” send soil params (pH, NPK) to get recommendations

POST /api/crop/recommend โ€” returns recommended crops for given soil & climate

(Document exact request/response schemas in docs/ or OpenAPI spec.)

๐Ÿงช Testing

Frontend: use React Testing Library / Jest

Backend: pytest / unittest

Add CI with GitHub Actions for linting + tests + deploy

๐ŸŽฏ Objective

Provide farmers with a lightweight, region-aware digital assistant that reduces risk, improves yields, and encourages sustainable decisions through actionable insights.

๐Ÿ”ฎ Future scope & ideas

On-device offline support / PWA for low-connectivity regions

Integrate satellite / remote sensing for crop stress detection

SMS / WhatsApp alerts for farmers without smartphones

Integrate local market price data for crop sale recommendations

Train ML models using local farm historical data for precision recommendations
=======

โ˜† API Endpoints (examples)

Backend (Flask)

  • GET /api/weather?lat={lat}&lon={lon} โ€” returns current weather + forecast

  • POST /api/soil/analyze โ€” send soil params (pH, NPK) to get recommendations

  • POST /api/crop/recommend โ€” returns recommended crops for given soil & climate

(Document exact request/response schemas in docs/ or OpenAPI spec.)

โ˜† Testing

  • Frontend: use React Testing Library / Jest

  • Backend: pytest / unittest

  • Add CI with GitHub Actions for linting + tests + deploy

โ˜† Objective

Provide farmers with a lightweight, region-aware digital assistant that reduces risk, improves yields, and encourages sustainable decisions through actionable insights.

โ˜† Future scope & ideas

  • On-device offline support / PWA for low-connectivity regions

  • Integrate satellite / remote sensing for crop stress detection

  • SMS / WhatsApp alerts for farmers without smartphones

  • Integrate local market price data for crop sale recommendations

  • Train ML models using local farm historical data for precision recommendations

upstream/main

About

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors