How sanhith2117s/phenopredictor works
Pheno-Predict is a rice analytics web application for genomic trait prediction, leaf-disease diagnosis, and disease advice, with account access and saved histories. Users sign in, then upload SNP CSV data for trait results or leaf imagery for a diagnosis and guidance; they can review prediction history and charts. The frontend uses a Node/Express API for authentication and history, and a FastAPI service for ML capabilities. The README documents disease advisory and visualization features whose detailed wiring was not sampled, so those links are limited to documented service boundaries.
Main entry points: App.jsx React app · api.js HTTP client · main.py Unified ML API · server.js Express server
Components 24
Web application
- React app
client/src/App.jsx - Account screens
client/src/Components/Login.jsx - Trait upload/results
client/src/Components/TraitPredict.jsx - Disease diagnosis
client/src/Components/PredictDisease.jsx - Disease history
client/src/Components/DiseaseHistory.jsx - History charts
client/src/Components/visualize.jsx - HTTP client
client/src/api.js
Backend API
- Express server
server/server.js - Authentication routes
server/routes/auth.js - Trait history routes
server/routes/prediction.js - Disease history routes
server/routes/diseases.js
ML services
- Unified ML API
server/ml_service/main.py - Genomic prediction
server/ml_service/ml_service.py - Disease detection
server/ml_service/disease_api.py - AI advisory
server/ml_service/predict_with_hf.py - Trait models
server/ml_service/multi_trait_models - Disease CNN
server/ml_service/best_phase1.keras
Persistence
- MongoDB
- User records
server/models/User.js - Trait history records
server/models/PredictionHistory.js - Disease history records
server/models/DiseaseHistory.js
Other components
- Agriculture user
- Email service
- HuggingFace API
Connections 30
- Agriculture user → React app: uses
- React app → Account screens: routes to
- React app → Trait upload/results: routes to
- React app → Disease diagnosis: routes to
- React app → Disease history: routes to
- React app → History charts: routes to
- Account screens → HTTP client: requests auth
- Trait upload/results → HTTP client: requests prediction
- Disease diagnosis → HTTP client: sends image
- Disease history → HTTP client: requests history
- History charts → HTTP client: requests history
- HTTP client → Express server: HTTP requests
- Express server → Authentication routes: dispatches auth
- Express server → Trait history routes: dispatches traits
- Express server → Disease history routes: dispatches disease
- Authentication routes → User records: reads/writes
- Authentication routes → Email service: sends verification
- Trait history routes → Trait history records: reads/writes
- Disease history routes → Disease history records: reads/writes
- Trait history records → MongoDB: persists in
- Disease history records → MongoDB: persists in
- User records → MongoDB: persists in
- Trait upload/results → Unified ML API: uploads CSV
- Disease diagnosis → Unified ML API: uploads image
- Unified ML API → Genomic prediction: dispatches traits
- Unified ML API → Disease detection: dispatches diagnosis
- Unified ML API → AI advisory: dispatches advisory
- Genomic prediction → Trait models: loads models
- Disease detection → Disease CNN: loads model
- AI advisory → HuggingFace API: requests inference