[KongchangAI]
· 2 min read· 1,445 words

Stepping Away from the Screen with Open-Source AI: Building a Gardening Assistant with Local Gemma Inference

Stepping Away from the Screen with Open-Source AI: Building a Gardening Assistant with Local Gemma Inference

TGA uses locally-run Gemma to generate personalized 4-week outdoor gardening plans that help you close the laptop.

The Gardening Assistant (TGA) is an AI gardening planning tool built by developer DaKaufeeBoii for the Hacktoberfest "Touch Grass" challenge. Its core philosophy: the screen should be the shortest part of the gardening process. Users input sunlight conditions, garden type, experience level, and available space, and TGA recommends three suitable plants alongside a four-week outdoor action plan with real sensory tasks. The tech stack uses React 19, FastAPI, and a curated JSON botanical dataset, with AI inference handled locally by Google's open-weight Gemma model via Ollama — preserving privacy and avoiding paid API dependencies. A key hybrid architecture — grounded model inference combined with a deterministic rule-based fallback engine — ensures reliable gardening recommendations even when the model is offline.

What does a developer's daily life look like? Most likely: staring at a screen, writing code, debugging, then writing more code. We build apps to solve problems and automate tasks, yet we often forget to step away from our desks and engage with the real world. The Gardening Assistant (TGA), built by developer DaKaufeeBoii for the Hacktoberfest "Touch Grass" challenge, does exactly the opposite: it uses AI to help you spend less time on screens, rather than giving you more reasons to stay glued to one.

The Gardening Assistant project screenshot

An AI App Designed to Make You Close Your Laptop

TGA is an AI-powered gardening planning tool. Based on a user's sunlight conditions, garden type, experience level, and available space, it recommends suitable plants to grow. Rather than handing beginners a long list of plants to figure out on their own, TGA generates a personalized gardening plan that includes three targeted plant recommendations, care instructions, and an actionable four-week outdoor task checklist.

What's truly interesting isn't the AI itself — it's what happens after the AI finishes its job. Each recommended plant comes paired with a hands-on outdoor activity: pruning branches, crushing mint leaves, or watching flowers bloom in the early morning. The weekly checklist suggests spending roughly 15 to 25 minutes outdoors each session, transforming gardening from an intimidating hobby into manageable, bite-sized tasks.

The author's guiding principle for TGA is straightforward: the screen should be the shortest part of the gardening process.

Feature Breakdown: From Recommendations to Action

TGA's core capabilities include:

  • Personalized plant recommendations: matched to your sunlight, space, experience level, and garden type;
  • Practical care guidance: watering frequency, growth cycle info, and companion planting suggestions;
  • Touch Grass activities: turning recommendations into real sensory experiences and gardening tasks;
  • Four-week action plan: weekly tasks to execute, progress to track, and habits to build;
  • Progress tracking: completed tasks saved locally in the browser;
  • Fallback recommendation engine: generates gardening plans even when the local AI model is unavailable.

That last item — the fallback engine — is worth noting. It reflects the author's pragmatic take on reliability: a model going offline shouldn't leave users unable to figure out what to plant.

Tech Stack and Architecture: AI as a Helper, Not a Dependency

TGA is structured in three parts: a React frontend, a FastAPI backend, and a carefully curated botanical dataset.

The full tech stack:

  • Frontend: React 19 + Vite, custom CSS design system, Lucide icons;
  • Backend: Python, FastAPI, Pydantic for API handling and data validation;
  • AI model: Google's open-weight model Gemma, running locally via Ollama;
  • Knowledge base: a curated JSON dataset containing plant info, sunlight requirements, watering frequency, and climate notes;
  • Recommendation engine: a rule-based scoring system evaluating sunlight compatibility, space constraints, experience level, and garden type;
  • Data persistence: browser localStorage for saving plans and checklist progress.

The recommendation flow follows a clear pipeline: the user fills in their gardening conditions → the frontend sends the garden profile to the backend → the backend evaluates suitable plants using the curated botanical data → Gemma handles personalization when local inference is available → a structured gardening plan is returned along with outdoor tasks → the user tracks progress in the browser.

The key design decision here is that the model is not expected to fabricate everything from scratch. The botanical dataset provides factual grounding, while the deterministic rule engine serves as a reliable fallback when the model is absent. This hybrid approach effectively reduces the risk of large models confidently generating incorrect information.

