How dhanush-2027/pranadhanya works
PranaDhanya is a role-based agricultural management portal: farmers submit disease images or recommendation inputs, receive AI results, and retain predictions as records; farmers and veterinary staff also manage appointments and diagnoses, while dashboards expose role-specific records and administration. The documented AI scope includes crop and livestock disease classification plus crop, yield, price, and fertilizer recommendations. Sampled code confirms API-to-AI calls, record persistence, appointment notifications, and dashboard reads. The frontend and database schema are not present in the supplied tree, and some capability wiring is documented only at a high level.
Main entry points: PageController.java Role dashboards · ApiController.java REST workflows · repository JPA repositories · AppointmentService.java Appointment service
Components 20
Identity and access
- Authentication API
backend/src/main/java/com/agriportal/controller/AuthController.java - User service
backend/src/main/java/com/agriportal/service/UserService.java - JWT security
backend/src/main/java/com/agriportal/security/WebSecurityConfig.java
Portal workflows
- Role dashboards
backend/src/main/java/com/agriportal/controller/PageController.java - REST workflows
backend/src/main/java/com/agriportal/controller/ApiController.java - Appointment service
backend/src/main/java/com/agriportal/service/AppointmentService.java - Notification service
backend/src/main/java/com/agriportal/service/NotificationService.java
AI services
- AI client
backend/src/main/java/com/agriportal/service/AiService.java - Prediction API
ai_service/app.py - Model loading
ai_service/model_loader.py - Disease classification
ai_service/app.py - Agri predictions
ai_service/app.py
Records and state
- Record service
backend/src/main/java/com/agriportal/service/RecordService.java - JPA repositories
backend/src/main/java/com/agriportal/repository - PostgreSQL
- Appointment data
backend/src/main/java/com/agriportal/entity/Appointment.java - Notification data
backend/src/main/java/com/agriportal/entity/Notification.java
Other components
- Farmer
- Veterinary staff
- Administrator
Connections 23
- Farmer → Authentication API: signs in
- Authentication API → User service: registers
- Authentication API → JWT security: authenticates
- Farmer → REST workflows: submits inputs
- Veterinary staff → REST workflows: updates cases
- Administrator → Role dashboards: opens dashboard
- Farmer → Role dashboards: opens dashboard
- Veterinary staff → Role dashboards: opens dashboard
- REST workflows → AI client: requests predictions
- AI client → Prediction API: HTTP requests
- Prediction API → Disease classification: classifies images
- Prediction API → Agri predictions: predicts inputs
- REST workflows → Record service: saves results
- REST workflows → Appointment service: books or updates
- Appointment service → Notification service: creates alerts
- Appointment service → JPA repositories: reads and writes
- Notification service → JPA repositories: reads and writes
- Record service → JPA repositories: reads and writes
- User service → JPA repositories: reads and writes
- JPA repositories → PostgreSQL: persists entities
- Role dashboards → Record service: loads records
- Role dashboards → Appointment service: loads appointments
- Role dashboards → Notification service: loads alerts