How nishanthrao01/farmgaurd works
FarmGuard is a farm-management portal for antimicrobial-use tracking and residue safety. Farmers and administrators manage farms, livestock, medicines, and treatments; treatment records calculate product withdrawal periods, while laboratory results are evaluated against MRL standards. The portal also provides dashboard analytics and compliance reporting. The graph reflects documented capabilities and sampled controller/service relationships; unsampled controller wiring and report/export implementation are not asserted as verified calls.
Main entry points: WebControllers.cs Web and API · FarmGuardDbContext.cs Application database · TreatmentService.cs Treatment service · AnimalService.cs Animal service
Components 23
Portal Entry
- Web and API
Controllers/Mvc/WebControllers.cs - Authentication
Controllers/AuthController.cs - Dashboard
Controllers/DashboardController.cs
Farm Management
- Livestock
Controllers/AnimalsController.cs - Farm records
Controllers/FarmsController.cs - Medicine catalog
Controllers/MedicinesController.cs - Treatment records
Controllers/TreatmentsController.cs - Animal service
Services/Implementations/AnimalService.cs - Farm service
Services/Implementations/FarmService.cs - Medicine service
Services/Implementations/MedicineService.cs - Treatment service
Services/Implementations/TreatmentService.cs
Safety Compliance
- Product clearance
Controllers/WithdrawalController.cs - Laboratory tests
Controllers/LabTestsController.cs - MRL standards
Controllers/MRLStandardsController.cs - Compliance reports
Controllers - Withdrawal service
Services/Implementations/WithdrawalService.cs - MRL evaluation
Services/Implementations/MRLService.cs - Dashboard analytics
Services/Implementations/DashboardService.cs
Application Platform
- Identity and tokens
Services/Implementations/AuthService.cs - Farm domain records
Models - Application database
Data/FarmGuardDbContext.cs - Application host
Program.cs
Other components
- Farm users
Connections 32
- Farm users → Web and API: use portal
README.md - Farm users → Authentication: sign in
README.md - Web and API → Livestock: manage livestock
- Web and API → Farm records: manage farms
- Web and API → Medicine catalog: manage catalog
- Web and API → Treatment records: record usage
README.md - Web and API → Product clearance: check clearance
README.md - Web and API → Laboratory tests: enter test results
README.md - Web and API → MRL standards: evaluate limits
README.md - Web and API → Dashboard: view analytics
README.md - Web and API → Compliance reports: export audits
README.md - Livestock → Animal service: calls
Controllers/AnimalsController.cs - Farm records → Farm service: calls
Controllers/FarmsController.cs - Treatment records → Treatment service: calls
Controllers/TreatmentsController.cs - Treatment records → Animal service: retrieves animals
Controllers/TreatmentsController.cs - Laboratory tests → MRL evaluation: calls
Controllers/LabTestsController.cs - Product clearance → Withdrawal service: calls
Controllers/WithdrawalController.cs - Product clearance → Animal service: retrieves animals
Controllers/WithdrawalController.cs - Treatment service → Application database: writes treatments and restrictions
Services/Implementations/TreatmentService.cs - Treatment service → Farm domain records: uses records
Services/Implementations/TreatmentService.cs - Animal service → Application database: queries records
Services/Implementations/AnimalService.cs - MRL evaluation → Application database: evaluates test results
Services/Implementations/MRLService.cs - Withdrawal service → Application database: checks restrictions
Services/Implementations/WithdrawalService.cs - Dashboard analytics → Application database: aggregates metrics
Services/Implementations/DashboardService.cs - Authentication → Identity and tokens: authenticates
- Dashboard → Dashboard analytics: loads analytics
- Medicine catalog → Medicine service: manages catalog
- MRL standards → MRL evaluation: manages standards
- Compliance reports → Treatment service: audits AMU
- Application host → Application database: configures store
Program.cs - Application host → Identity and tokens: registers service
Program.cs - Application host → Treatment service: registers service
Program.cs