The "grounding" mentioned here is an important concept in LLM applications: when a model generates content purely from memory, it may produce responses that sound plausible but are actually wrong — known as "hallucination." To address this, TGA injects relevant facts from its curated JSON plant dataset directly into the prompt when calling Gemma, anchoring the model's output to verified botanical information rather than relying solely on vague training-time memory. This "retrieval-augmented" approach is conceptually similar to RAG (Retrieval-Augmented Generation), but TGA uses a lighter-weight implementation: filtered plant data is concatenated directly into the context, eliminating the need for a vector database and lowering the deployment barrier. The deterministic rule engine further acts as a "gatekeeper," providing predictable fallback results when the model is unavailable or its output doesn't meet expectations — ensuring the system's reliability doesn't depend entirely on the quality of model inference.

Why Gemma? The Trade-off Between Local Inference and Privacy

The author's reason for choosing Gemma is clear: make AI useful without requiring every user to send personal information to a remote inference service. TGA runs Gemma locally via Ollama, supporting models of varying sizes such as gemma:2b and gemma2:9b, configurable based on available hardware.

During inference, the model receives both curated plant facts and the user's gardening conditions, giving it a "grounded starting point" for generating personalized recommendations rather than relying entirely on what's stored in its parameters. And if Ollama isn't running, the deterministic botanical recommendation engine takes over.

This hybrid architecture matters because a gardening assistant should still be useful when the AI model is unavailable — a failed model connection shouldn't leave someone unable to figure out what to plant.

Gemma is a family of open-weight language models released by Google DeepMind in 2024, built on the same research foundation as Gemini but distributed as open weights, allowing developers to download and run them locally. Gemma is available in different sizes including 2B (2 billion parameters) and 7B/9B (7–9 billion parameters). The smaller 2B model can run on consumer-grade GPUs or even some high-performance CPUs, while the 9B model requires more substantial VRAM.

Ollama is a tool designed specifically for running large language models locally. It provides a unified command-line interface and REST API that abstracts away the complexity of model quantization and hardware compatibility. Developers simply run ollama run gemma:2b to start a local inference service, and the FastAPI backend communicates with it via HTTP requests. The entire pipeline runs entirely on the user's machine with no external network requests — which is the technical foundation for TGA's promise of never sending personal garden profiles to remote service providers.

Three Practical Benefits of Open-Source Innovation

TGA's ability to center around the counterintuitive idea of "using AI to help you leave your screen" owes a great deal to its use of open-weight models. The author highlights three practical benefits:

1. Greater Privacy Control

Garden profiles can include sensitive information: home location, outdoor space dimensions, and personal daily routines. Local inference allows the app to deliver personalized recommendations without sending these profiles to remote model providers.

2. Less Dependency on External AI Services

Local inference means the core recommendation flow doesn't depend on a paid hosted API. Of course, this does require users to have suitable local hardware and a working model installation — which is precisely why the rule-based fallback engine exists.

3. More Freedom to Experiment

The model, botanical dataset, and recommendation engine can be developed and improved independently. Developers can adjust plant data, swap model configurations, refine scoring rules, and contribute improvements — without having to rebuild the entire application around a proprietary service.

As the author puts it, open innovation isn't just about "using free stuff" — it's about having the ability to understand, adapt, and build on top of the technology.

Beyond the Competition: A Small Case Study in AI's Role

Across Hacktoberfest's various award categories, TGA's core implementation centers on Gemma: local open-weight inference + botanical knowledge + deterministic fallback. The author also has several planned extensions: hands-free voice narration via ElevenLabs (with browser speech synthesis as a fallback), real-time frost date lookups via SerpApi to improve planting suggestions, and backend observability via Sentry Agent Tracing to track inference latency, token usage, and fallback events. The author is candid, however, that these are "planned extensions" and should be evaluated based on their actual configured and running state — not treated as completed features.

It's also worth noting that TGA deliberately avoids using an autonomous agent to orchestrate the entire workflow. Instead, the model's responsibilities are kept tightly scoped, making the recommendation process easier to reason about and debug. It's a restrained and clear-eyed engineering choice.

Building TGA led the author to a realization: AI doesn't always have to help us do more things on a screen. Sometimes, its best use is helping us decide — what to do after we close the laptop.

The project source code is hosted on GitHub at github.com/DaKaufeeBoii/The-Gardening-Assistant, with the full implementation, architecture documentation, screenshots, and local setup instructions.

#Gemma local inference#open-source AI gardening assistant#TGA Hacktoberfest#Ollama local LLM#RAG grounding#AI gardening planner#open-weight model application
Share:

Related articles