How junixos/zootech-backend works
ZooTech is a multi-tenant livestock-management backend API. Its principal request path is an HTTP client calling a controller, which dispatches a typed request through application behavior/interactor logic and returns a response. The tree documents domain capabilities including cattle, heat cycles, breeding, milk production, animal health, authentication, tenant administration, and exports. Edges are limited to relationships shown by excerpts or the source index; implementations and wiring not sampled are represented cautiously.
Main entry points: Program.cs API host · IBehaviorDispatcher.cs Request dispatcher · TenancingController.cs Tenant API · CeloController.cs Heat-cycle API
Components 25
API boundary
- API host
src/ZooTech.API/Program.cs - Heat-cycle API
src/ZooTech.InterfaceAdapters/Modules/Module_Celo/Controllers/CeloController.cs - Cattle API
src/ZooTech.InterfaceAdapters/Modules/Module_Vacuno/Controllers/VacunoController.cs - Milk API
src/ZooTech.InterfaceAdapters/Modules/Module_ProduccionLeche/Controllers/ProduccionLecheController.cs - Tenant API
src/ZooTech.InterfaceAdapters/Modules/Module_Tenancing/Controllers/TenancingController.cs
Application workflows
- Request dispatcher
src/ZooTech.Application/Common/Behaviors/IBehaviorDispatcher.cs - Behavior pipeline
src/ZooTech.Application/Common/Behaviors/BehaviorPipeline.cs - Heat-cycle workflows
src/ZooTech.Application/Modules/Module_Celo/UseCases - Breeding workflows
src/ZooTech.Application/Modules/Module_Fecundacion/UseCases - Milk workflows
src/ZooTech.Application/Modules/Module_ProduccionLeche/UseCases/Ordenios - Health workflows
src/ZooTech.Application/Modules/Module_Sanidad/UseCases - Authentication
src/ZooTech.Application/Modules/Module_Auth/UseCases - Tenant workflows
src/ZooTech.Application/Modules/Module_Tenancing/UseCases - Reports and exports
src/ZooTech.Application/Modules/Module_ProduccionLeche/UseCases/Ordenios/GenerateOrdeniosPdf
Livestock domain
- Cattle records
src/ZooTech.Domain/Ganaderia/Module_Vacuno/Entities/Vacuno.cs - Heat-cycle records
src/ZooTech.Domain/Module_Celo/Entities/Celo.cs - Milking records
src/ZooTech.Domain/Module_ProduccionLeche/Entities/Ordenio.cs - Health records
src/ZooTech.Domain/Module_Sanidad/Entities/Triaje.cs - Breeding records
src/ZooTech.Domain/Ganaderia/Module_Fecundacion/Interfaces/IFecundacionRepository.cs
Tenant platform
- Tenant context
src/ZooTech.Application/Common/Gateway/Context/ITenantContext.cs - Tenant provisioning
src/ZooTech.Infrastructure/Tenant/TenantProvisioningService.cs - Report storage
src/ZooTech.Infrastructure/Storage/VacunoReportFileStorage.cs - Audit service
src/ZooTech.Infrastructure/Auditing/MongoDb/MongoDbAuditService.cs - Tenant database
src/ZooTech.Infrastructure/Persistence/Context/GanaderiaDbContext.cs
Other components
- API client
Connections 19
- API client → API host: sends HTTP
- API host → Heat-cycle API: registers controller
src/ZooTech.API/Program.cs - API host → Cattle API: registers controller
src/ZooTech.API/Program.cs - API host → Milk API: registers controller
src/ZooTech.API/Program.cs - API host → Tenant API: registers controller
src/ZooTech.API/Program.cs - Heat-cycle API → Request dispatcher: dispatches requests
src/ZooTech.InterfaceAdapters/Modules/Module_Celo/Controllers/CeloController.cs - Cattle API → Request dispatcher: dispatches requests
src/ZooTech.InterfaceAdapters/Modules/Module_Vacuno/Controllers/VacunoController.cs - Milk API → Request dispatcher: dispatches requests
src/ZooTech.InterfaceAdapters/Modules/Module_ProduccionLeche/Controllers/ProduccionLecheController.cs - Tenant API → Request dispatcher: dispatches requests
src/ZooTech.InterfaceAdapters/Modules/Module_Tenancing/Controllers/TenancingController.cs - Behavior pipeline → Heat-cycle workflows: invokes handler
src/ZooTech.Application/Common/Behaviors/Module_Celo/GetHistorialCeloPorVacuno/GetHistorialCeloPorVacunoBehaviorPipelineFactory.cs - Heat-cycle workflows → Heat-cycle records: uses repository
- Breeding workflows → Breeding records: uses repository
- Milk workflows → Milking records: uses repository
- Health workflows → Health records: uses repository
- Tenant API → Tenant context: tenant filter reads
- Tenant workflows → Tenant provisioning: provisions tenant
src/ZooTech.Infrastructure/Tenant/TenantProvisioningService.cs - Reports and exports → Report storage: stores reports
- Cattle records → Tenant database: persists records
- Audit service → Tenant database: records events