How sairam-k26/farming-land_analysis_platform works
Project Type and Purpose
• This is a full-stack farming companion platform.
• It comprises:
• Multiple ML prediction microservices (crop recommendation, disease prediction, rainfall forecast, surface-water level, crop-yield, soil-moisture)
• A Flutter mobile client
• A static website
File Structure
• Top-level folders:
• Crop_recommendation (model pickle + notebook)
• Plant Disease Prediction (notebooks + main.py)
• Rainfall_prediction (Flask app.py + models)
• Surface_water_Level_predictor (notebook + pickle)
• crop_Yield_Prediction (notebook + pickle)
• soil_moisture (ESP C code + main.py)
• Flutter (mobile UI code + pubspec)
• website (HTML/CSS/JS)
• Dataset (CSV files)
• Notice: Rainfall_prediction includes an app.py (Flask service). Others currently are notebooks but can be or should be refactored into RESTful Python services (Flask/FastAPI).
README for Insights
• Six core features, each backed by an ML model.
• Mobile client and website serve as frontends.
• No relational database folder present—data files and model pickles live in repo; consider adding a user-data store (e.g., PostgreSQL).
Main Components
a. Frontend Layer
• Flutter Mobile App (Android/iOS)
• Static Website (HTML/CSS/JS)
b. API Gateway / Load Balancer
• Single ingress point for all prediction requests
c. Microservice Layer (six services)
1. Crop Recommendation Service (loads crop_recommendation.pkl)
2. Plant Disease Prediction Service (exposes /predict_disease)
3. Rainfall Prediction Service (Flask app.py using cat/gnb/logreg/xgb .pkl)
4. Surface Water Level Service (loads Surface_Water_level_detector.pkl)
5. Crop Yield Prediction Service (uses crop_yield .pkl; notebook logic)
6. Soil Moisture Prediction Service (Python main.py + optionally ESP device)
d. Data & Model Storage
• Dataset CSVs (for retraining)
• Model artifact storage (pickle files)
e. (Optional) User Data Store
• Authentication, user preferences, logging
Relationships & Data Flow
• User action in mobile/website → HTTP(S) request to API Gateway
• Gateway routes to appropriate microservice
• Microservice loads model from artifact store, reads input payload, runs prediction, returns JSON response
• (Optional) Microservice logs request/response to User Data Store
• Soil Moisture Service might also interact with IoT device (ESP module) via MQTT/HTTP
Architectural Patterns & Design Principles
• Microservices: Each feature is its own deployable service
• Separation of concerns: Frontend vs. API vs. ML models vs. data
• RESTful APIs for communication
• CI/CD pipeline can build/deploy each service independently
• Containerization (Docker) for each microservice
Tools & Frameworks
• Flutter (Dart) for mobile UI
• Static website: HTML/CSS (no framework specified)
• Python 3.x for backend services
• Flask or FastAPI for REST endpoints
• scikit-learn / pickle for model loading
• CSV data for training; consider a database for production
Final Checklist
• Components: Frontends, API Gateway, 6 ML microservices, Storage
• Technology labels: Flutter, Flask, Python, scikit-learn, pickle, CSV, ESP hardware