How alanq139/agrosolutions works
AgroSolutions is an agricultural IoT monitoring MVP. The main workflow is client access through the Ocelot gateway, management of identity and farm properties, sensor ingestion and asynchronous alert processing, with service metrics monitored by Prometheus and Grafana. The README documents the overall service topology and capabilities; sampled code confirms sensor-event publishing and identity/property persistence. Alert-worker internals and some infrastructure wiring were not sampled, so those links are omitted or marked unverified.
Main entry points: Program.cs API gateway · SensoringestionserviceController.cs Sensor ingestion · IdentityserviceAuthcontroller.cs Authentication · IdentityserviceApplicationdbcontext.cs Identity context
Components 17
Access and identity
- API gateway
src/Services/AgroSolutions.ApiGateway/Program.cs - Authentication
src/Services/AgroSolutions.IdentityService/Controller/IdentityserviceAuthcontroller.cs - Identity context
src/Services/AgroSolutions.IdentityService/Models/IdentityserviceApplicationdbcontext.cs - Identity SQL database
Farm data
- Properties and plots
src/Services/AgroSolutions.PropertyService/Controllers/PropertyserviceControllers.cs - Farm data model
src/Services/AgroSolutions.PropertyService/Models/PropertyserviceModels.cs - Farm SQL database
- Shared API contracts
src/Shared/AgroSolutions.Shared.Common/DTO.cs
Sensor and alerts
- Sensor ingestion
src/Services/AgroSolutions.SensorIngestionService/Controller/SensoringestionserviceController.cs - Sensor event contract
src/Shared/AgroSolutions.Shared.Messages/Sensordatareceived.cs - RabbitMQ
- Alert processing
src/Services/AgroSolutions.AlertService/Worker.cs - Alert SQL database
- Shared configuration
src/Shared/AgroSolutions.Shared.Common/Configuration.cs
Monitoring
- Prometheus
prometheus.yml - Grafana
k8s/grafana-deployment.yaml
Other components
- Client
Connections 13
- Client → API gateway: sends requests
README.md - API gateway → Authentication: routes requests
README.md - API gateway → Properties and plots: routes requests
README.md - API gateway → Sensor ingestion: routes requests
README.md - Authentication → Identity context: uses identity store
- Identity context → Identity SQL database: persists users
- Properties and plots → Farm data model: uses data model
src/Services/AgroSolutions.PropertyService/Controllers/PropertyserviceControllers.cs - Farm data model → Farm SQL database: maps entities
- Sensor ingestion → Sensor event contract: creates event
src/Services/AgroSolutions.SensorIngestionService/Controller/SensoringestionserviceController.cs - Sensor ingestion → RabbitMQ: publishes event
src/Services/AgroSolutions.SensorIngestionService/Controller/SensoringestionserviceController.cs - RabbitMQ → Alert processing: dispatches events
- Alert processing → Alert SQL database: stores alerts
- Prometheus → Grafana: provides monitoring