agungferdi/Smart_Farming ? reverse-engineered prompt
Reverse engineered prompt
Build me a smart farming system that connects an ESP32 field device to a web dashboard.
I want the device to read soil moisture, air temperature, humidity, rain, soil temperature, and water level, then send the data live to the cloud with MQTT. It should also control a water pump through a relay, with automatic watering based on soil moisture, rain override, dry run protection, and a manual on and off control from the website.
Please make the backend handle incoming sensor data, store it in a PostgreSQL database, and expose simple REST endpoints for health checks, latest readings, stats, and relay logs. The frontend should be a clean mobile friendly dashboard in Next.js with real time charts, status cards, history views, and a control panel for the pump. Use TypeScript throughout, and make it feel polished and production ready. If you need current docs for any library, look them up online first.
Are you gonna build this?
make sure you review the code using coderabbit