๐ This project is a part of Nexus Spring of Code (NSoC) 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.
- Pick an issue labeled with
level1,level2, orlevel3or raise an issue - Ask to be assigned before starting work
- Submit a Pull Request with
NSoC'26in the title - Follow proper contribution guidelines
- โ 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
level1โ Beginner (level 1)level2โ Intermediate (level 2)level3โ Advanced (level 3)
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 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.
- ๐ฑ 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)
- 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)
<<<<<<< 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
Requirements: Node.js (v16+), npm/yarn, Python 3.9+, pip, Firebase CLI (optional).
<<<<<<< HEAD
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-saathicd frontendnpm installnpm startnpm run buildcd ../backendpython -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtexport FLASK_APP=app.py
export FLASK_ENV=developmentflask run-
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)
>>>>>>> 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
=======
>>>>>>> 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
=======
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.)
-
Frontend: use React Testing Library / Jest
-
Backend: pytest / unittest
-
Add CI with GitHub Actions for linting + tests + deploy
Provide farmers with a lightweight, region-aware digital assistant that reduces risk, improves yields, and encourages sustainable decisions through actionable insights.
-
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