This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
π± PlantPal β AI Gardening Assistant
A local, privacy-first web companion that turns screen fatigue into mindful indoor gardening, powered by the open-weight SmolLM2 360M model and daily "Touch Grass" habits.
What I Built
The Screen-Fatigue & "Touch Grass" Problem
Developers, students, and tech professionals spend 8 to 14 hours every day glued to glowing screensβwriting code, debugging, and scrolling through digital noise. To bring a breath of life into our desks and living rooms, many of us buy houseplants. But within a few weeks, those plants often wither and die due to overwatering, forgotten care routines, improper sunlight, or plain neglect.
When plant troubles arise, existing solutions either demand scrolling through ad-bloated generic search results or relying on expensive cloud AI chatbots that keep users tethered to their browsers.
PlantPal AI Assistant was built to solve this exact problem: it bridges local open-weight artificial intelligence with the physical, tactile world to pull people away from their keyboards and guide them into rewarding, mindful plant care.
How It Gets People Off the Screen and Into the World
PlantPal is intentionally designed so every digital interaction directly inspires a physical, real-world action:
-
π Daily "Touch Grass" Challenges: A dedicated habits engine featuring 5 interactive physical activities that literally get users away from their monitors:
- Soil Moisture Finger Test: Encourages users to plunge an index finger 1β2 inches into the soil before watering to physically feel moisture levels.
- Foliage & Leaf Inspection: Step away from the desk to examine leaf undersides for dust or pests, and wipe them clean with a damp cloth.
- 10-Minute Outdoor Mindfulness: Step out onto a balcony, terrace, or garden to breathe fresh air and observe natural sunlight.
- Learn a Botanical Fact: Discover the native climate, humidity needs, and growth patterns of indoor species.
- Water Propagation Habit: Snip a stem cutting (from a money plant, pothos, or mint) and place it in a jar of water to sprout fresh roots. A live progress bar and completion tracker celebrate these offline moments.
π§ Smart Physical Watering Cycles: Dynamic date math calculates exact biological intervals, organizing plants into Overdue, Due Today, and Upcoming. Instead of abstract notifications, it prompts a physical check before hydrating, logging timestamps into a permanent SQLite history.
π Hands-on Care Task Checklist: Schedule and track physical maintenance like repotting, pruning dead leaves, applying organic fertilizer, or rotating pots 90Β° for balanced sun exposure.
π Curated Plant Library: Pre-configured botanical profiles for 7 indoor favorites (Money Plant, Snake Plant, Aloe Vera, Spider Plant, Peace Lily, Tulsi, and Areca Palm) with instant 1-click import into personal gardens.
π€ Private AI Gardening Mentor: Powered by the open-weight SmolLM2 360M model running locally via Ollama. It answers urgent queries ("Why are my snake plant leaves yellow?", "How much sun does aloe vera need?") in 2β3 concise, encouraging sentences without creating digital rabbit holes.
Who Is It For?
- Developers, Engineers & Students: Anyone experiencing digital burnout who needs a healthy, tactile excuse to step away from the desk and nurture living plants.
- First-Time Plant Parents: Beginners who want clear, jargon-free watering schedules, lighting tips, and quick troubleshooting.
- Privacy & Open-Source Advocates: Users who demand 100% data sovereignty and offline capability with zero telemetry, paywalls, or cloud dependencies.
Demo
PlantPal runs locally with a nature-inspired design system featuring deep forest green (#2D5A27), calming sage green (#5B8A61), warm organic cream (#FAF9F5), and crisp rounded cards.
Local URL
Once started, the application is accessible in any desktop or mobile browser at:
http://127.0.0.1:5000
Visual Walkthrough & Features
- Live Garden Dashboard: Real-time metrics for total plants, urgent watering alerts, pending care tasks, rotating daily gardening wisdom, and a live Ollama connection status pill.
- Plant Profiles & Observation Notes: Detailed records showing species, room location, sunlight requirements, watering intervals, and an interactive watering timeline.
- Smart Watering Scheduler: Categorized views sorting plants into overdue, due today, and upcoming cycles with 1-click AJAX watering updates.
- Interactive AI Assistant: Fast suggestion chips ("Why are leaves yellow?", "Best beginner plants", "Watering rule of thumb"), animated typing status, and transparent badges distinguishing live AI inferences from verified offline handbook tips.
- Daily Habit Checklist: Visual progress bar and checkboxes that reward physical, real-world plant care.
Code
The complete source code is available in this repository:
π GitHub Repository: https://github.com/Kashyap-Patel115/PlantPal-AI-Assistant
Project Directory Structure
PlantPal AI Assistant/
βββ app.py # Main Flask application, routing, and REST endpoints
βββ database.py # SQLite schema, parameterized queries, and date math engine
βββ plant_library.py # Curated botanical data for 7 indoor plant species
βββ ai_service.py # Ollama SmolLM2 integration & transparent offline fallback
βββ test_app.py # Automated 12-point unit and integration test suite
βββ requirements.txt # Minimal Python dependencies (Flask, requests)
βββ instance/ # Local SQLite database storage
βββ templates/ # Semantic HTML5 templates with responsive sidebar
β βββ base.html # Master layout with drawer nav and toast alerts
β βββ dashboard.html # Overview metrics, alerts, and daily tip
β βββ plants.html # Plant collection with search and sunlight filter
β βββ plant_form.html # Add/edit plant form
β βββ plant_detail.html # Detailed plant profile and watering history
β βββ scheduler.html # Categorized watering schedule
β βββ tasks.html # Care tasks checklist and status filter
β βββ library.html # Plant library reference cards
β βββ challenges.html # Daily gardening habit challenges
β βββ ai_assistant.html # Interactive chat interface with prompt chips
β βββ 404.html # Custom 404 error page
β βββ 500.html # Custom 500 error page
βββ static/
βββ css/
β βββ style.css # Nature-inspired responsive CSS design system
βββ js/
βββ app.js # AJAX updates, mobile navigation, and chat logic
Quick Installation & Local Setup
- Clone the repository:
git clone https://github.com/Kashyap-Patel115/PlantPal-AI-Assistant.git
cd "PlantPal AI Assistant"
- Pull the open-weight SmolLM2 360M model via Ollama:
ollama pull smollm2:360m
- Install lightweight dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
- Run the automated test suite:
python test_app.py
How I Built It
1. Open-Weight AI Architecture
-
Model Choice: Hugging Face's SmolLM2 360M (
smollm2:360m). At just ~725 MB, this ultra-compact open-weight model runs at lightning speed directly on consumer laptop CPUs without requiring dedicated GPUs or cloud APIs. -
Inference Runtime: Ollama running locally on port 11434 (
http://127.0.0.1:11434/api/generate), providing a clean, self-contained REST API. -
Prompt Engineering & Guardrails: Tailored system instructions direct the model to answer concisely in 2 to 3 practical, friendly sentences. A low temperature (
0.4) and tight top-p (0.9) ensure answers remain factual and grounded. -
Transparent Offline Fallback Architecture: If Ollama is not installed or temporarily stopped, PlantPal gracefully matches keywords against a verified botanical knowledge handbook. It clearly labels the output source (
smollm2:360mvsπΏ Offline Gardening Guide Fallback) and never masquerades canned answers as live AI.
2. Backend & Database
- Framework: Python 3.12 with Flask 3.1. Kept clean, modular, and beginner-friendly without unnecessary microservice overhead.
-
Storage: SQLite 3 with parameterized queries and foreign-key cascade protection, managing tables for
plants,watering_history,tasks, andchallenges. - Date Math Engine: Custom datetime algorithms compute overdue days, due-today flags, and upcoming watering cycles based on actual biological intervals.
3. Frontend & Interactions
- Vanilla Modern Web: HTML5, CSS3, and vanilla JavaScript.
- Zero Build Step Bloat: Eliminates heavy Node/Webpack build steps, resulting in near-instant page load times and zero dependency rot.
- Asynchronous AJAX: Dynamic watering updates, task completion toggles, challenge tracking, and AI chat run smoothly without disruptive full-page reloads.
Why Does Open Innovation Matter?
Open innovation is the core foundation of PlantPal's design and mission:
Zero Economic Barriers for Students and Global Learners:
Proprietary APIs (such as OpenAI GPT-4o or Anthropic Claude) lock intelligence behind credit card requirements, recurring subscriptions, and per-token pricing. For students, teenagers, and makers worldwide, these economic paywalls prevent everyday adoption. Open-weight models like SmolLM2 liberate AI, enabling anyone with a standard computer to build, learn, and experiment completely free of charge.Absolute Privacy in Domestic & Living Spaces:
Gardening and personal living spaces are intimate. When users ask questions about their home environment, room lighting, and daily routines, that data shouldn't be funneled to corporate servers for ad targeting or model training. With open-weight AI running locally via Ollama, 100% of data stays on the user's hard drive.Resilience in Low-Connectivity & Outdoor Environments:
Plants grow on balconies, in greenhouses, on rooftops, and in rural gardens where internet connections are spotty or non-existent. A system tethered to closed cloud APIs breaks the second connection drops. Local open-weight models ensure that essential gardening assistance remains accessible anytime, anywhere, off-grid.Demystifying AI for Emerging Engineers:
As a second-year engineering student, open innovation turns AI from an intimidating black box into an open, inspectable technology. I can examine model weights, inspect inference parameters, tune prompts, and understand resource utilization directly. Open innovation creates creators, not just passive consumers.
My Agent Session
This project was developed and refined using Antigravity IDE through an iterative agentic pair-programming workflow:
- Agent Trajectory & Development: The database schema, backend routing, Ollama integration, frontend templates, and test matrices were developed collaboratively with automated validation loops.
-
Automated Verification: A 12-point automated test suite (
test_app.py) validates empty-database states, CRUD operations, watering date math, task toggles, library imports, Ollama connectivity, and offline fallback resilience. -
Reproducibility: You can verify the entire test matrix locally in seconds by running
python test_app.py.
Prize Categories
- πΏ Touch Grass (Week 1 Primary Category): Using AI to reconnect users with the physical world, build healthy tactile habits (soil moisture testing, leaf care, outdoor time), and nurture living houseplants.
- β‘ Best Use of Open-Source / Open-Weight AI: Running Hugging Face's open-weight
SmolLM2 360Mlocally via Ollama with custom prompt tuning, transparent provenance tags, and an offline handbook fallback. - π» Best Student / First-Time Open-Source Submission: Built with clean, accessible, well-documented code by a second-year Information Technology engineering student.
π¨βπ» Author & Credits
- Author: Kashyap Patel
- DEV Profile / GitHub: @Kashyap-Patel115
- Role: Second-year IT engineering student & open-source builder
Happy Gardening, and don't forget to touch grass today! πΏ
Top comments (0)