How arslan-kokane/hydrowise works
Hydro-Wise is an irrigation decision-support prototype: its documented workflow checks six-hour rain probability before using sensor conditions to produce a recommendation, which a dashboard can present. The current API implements mock weather, sensor, and decision endpoints; the web client has an API wrapper, while the sampled dashboard excerpt uses local scenarios. ML training, live weather and ESP32 integrations, and pump actuation are roadmap capabilities, not demonstrated runtime subsystems. The README and tree support those future branches, but sampled source does not establish their wiring.
Main entry points: routes.py API routes · data_generator.py Decision evaluation · main.py FastAPI app · ml ML model
Components 19
Dashboard
- Web entry
apps/web/src/main.tsx - Dashboard UI
apps/web/src/App.tsx - API client
apps/web/src/api/client.ts - Web contracts
apps/web/src/types/contracts.ts
API service
- FastAPI app
services/api/app/main.py - API routes
services/api/app/routes.py - API schemas
services/api/app/models/schemas.py
Decision inputs
- Mock data logic
services/api/app/mock/data_generator.py - Weather snapshot
services/api/app/mock/data_generator.py - Sensor readings
services/api/app/mock/data_generator.py - Decision evaluation
services/api/app/mock/data_generator.py - Sensor schema
packages/contracts/schemas/sensor-reading.schema.json - Weather schema
packages/contracts/schemas/weather-snapshot.schema.json - Decision schema
packages/contracts/schemas/irrigation-decision.schema.json
Planned integrations
- ESP32 sensors
firmware/esp32/src - ML model
ml
Other components
- Field user
- Weather API
- Pump relay
Connections 17
- Field user → Dashboard UI: uses
- Web entry → Dashboard UI: renders
- API client → FastAPI app: requests
- FastAPI app → API routes: registers
- API routes → Weather snapshot: gets snapshot
- API routes → Sensor readings: gets readings
- API routes → Mock data logic: gets history
- API routes → Decision evaluation: evaluates
- API routes → API schemas: validates
- Weather snapshot → Mock data logic: produces
- Sensor readings → Mock data logic: produces
- Decision evaluation → Mock data logic: produces
- Weather API → Weather snapshot: planned input
- ESP32 sensors → API routes: planned telemetry
- Decision evaluation → ML model: planned inference
- ML model → Decision evaluation: planned result
- Pump relay → Decision evaluation: future actuation