πΏ PlantCare AI β Take a Photo. Understand Your Plant. Go Touch Grass.
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
What I Built
Most gardening and plant diagnostic apps have a counterproductive design pattern: they try to keep you glued to your phone. Between endless scrolling forums, chat feeds, locked paywalls, and invasive notifications, the experience often pulls you away from nature rather than connecting you with it.
I built PlantCare AI to invert this dynamic.
PlantCare AI is a lightweight, privacy-first plant health assistant powered by Google's open-weight Gemma model family. It is built specifically around the Hacktoberfest 2026 Week 1 theme: "Touch Grass."
The Core Philosophy: The Screen is the Shortest Step
Instead of an AI chatbot designed for long conversations, the entire user journey takes less than 60 seconds:
$$\text{πΈ Take Photo} \longrightarrow \text{π€ Gemma Multimodal Inspection} \longrightarrow \text{π± Actionable Diagnosis} \longrightarrow \text{πΏ Touch Grass Task} \longrightarrow \text{πͺ΄ Hands in the Dirt}$$
Key Features:
- Instant Botanical Identification: Accurately recognizes common and botanical species names with confidence scoring.
-
Visual Health & Vitality Rating: Assesses overall vitality (
Healthy,Mostly Healthy,Needs Attention,Unhealthy). - Possible Disease Assessment: Detects visual indicators consistent with fungal pathogens (e.g., Early Blight, Powdery Mildew), pest damage (e.g., Spider Mite stippling), and watering stress. It always includes a responsible safety disclaimer: AI visual analysis is an assessment, not a laboratory pathology test.
- Practical Care Matrix: Straightforward recommendations for watering schedule, sunlight requirements, and potting soil drainage.
- Hands-On Action Checklist: Interactive, actionable physical steps (e.g., prune diseased foliage with sanitized shears, increase ventilation, add clean mulch).
- The "Touch Grass" Mission: Generates a single, real-world outdoor task (e.g., "Go outside, wipe dust off the broad leaves with a damp cloth in fresh outdoor air, and take three deep breaths"). When completed, clicking "β I Did It" triggers a celebratory confetti burst to reward real-world action!
- Interactive Demo Mode: Includes 3 realistic pre-built botanical scenarios (Healthy Monstera, Tomato with Early Blight, Fiddle Leaf Fig with Pest Stress) so judges and users can test the full flow instantly without needing an API key.
- Privacy By Design: Uploaded photos are processed in-memory and never stored on disk or databases. Zero login or tracking required.
Demo
- Live Repository: https://github.com/abhishekusersfaci-lang/Plantcare-ai
-
Local Testing: Run
npm run devand open http://localhost:3000.
(If you deploy to Vercel or record a short video clip/Loom, you can paste the live link and embed your demo video or screenshot right here!)
Code
The complete source code is open source under the MIT License:
πΏ PlantCare AI
"Take a photo. Understand your plant. Help it grow."
An open-AI-powered plant health assistant built with Google's Gemma open-weight model family.
Created for the Hacktoberfest 2026 Open-Source AI Challenge (Week 1 Theme: "Touch Grass").
π Problem
Indoor gardeners, balcony farmers, and plant enthusiasts often notice wilting, yellowing leaves, or spots on their plants but have no idea what caused them or what steps to take. Commercial plant apps often lock diagnostic insights behind paywalls, require account registrations, or encourage endless screen-time browsing rather than getting users hands-on in the dirt.
π± Solution
PlantCare AI provides an instant, privacy-first plant health assessment powered by Google's open-weight Gemma model. With a single photograph, Gemma identifies the plant species, assesses vitality, detects visual symptoms consistent with common plant diseases, suggests tailored watering and sunlight advice, and gives the user one practical outdoor "Touch Grass" action to disconnect from their screenβ¦
Repository Link:
π https://github.com/abhishekusersfaci-lang/Plantcare-ai
How I Built It
1. The Core AI Model: Gemma 4 Multimodal (gemma-4-31b-it)
At the heart of the diagnostic engine is Gemma, Google's family of lightweight, state-of-the-art open-weight models.
-
Why Gemma? Rather than using proprietary closed models like Gemini, the app strictly uses Gemma 4 (
gemma-4-31b-it). Gemma 4 features a native multimodal architecture capable of reasoning over high-resolution image inputs and textual instructions simultaneously. - Multimodal Visual Diagnostics: The model inspects raw image bytes directly to recognize leaf venation, concentric lesion rings (such as target-spotting in Alternaria solani), chlorotic yellow margins, and pest damage.
- Structured JSON Schema: Gemma returns structured, validated JSON conforming to our strict TypeScript schema, eliminating hallucinations and ensuring smooth rendering on the frontend.
2. Tech Stack
- Framework: Next.js 15 (App Router, React 19, TypeScript)
- Styling: Tailwind CSS with custom nature-inspired color tokens (emerald greens, forest tones, earth ambers, and glassmorphism)
-
AI Integration: Official Google GenAI SDK (
@google/genai) running strictly server-side in Next.js Route Handlers (/api/analyze) -
Micro-Interactions & Delight:
canvas-confettifor the outdoor task celebration,lucide-reactfor botanical iconography, and CSS seedling animations
3. Architecture Overview
[User Camera / Photo Upload]
β
βΌ
[Next.js Client (Drag & Drop / Camera Capture)]
β (POST multipart/form-data or Base64)
βΌ
[Server-side API Route: /api/analyze]
βββ MIME Type Validation (JPG, PNG, WEBP)
βββ Size Limit Check (< 10MB)
βββ Key / Demo Mode Resolver
β
βΌ
[Google GenAI SDK with Gemma 4: gemma-4-31b-it]
β
βΌ
[JSON Validator & Normalizer]
β
βΌ
[Polished Plant Report + Touch Grass Interactive Card]
Why Does Open Innovation Matter?
Open-weight models like Gemma are pivotal for the future of specialized, privacy-sensitive AI applications:
- Private & Local Edge Inference: Plant care happens in backyards, balconies, and remote greenhouses where internet connectivity may be scarce. Open weights make it possible to run inference completely offline on edge devices (via Ollama, llama.cpp, or on-device NPUs), ensuring farmers' and gardeners' photos never leave their hardware.
- Community Fine-Tuning: Open weights allow researchers and agricultural universities to fine-tune Gemma on hyper-local plant diseases, rare native flora, and regional crop pests that proprietary commercial APIs ignore.
- Transparency & Safety: In agriculture, understanding why an AI flagged a symptom matters. Open-source models allow developers to inspect prompt responses, inspect latent activations, and ensure diagnostic caveats are responsibly communicated.
- No Vendor Lock-In: Developers are not tied to a single platform's pricing or sudden deprecation cycles; weights can be served across Google AI Studio, Vertex AI, Hugging Face, or self-hosted GPU clusters.
My Agent Session
This project was built and pair-programmed with an advanced AI coding agent in Google Antigravity IDE. The agent verified the latest official Google Gemma multimodal models (gemma-4-31b-it), scaffolded the complete Next.js 15 application, created custom SVG botanical assets, tested the live API route end-to-end, and ensured that .env.local API credentials stayed protected while pushing directly to GitHub.
Prize Categories
-
Google Gemma: Built with and powered by Google's open-weight Gemma multimodal model family (
gemma-4-31b-it). - Touch Grass Challenge (Week 1): Encourages users to close the app, step outside into their gardens or balconies, and physically care for living plants.
Top comments (0)