A full‑stack IoT prototype for automated greenhouse irrigation and real‑time environmental monitoring.
This codebase is a proof‑of‑concept for a university senior project.
- Intended as a prototype only.
- Project Highlights
- Prototype Scope
- Expected Impact
- Project Architecture
- Deployment & Hosting
- Project Structure
-
Smart Farming System for Melon Cultivation (University Senior Project, Oct 2024 – May 2025).
-
Designed a prototype Smart Farming System that automates greenhouse operations, reducing manual labor and increasing crop yield.
-
Integrated Arduino‑based IoT sensors with a full‑stack React/Node.js web application to collect real‑time greenhouse data (temperature, humidity) and trigger irrigation automatically or manually.
-
Implemented and validated the system in a small‑scale greenhouse at the Faculty of Engineering, Chulalongkorn University.
-
Real‑time monitoring of greenhouse conditions (temperature, humidity, soil moisture) via the web interface.
-
Manual on‑demand watering control through the web interface.
-
Automated irrigation based on configurable environmental thresholds.
- Containerized web services running on a Raspberry Pi using Kubernetes (MicroK8s), secured and exposed via a Cloudflare Tunnel.
-
Reduce manual watering interventions by automating irrigation based on real‑time sensor data.
-
Improve water efficiency through configurable environmental thresholds.
-
Enhance operational reliability with continuous monitoring and remote control.
+----------+ +----------+ +--------------+
| Frontend | ←────→ | Backend | ←────→ | IoT Sensor |
| React | | NodeJS | | Arduino |
+----------+ +----------+ +--------------+
↓
│
+----------+
| Database |
| MongoDB |
+----------+
-
Full‑Stack + IoT:
- React Frontend ↔ Node.js Backend ↔ MongoDB, plus Arduino‑based sensors.
-
Sensor Data Ingestion
- Arduino devices send environmental readings (temperature, humidity, soil moisture) to the Node.js backend via REST API at configurable intervals.
- The backend broadcasts these readings to the React frontend in real time over WebSockets.
-
Remote Actuation & Control
- The React frontend sends watering interval configuration commands to the Node.js backend via REST API.
- Arduino devices poll the backend for pending commands via REST API, retrieve them, and execute the actions on the hardware.
Why not use MQTT with IoT sensors?
-
Public MQTT brokers proved unreliable in our experiments, which could compromise prototype stability.
-
For a small‑scale senior project, REST API polling removes the need to manage a separate message broker.
PLANTIQUE-PUBLIC
├── arduino/
├── backend
│ ├── routes/
│ ├── services/
│ ├── .dockerignore
│ ├── .env
│ ├── app.js
│ ├── Dockerfile
│ ├── package.json
│ └── websocket.js
├── frontend
│ ├── src/
│ │ ├── components/
│ │ ├── App.jsx
│ │ ├── index.css
│ │ └── main.jsx
│ ├── .dockerignore
│ ├── .env
│ ├── .prettierrc.json
│ ├── Dockerfile
│ ├── eslint.config.js
│ ├── favicon.ico
│ ├── index.html
│ ├── nginx.conf
│ ├── package.json
│ └── vite.config.js
├── production/
├── .gitignore
├── commands.md
├── docker‑compose.yaml
├── jsconfig.json
├── README.md
└── update‑production.sh