Hydriva – AI-Powered Smart Irrigation System
Inspiration
Water scarcity and inefficient irrigation are major challenges in agriculture. Farmers and home gardeners often rely on fixed watering schedules without considering the actual needs of their plants, leading to water waste and unhealthy crops. We wanted to build a system that combines Artificial Intelligence, real-time IoT monitoring, and weather forecasting to make irrigation smarter, more efficient, and data-driven.
The core idea behind Hydriva is simple:
$$ \text{Smart Irrigation} = f(\text{Sensor Data},\ \text{Weather},\ \text{AI},\ \text{Plant Type}) $$
Instead of watering on a timer, Hydriva continuously evaluates plant conditions and provides intelligent recommendations.
🚀 What it does
Hydriva is a full-stack AI-powered platform that helps users monitor and care for their plants through real-time insights and intelligent automation.
Key features include:
- AI Plant Identification from uploaded images
- Live sensor dashboard displaying soil moisture, humidity, temperature, and water reservoir levels
- AI-generated irrigation recommendations
- Plant-specific AI chatbot with conversation history
- Dynamic alerts based on sensor thresholds and plant health
- Smart reminders for watering and maintenance
- Weather-aware irrigation using live forecast data
- Role-based authentication for Farmers and Home Gardeners
How we built it
The frontend was developed using Next.js 16, React 19, TypeScript, and Tailwind CSS to create a modern and responsive interface.
The backend is powered by NestJS 11, MongoDB, and Mongoose, providing secure REST APIs and persistent data storage.
Real-time communication is achieved through WebSockets (Socket.io), allowing sensor readings to update instantly without refreshing the page.
Artificial Intelligence capabilities are powered using OpenRouter (Gemini 2.0 Flash) for:
- Plant identification
- Plant health analysis
- Personalized care recommendations
- Plant-specific AI conversations
Live weather data is integrated using the OpenWeatherMap API, enabling irrigation suggestions based on upcoming weather conditions.
Authentication is secured using JWT, Passport.js, and bcrypt.
System Workflow
Hydriva continuously processes multiple sources of information before generating recommendations.
$$ \text{Sensor Data} \rightarrow \text{Backend Processing} \rightarrow \text{AI Analysis} \rightarrow \text{Weather Check} \rightarrow \text{Smart Recommendation} $$
For irrigation decisions, the platform considers:
$$ I = \alpha M + \beta T + \gamma H + \delta W + \epsilon P $$
where
- (M) = Soil Moisture
- (T) = Temperature
- (H) = Humidity
- (W) = Weather Forecast
- (P) = Plant Characteristics
The coefficients (\alpha,\beta,\gamma,\delta,\epsilon) represent the influence of each factor on the irrigation recommendation.
Challenges we ran into
Building Hydriva involved solving several real-world software engineering challenges:
- Managing real-time WebSocket communication.
- Synchronizing sensor updates across multiple connected users.
- Integrating AI image analysis into an interactive workflow.
- Handling multipart image uploads securely.
- Designing plant-specific AI memory for contextual conversations.
- Combining weather forecasts with sensor data for smarter recommendations.
- Building secure authentication with role-based authorization.
- Creating a responsive dashboard capable of displaying continuously changing data.
Accomplishments that we're proud of
We're especially proud of successfully integrating multiple modern technologies into one seamless platform:
- AI-powered plant recognition
- Live IoT dashboard
- Real-time notifications
- Intelligent irrigation recommendations
- Weather integration
- Plant-specific AI assistant
- Responsive full-stack architecture
One of the most rewarding moments was watching the AI identify a plant from a single image and automatically generate personalized care recommendations within seconds.
What we learned
This project gave us valuable hands-on experience with:
- Production-ready NestJS architecture
- WebSocket-based real-time applications
- JWT authentication and authorization
- AI integration using LLM APIs
- MongoDB data modeling
- Full-stack TypeScript development
- REST API design
- Managing asynchronous data pipelines
More importantly, we learned how AI can enhance human decision-making by providing meaningful recommendations instead of simply automating actions.
What's next for Hydriva
Future improvements include:
- ESP32/Arduino IoT integration
- Automatic irrigation valve control
- Machine Learning-based irrigation prediction
- Disease detection from leaf images
- Fertilizer recommendations
- Mobile applications
- Multi-language support
- Farm analytics dashboard
- Satellite and drone imagery support
Our long-term vision is to transform Hydriva into a complete AI-powered precision agriculture ecosystem that helps conserve water while improving crop health and productivity.
Built With
- bcrypt
- jwt
- mongodb
- nestjs
- next.js
- openrouter
- openweathermap
- react
- socket.io
- tailwind
- typescript
- websockets
Log in or sign up for Devpost to join the conversation.