How malves4018/natureprotector works
NatureProtector is a local technical baseline for simulating sensor readings and processing them into operational fire-risk views. The principal journey starts when an operator launches a scenario in the webUI: the backoffice orchestrates a Simulator.Host run, readings travel through RabbitMQ, and Prevention.Host durably ingests and processes them into risk assessments and projections. PostgreSQL holds control, pipeline, and projection state; InfluxDB stores telemetry, with Grafana dashboards for support. The graph combines README-documented runtime links with source-index and excerpt evidence; some internal processing links are documented or referenced but not fully shown in the excerpts.
Main entry points: ReadingRiskPipeline.cs Risk pipeline · NatureProtector.Backoffice.Api/Program.cs Backoffice API · NatureProtector.Prevention.Host/Program.cs Prevention host · App.tsx Web UI
Components 18
Run control
- Backoffice API
src/NatureProtector.Backoffice.Api/Program.cs - Run orchestrator
src/NatureProtector.Backoffice.Api/RuntimeOrchestration/CloudRunJobRuntimeRunOrchestrator.cs - Scenario simulator
src/NatureProtector.Simulator.Host/Services/ReadingGenerationService.cs
Reading processing
- RabbitMQ
- Prevention host
src/NatureProtector.Prevention.Host/Program.cs - Durable inbox
src/NatureProtector.Prevention.Host/Processing/PostgresReadingEventInbox.cs - Risk pipeline
src/NatureProtector.Prevention.Host/Processing/ReadingRiskPipeline.cs - Reading normalization
src/NatureProtector.Prevention/Readings/NormalizedReading.cs - Risk eligibility
src/NatureProtector.Prevention/Risk/RiskEligibilityService.cs - Risk scoring
src/NatureProtector.Prevention/Risk/SimpleRiskScoringService.cs - Daily cell state
src/NatureProtector.Prevention/Risk/DailyCellState.cs
Data and telemetry
- PostgreSQL
src/NatureProtector.Infrastructure.Postgres/Persistence/NatureProtectorControlDbContext.cs - Operational projections
src/NatureProtector.Prevention.Host/Projection/PostgresAreaOperationalProjectionStore.cs - InfluxDB telemetry
src/NatureProtector.Infrastructure.Influx/Services/InfluxWriteService.cs
Operator experience
- Web UI
webUI/src/app/App.tsx - Pipeline view
webUI/src/app/pages/PipelinePage.tsx - Grafana dashboards
Other components
- Operator
Connections 20
- Operator → Web UI: uses
README.md - Web UI → Backoffice API: requests operations
README.md - Backoffice API → Run orchestrator: starts runs
README.md - Run orchestrator → Scenario simulator: launches
README.md - Scenario simulator → RabbitMQ: publishes readings
README.md - RabbitMQ → Prevention host: transports events
README.md - Prevention host → Durable inbox: persists events
src/NatureProtector.Prevention.Host/Program.cs - Prevention host → Risk pipeline: processes events
src/NatureProtector.Prevention.Host/Program.cs - Risk pipeline → Reading normalization: normalizes event
src/NatureProtector.Prevention.Host/Processing/ReadingRiskPipeline.cs - Risk pipeline → Risk eligibility: checks eligibility
src/NatureProtector.Prevention.Host/Processing/ReadingRiskPipeline.cs - Risk pipeline → Risk scoring: scores risk
src/NatureProtector.Prevention.Host/Processing/ReadingRiskPipeline.cs - Risk pipeline → Daily cell state: uses daily state
src/NatureProtector.Prevention.Host/Processing/ReadingRiskPipeline.cs - Risk pipeline → Operational projections: writes projections
src/NatureProtector.Prevention.Host/Processing/ReadingRiskPipeline.cs - Risk pipeline → InfluxDB telemetry: writes telemetry
src/NatureProtector.Prevention.Host/Processing/ReadingRiskPipeline.cs - Durable inbox → PostgreSQL: stores inbox
- Operational projections → PostgreSQL: stores projection state
README.md - Backoffice API → PostgreSQL: reads control state
README.md - InfluxDB telemetry → Grafana dashboards: feeds dashboards
README.md - Web UI → Pipeline view: routes to
webUI/src/app/App.tsx - Pipeline view → Backoffice API: displays runtime data
README.md