Dipanita45/AgriTech
AgriTech is an AI-powered web platform that offers crop recommendations, yield prediction, disease detection, and collaborative tools to empower farmers and promote smart, sustainable agriculture.
π± AgriTech β Smart Farming Solutions
π Table of Contents
- Overview
- Quick Start
- Application Preview
- System Architecture
- Core Features
- Tech Stack
- Project Structure
- Backend vs Frontend
- Security & Reliability
- Environment Variables
- Roadmap
- Contribution Flow
- Team
- Contributing & Support
- Contributors
- Production Deployment
- API Keys Guide
- Reporting Issues
- License
- FAQ
β οΈ Note: For production deployment, use a WSGI server likegunicorninstead of Flask's built-in server.
β οΈ Never commit your.envfile or API keys to the repository. Always keep secrets private!
AgriTech is an AI-powered smart agriculture platform designed to assist farmers with crop
recommendations, yield prediction, plant disease detection, and community-driven collaborationβenabling sustainable and data-driven farming practices.
π Overview
- AI-driven decision support for modern agriculture
- Early-stage plant disease detection
- Crop yield forecasting using machine learning models
- Collaborative ecosystem for farmers and stakeholders
π Quick Start
1οΈβ£ Clone the Repository
git clone https://github.com/omroy07/AgriTech.git
cd AgriTech2οΈβ£ Run Backend (Primary β Flask)
pip install -r requirements.txt
python app.pyBackend URL:
http://localhost:5000π Backend Health Check
GET http://localhost:5000/healthExpected response:
{ "status": "ok" }3οΈβ£ Run Frontend
cd src/frontend
python -m http.server 8000Frontend URL:
http://localhost:8000Note: Backend and frontend must be running simultaneously for proper functionality.
π₯οΈ Application Preview
ποΈ System Architecture
- User Input: Soil data and plant images
- Backend Processing: Flask APIs and model routing
- ML Inference:
- CNNs for disease detection
- Random Forest / XGBoost for crop recommendation
- Regression models for yield prediction
- Output: Predictions with insights and actions
π Core Features
- πΎ Crop Recommendation
- π Yield Prediction
- π¬ Disease Detection
- π€ Farmer Community
- π Shopkeeper Listings
π οΈ Tech Stack
π¨ Frontend
- HTML5
- CSS3
- JavaScript (ES6)
βοΈ Backend
- Python (Flask)
- Node.js (Optional)
π€ Machine Learning
- TensorFlow
- Scikit-learn
- OpenCV
ποΈ Database & DevOps
- MySQL
- MongoDB
- Firebase
- Docker
- GitHub Actions
π Project Structure
AGRITECH/
βββ app.py # π Flask Backend (Main entry point)
βββ server.js # π’ Node.js Server (Optional)
βββ requirements.txt # Python dependencies
βββ firebase.js # Firebase config fetching
βββ π src/
β βββ π frontend/ # π Frontend UI (HTML, CSS, JS)
β βββ π pages/ # Individual page files
β βββ π css/ # Stylesheets
β βββ π js/ # Client-side scripts
βββ π Crop Recommendation/ # πΎ Crop recommendation module
βββ π Disease Prediction/ # π¬ Disease detection module
βββ π Crop Yield Prediction/ # π Yield forecasting module
βββ π Community/ # π¬ community/forum backend
βββ π images/ # πΈ Screenshots and assets
βββ π README.md # This file
βββ π CONTRIBUTING.md # Contribution guidelines
Backend vs Frontend
- Backend (
app.pyat root): Flask server handling APIs, Firebase config - Frontend (
src/frontend/): Static HTML/CSS/JS served via Python HTTP server - Optional Node Server (
server.js): Alternative chat backend (not required)
π Security & Reliability
- Image sanitization using OpenCV
- Secrets stored in
.envfiles - ML models evaluated using standard performance metrics (accuracy varies by model and dataset)
βοΈ Environment Variables
GEMINI_API_KEY=your_api_key
FIREBASE_API_KEY=your_key
FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
FIREBASE_PROJECT_ID=your_project_id
FIREBASE_STORAGE_BUCKET=your_bucket.appspot.com
FIREBASE_MESSAGING_SENDER_ID=your_sender_id
FIREBASE_APP_ID=your_app_id
FIREBASE_MEASUREMENT_ID=your_measurement_idπ£οΈ Roadmap
- Cloud Deployment
- Mobile Application
- Real-Time Weather API
- AI Chatbot
- Multilingual Support
π€ Contribution Flow
Fork β Clone β Branch β Commit β Push β Pull Request β Review β MergeRead CONTRIBUTING.md for SWoC 2026 guidelines.
π₯ Team
| Name | Role |
|---|---|
| Om Roy | Project Lead Β· Web Β· ML |
| Shubhangi Roy | ML Β· Backend |
π€ Contributing & Support
We love contributions! Please read our CONTRIBUTING.md to get started with SWoC 2026 tasks. Whether it's fixing bugs, adding features, or improving documentation, your help is always welcome!
β¨ Contributors
Thanks to all the wonderful people contributing to this project! π
For production use, run the backend with a WSGI server like gunicorn:
pip install gunicorn
gunicorn app:appπ API Keys Guide
- Gemini API Key: Google AI Studio se generate karein.
- Firebase Keys: Firebase Console se apne project ke liye keys lein.
- API keys ko
.envfile me store karein (kabhi bhi repo me commit na karein).
π Reporting Issues
Found a bug or want a new feature? Open an issue.
π License
This project is licensed under the MIT License.
β FAQ
Q: The project is not running. What should I do?
A: Make sure all Python dependencies are installed, the .env file is properly configured, and the correct API keys are being used.
Q: How do I get a Gemini/Firebase API key?
A: Refer to the βAPI Keys Guideβ section above for step-by-step instructions.
Q: I am seeing the warning βThis is a development serverβ¦β on the Flask server. What does it mean?
A: This server is intended only for development. For production, use a WSGI server such as Gunicorn.
Q: I accidentally pushed my .env file. What should I do?
A: Immediately rotate/regenerate your API keys, remove the .env file from Git tracking, add it to .gitignore, and clean the repository history if required.
Q: The /health endpoint is not responding. What could be wrong?
A: Ensure the backend server is running correctly and that the /health route is properly implemented.
Made with β€οΈ by the AgriTech Community β SWoC 2026




