How thegit-69/cropsafe-ai works
CropSafe AI analyzes crop-leaf images for disease and accepts soil measurements for health scoring and fertilizer guidance. Its evidenced runtime workflow is a FastAPI request routed to crop preprocessing/model/recommendation or soil analysis/recommendation, then returned as structured output. The tree also contains a Flutter platform host and registered Firebase, file-selection, location, and sign-in plugins, but no Dart application source, so their user-interface behavior and connections to the API cannot be verified. The README describes broader pest/disease and nutrient detection; sampled crop classes specifically name diseases.
Main entry points: crop_routes.py Crop endpoint · main.py FastAPI app · MainActivity.kt Flutter platform host · soil_routes.py Soil endpoint
Components 14
API runtime
- Crop endpoint
app/routes/crop_routes.py - Soil endpoint
app/routes/soil_routes.py - FastAPI app
app/main.py
Crop analysis
- Image preprocessing
app/utils/image_preprocessing.py - Disease prediction
app/models/crop_model.py - Disease treatment
app/services/recommendation_service.py
Soil analysis
- Soil scoring and fertilizer
app/models/soil_model.py - Soil recommendations
app/services/recommendation_service.py
Mobile integrations
- Flutter platform host
cropsafe_app/android/app/src/main/kotlin/com/kalki/cropdoc/MainActivity.kt - Firebase plugins
cropsafe_app/macos/Flutter/GeneratedPluginRegistrant.swift - Google sign-in plugin
cropsafe_app/macos/Flutter/GeneratedPluginRegistrant.swift - Location plugin
cropsafe_app/macos/Flutter/GeneratedPluginRegistrant.swift - File selector plugin
cropsafe_app/macos/Flutter/GeneratedPluginRegistrant.swift
Other components
- Farmer
Connections 15
- Farmer → Crop endpoint: submits image
- Farmer → Soil endpoint: submits soil data
- FastAPI app → Crop endpoint: registers route
app/main.py - FastAPI app → Soil endpoint: registers route
app/main.py - FastAPI app → Disease prediction: loads model
app/main.py - FastAPI app → Soil scoring and fertilizer: loads model
app/main.py - Crop endpoint → Image preprocessing: preprocesses image
app/routes/crop_routes.py - Crop endpoint → Disease prediction: predicts disease
app/routes/crop_routes.py - Crop endpoint → Disease treatment: gets treatment
app/routes/crop_routes.py - Soil endpoint → Soil scoring and fertilizer: analyzes measurements
app/routes/soil_routes.py - Soil endpoint → Soil recommendations: gets recommendations
app/routes/soil_routes.py - Flutter platform host → Firebase plugins: registers plugins
- Flutter platform host → Google sign-in plugin: registers plugins
- Flutter platform host → Location plugin: registers plugins
- Flutter platform host → File selector plugin: registers plugins