DEV Community

Rishi Jha
Rishi Jha

Posted on

Leafy: A Houseplant You Can Talk To, Powered by an Open-Weight Model

Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission 🌿

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass

What I Built

Plants don't die from neglect so much as from distraction. You get absorbed in work, hours pass, and the monstera quietly gives up.

Leafy is a React Native (Expo) app built around that problem. Every plant you own gets a profile card with its scientific name, light needs, soil, watering schedule, and a pet-safety badge. Each card shows the next watering time ("Tomorrow at 09:30 AM"), and tapping it opens a full care sheet with potting mix, propagation tips, and lighting guidance.

The part I'm most excited about: you can chat with your plant. Every card has a Chat button. The reply comes in first person, in character, from the plant itself. It knows its own species, when it's next due for water, and what the weather is doing outside right now (live temperature and humidity). Ask a Snake Plant whether it needs a drink on a dry, hot afternoon and it answers based on its real schedule and real conditions.

There's also a general botany assistant for questions like "why are my leaves yellowing?", and a live weather widget that turns temperature and humidity into care advisories: mist when the air is dry, shade during a heat wave, water less during a cold snap.

How it gets you off the screen

Leafy is designed so the screen is the shortest part of the experience. The goal is a check-in of under a minute: glance at the cards, read the weather advisory, hear from the plant, then go put your hands in the soil. An app about plants only succeeds when you close it and walk over to a real one.

Code

🌿 Leafy - AI Plant Care & Real-Time Botanical Companion

Leafy (Grass_project1) is a modern, cross-platform mobile application built with React Native and Expo (SDK 57). It combines the conversational intelligence of Google Gemini AI, real-time atmospheric meteorological weather intelligence, and a comprehensive botanical care management system to help users nurture healthy, flourishing plants.


🌟 Key Features

1. 🤖 Conversational Plant Chatbots (Roleplaying AI)

  • Talk Directly to Your Living Plants: Every plant in your library features an interactive Chat button.
  • First-Person Roleplay Personas: Instructs Google Gemini to speak in-character as the selected houseplant (e.g., Monstera Deliciosa, Snake Plant, Peace Lily) discussing its thirst levels, sun needs, and leaf health.
  • Schedule-Aware Dialogues: Plants reference their upcoming watering date and specific care instructions during conversation.
  • Weather-Aware Responses: Plants receive real-time temperature and atmospheric humidity updates, weaving current environmental conditions naturally into their responses.

2. 💬

…

How I Built It
Layer Technology
App React Native + Expo (SDK 57), JavaScript
Language model

Weather Open-Meteo (open-source weather API, no key needed)
Location GeoJS IP geolocation, or a manual city picker
Storage expo-sqlite, expo-file-system
Feel expo-haptics, animated drawer, keyboard-aware chat
The plant persona

Each chat turn builds a prompt from three things:

The plant's profile: species, light, soil, and watering frequency.
Its schedule: the computed next watering date, so the plant can say "I'm due tomorrow" and mean it.
Live weather: current temperature and humidity, so the answer fits today instead of reading like a generic care sheet.

The model is told to answer in first person, stay in character, and keep replies short. Grounding it in real data means it has something concrete to say, and a small model is good at that.

Not everything needs a model

The weather advisories are plain threshold rules, not LLM output. If humidity is low, suggest misting. If it's a heat wave, protect the plant. If it's cold, water less. Rules are instant, free, predictable, and easy to test. I kept the model for what it's actually good at, which is conversation, and left the rest to ordinary code.

Moving from a closed API to an open model

The first version of Leafy called a closed hosted API for chat. That worked, but it needed a user-supplied API key and sent every conversation to a third party, so I [[describe what you actually did: e.g. rewrote the provider layer so the app talks to a local Ollama server running Gemma]].

Because all model access lived in one backend service (backend/geminiService.js, configured in backend/config.js), the change was a little different so i have to cam up with this idea.

Why Does Open Innovation Matter?

No key, no bill. My first version needed a personal API key pasted into the app, which is a real barrier for a casual plant hobbyist. With a local open-weight model, nothing needs to be signed up for, and running it costs nothing beyond electricity.

Your home stays yours. A plant chat is more personal than it sounds: where you live, what's on your windowsill, when you're away from home. With the model running on hardware I control, those conversations don't go to a server I don't control.

I can change the model, not just the prompt. Persona chat is sensitive to the model.with the same prompt and pick the one whose plants sounded best. With a closed API, the model behind the endpoint is someone else's decision, and it can change underneath you.

The honest trade-off. For a short, grounded plant conversation.

My Agent Session

I built Leafy with Antigravity as my coding agent.

Prize Categories



Top comments (0)