How thang-ph/livestock-management works
This repository implements a livestock-management system with a web dashboard and an ASP.NET Core API. Staff use the dashboard to monitor animal health, vaccination progress, and farm operations; backend domain services manage the corresponding records. The sampled code confirms the EF Core data model, import and vaccination services, and a vaccination controller’s repository interface. README capabilities also include operational reporting and field-task management, but those paths were not sampled, so their internal connections remain unverified.
Main entry points: LmsContext.cs EF Core context · index.tsx Dashboard UI · Controllers REST controllers · BatchVacinationService.cs Vaccination service
Components 22
Web dashboard
- Dashboard UI
livestock-management-frontend/src/pages/Dashboard/index.tsx - Vaccination views
livestock-management-frontend/src/pages/ChiTietLoTiem/components/add/index.tsx - API client
livestock-management-frontend/src/lib/api.ts - Operational metrics
livestock-management-frontend/src/components/charts/bar-graph.tsx
API and access
- REST controllers
livestock-management-backend/LivestockManagementSystemAPI/Controllers - Vaccination API
livestock-management-backend/LivestockManagementSystemAPI/Controllers/BatchVacinationController.cs - Authentication
livestock-management-backend/LivestockManagementSystemAPI/Controllers/AuthController.cs - Permission checks
livestock-management-backend/LivestockManagementSystemAPI/Authorization/PermissionAuthorizationHandler.cs - Farm operations API
livestock-management-backend/LivestockManagementSystemAPI/Controllers/ImportController.cs
Farm operations
- Batch imports
livestock-management-backend/DataAccess/Repository/Services/ImportService.cs - Livestock records
livestock-management-backend/BusinessObjects/Models/Livestock.cs - Barns and batches
livestock-management-backend/BusinessObjects/Models/BatchImport.cs - Field operations
livestock-management-backend/LivestockManagementSystemAPI/Controllers
Health and vaccination
- Disease records
livestock-management-backend/BusinessObjects/Models/Disease.cs - Treatment history
livestock-management-backend/BusinessObjects/Models/MedicalHistory.cs - Vaccination service
livestock-management-backend/DataAccess/Repository/Services/BatchVacinationService.cs - Vaccination records
livestock-management-backend/BusinessObjects/Models/BatchVaccination.cs
Domain and persistence
- DTO mapping
livestock-management-backend/DataAccess/AutoMapperConfig/ConfigMapper.cs - EF Core context
livestock-management-backend/BusinessObjects/LmsContext.cs
Other components
- Farm staff
- SQL Server
- Cloudinary
Connections 21
- Farm staff → Dashboard UI: uses
- Farm staff → Vaccination views: tracks campaigns
- Dashboard UI → API client: requests data
- Vaccination views → API client: requests data
- API client → REST controllers: calls API
- REST controllers → Authentication: includes sign-in
- REST controllers → Permission checks: checks access
- Vaccination API → Vaccination service: dispatches via repository
livestock-management-backend/LivestockManagementSystemAPI/Controllers/BatchVacinationController.cs - Vaccination service → EF Core context: reads and writes
livestock-management-backend/DataAccess/Repository/Services/BatchVacinationService.cs - Batch imports → EF Core context: reads and writes
livestock-management-backend/DataAccess/Repository/Services/ImportService.cs - Farm operations API → Batch imports: handles imports
- EF Core context → SQL Server: persists records
livestock-management-backend/BusinessObjects/LmsContext.cs - EF Core context → Livestock records: maps entities
livestock-management-backend/BusinessObjects/LmsContext.cs - EF Core context → Barns and batches: maps entities
livestock-management-backend/BusinessObjects/LmsContext.cs - EF Core context → Vaccination records: maps entities
livestock-management-backend/BusinessObjects/LmsContext.cs - EF Core context → Disease records: maps entities
livestock-management-backend/BusinessObjects/LmsContext.cs - EF Core context → Treatment history: maps entities
livestock-management-backend/BusinessObjects/LmsContext.cs - Vaccination service → Cloudinary: optional file operations
livestock-management-backend/DataAccess/Repository/Services/BatchVacinationService.cs - Dashboard UI → Operational metrics: presents metrics
- Farm staff → Field operations: manages activities
- DTO mapping → EF Core context: maps DTOs to models