#
FarmFlux
GitHub · vxrachit/FarmFlux
FarmFlux brings together soil analysis, crop-disease detection, weather insight, and a Gemini-powered chatbot—helping farmers make informed, data-driven decisions.
#
Feature Highlights
#
Screenshots
#
Tech Stack
#
Project Structure
FarmFlux
├── frontend
│ ├── src/components # UI Components
│ ├── src/context # Language & Auth Contexts
│ ├── src/services # API Calls (weather, auth)
│ └── App.tsx # Route definitions
│
├── backend
│ ├── app
│ ├── api/ # Route handlers (FastAPI routers)
│ │ ├── chatbot.py
│ │ ├── crop_recommendation.py
│ │ ├── disease_detection.py
│ │ ├── supabase.py # Login/Signup routes via Supabase
│ │ └── weather.py
│ │
│ ├── core/ # App configuration & startup logic
│ │ └── config.py
│ │
│ ├── models/ # Pydantic models and data schemas
│ │ ├── chatbot.py
│ │ ├── crop_recommendation.py
│ │ ├── disease_detection.py
│ │ ├── supabase.py
│ │ └── weather.py
│ │
│ └── services/ # External service utilities (OpenAI, Weather, etc.)
│ │ ├── gemini_services.py
│ │ ├── supabase_client.py
│ │ └── weather_services.py
│ │
│ └── main.py # FastAPI app startup & route includes
│
├── requirements.txt # Python dependencies
├── .env # Environment variables (DO NOT COMMIT)
└── README.md # Project documentation
#
Setup & Run Locally
# 1 clone repo
git clone https://github.com/vxrachit/FarmFlux.git && cd FarmFlux
# 2 backend
cd backend
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000
# 3 frontend
cd ../frontend
npm install
npm run dev
Open http://localhost:5173 and configure your Gemini and Supabase keys in the respective .env files.
#
Authentication Flow
React login form ➜ POST /api/login ➜ FastAPI proxy ➜ Supabase Auth ➜ JWT ➜ localStorage ➜ protected routes
#
Upcoming
- Batch image upload for multi-leaf diagnosis
- Offline TensorFlow.js fallback for field use
- Crop-rotation planner & expense ledger
- SMS push alerts in rural networks
#
License
MIT © Rachit Verma — free to fork & adapt.