Skip to content

About

An AI-based assistant to help managing the garden

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

GardenAssist

An AI-powered web application to support and simplify everyday gardening.

GardenAssist helps gardeners keep track of their plants, plan garden tasks, and get intelligent advice β€” all in one place. An integrated AI assistant can answer questions, explain care instructions, identify plants, and help manage your garden data through natural conversation.


Core Features

🌿 Plant Management

Maintain a comprehensive list of all plants in your garden. Each plant includes care details such as pruning schedules, fertilization cycles, bloom periods, leaf and flower colors, frost tolerance, and general growing conditions. Track the current state and age of each plant, as well as the dates of last care activities.

βœ… Tasks & Reminders

View all open, current, and upcoming garden tasks at a glance. Mark tasks as done or skip them as needed. A monthly calendar overview provides a quick visual indication of which months have pending work, with details available on hover.

πŸ“… Garden Calendar

A Gantt-style calendar with plants as rows and months as columns gives a seasonal overview of bloom times, pruning windows, fertilization periods, and growth phases β€” with color-coded display per activity type.

πŸ—ΊοΈ Visual Garden Plan

An interactive layout of your garden showing the position and size of each plant. Hover over plant symbols to see a quick summary; click to open the full plant detail view. Selecting a plant in the table highlights its location in the plan.

πŸ€– AI Assistant

A conversational assistant that supports you throughout the app:

  • Answer questions about plants, care routines, and gardening best practices
  • Explain why a task is recommended at a given time
  • Add or update plant data as well as journal entries through natural language

🧴 Supplies & Inventory

Track fertilizers, pesticides, soil amendments, and other garden products. Each item stores photos, category, storage location, use-case description, EAN barcode, active ingredients with percentages, application directions, dosage, and free-form notes. The list is searchable and filterable by category. The AI assistant is always aware of the full inventory and can recommend products or answer questions in context.

πŸ“– Garden Journal

A diary for logging completed tasks, observations, and notes over time. Provides a personal history of your garden's development.

πŸ“Š Dashboard

A central overview combining urgent hints and warnings, open and upcoming tasks, the garden plan, a monthly task band, and the AI chat window β€” everything relevant at a single glance.


Screenshots

Dashboard
Dashboard β€” weather widget, open tasks with done/skip actions, interactive garden plan with plant markers, and the monthly task band.
Dashboard with AI Assistant
AI Assistant β€” the assistant panel opens alongside any view. Here it answers a question about fertilizing the apple tree, citing the plant's own schedule.
Plants overview and detail panel
Plant list & detail β€” sortable table with bloom, health, and task columns; clicking a row opens the detail panel with photos, facts, care notes, and schedule history.
Calendar view
Garden calendar β€” Gantt-style view with plants as rows and months as columns. Filter by activity type (bloom, growth, foliage, fertilization, pruning, misc).
Journal view
Garden journal β€” chronological log of completed tasks, skipped items, observations, and problems. Filterable by entry type.
Assistant prefilling a new plant form
AI-assisted plant entry β€” asking the assistant to add a yellow rose automatically opens the plant form pre-filled with name, description, category, care notes, and bloom schedules. Information provided by the assistant is always marked orange and can individually deselected or overwritten. The user always needs to save to accept changes suggested by the assistant. Journal entries can also be added, modified, or deleted using the assistant.
Supplies view
Supplies inventory β€” searchable, filterable list of fertilizers, pesticides, and other garden products with category tags, storage location, and use-case descriptions. The AI assistant has full inventory context and can answer questions like "how many supplies do I have?" or recommend the right product for a task.
Supply detail panel
Supply detail β€” clicking a product opens a detail panel with photos, use-case description, properties (EAN, location), a full ingredients table with percentages, application directions, dosage, and notes. The AI assistant context updates to the selected product so questions like "when should I apply this?" are answered in context.

Mobile

Mobile tasks
Tasks β€” overdue and current tasks grouped by urgency, with done/skip actions and weather widget.
Mobile plants overview
Plants β€” scrollable plant list with photo thumbnails, location tags, and next task status.
Mobile plant detail and garden plan
Garden plan & plant detail β€” interactive map with plant markers; tapping a marker slides up a detail sheet with photos and care notes.
Mobile calendar
Calendar β€” Gantt-style seasonal overview, filterable by activity type.
Mobile journal
Journal β€” chronological task log with done/skipped/observation entries, filterable by type.
Mobile supplies
Supplies β€” inventory list with category tags and storage location.
Mobile AI assistant
AI Assistant β€” snap-sheet chat panel slides up from the bottom, available in every view.

Planned Integrations (future)

  • Event API API to add watering events, e.g., based on home assistant automations
  • User authentication based on OpenID Connect
  • Photo analysis Identify plants from uploaded photos, search for suitable reference images, or analyze uploaded documents or photos for relevant gardening context
  • Calendar sync – export or sync garden tasks to external calendar apps
  • Email notifications – reminders for upcoming or overdue tasks

Tech Stack

Frontend

Component Technology Rationale
Framework React + TypeScript Industry standard; best AI code generation support
Build tool Vite Fast dev server and build; replaces Create React App
UI components shadcn/ui Radix UI (accessible, headless) + Tailwind; components copied into project for full control
Styling Tailwind CSS Utility-first; no separate CSS files needed

Backend

Component Technology Rationale
Server framework Hono Lightweight, TypeScript-first; simpler than NestJS, more modern than Express
Validation Zod Runtime validation of all API inputs; enables OpenAPI generation for future mobile client (see ADR-007)
ORM Drizzle TypeScript-first schema definition; lightweight; supports SQLite and PostgreSQL with a single connection config change
Database SQLite (v1) β†’ PostgreSQL (future) SQLite for zero-dependency on-premise install; Drizzle abstracts the switch to PostgreSQL

Deployment

Component Technology Rationale
Containerization Docker On-premise, self-hostable; single docker-compose.yml for the full stack
Persistence Docker Volume SQLite file and attachment directory mounted as a volume; survives container restarts

Getting Started

Prerequisites

  • Node.js >= 20
  • pnpm >= 9 β€” install with npm install -g pnpm
  • Docker + Docker Compose (for production deployment)

Install dependencies

pnpm install

Development

# Frontend (React + Vite, http://localhost:5173)
pnpm dev:frontend

# Backend (Hono, http://localhost:3000)
pnpm dev:backend

API requests from the frontend are proxied to the backend via Vite's dev proxy (/api β†’ http://localhost:3000).

Type checking

pnpm typecheck

Docker (production / on-premise)

Using pre-built images from ghcr.io (recommended)

No local build required. Images are published automatically on every push to main and on every version tag (v*.*.*).

# 1. Copy and adjust environment variables
cp .env.example .env          # set GARDENASSIST_PORT if needed

# 2. Pull the latest images and start the stack
docker compose -f docker-compose.prod.yml pull
docker compose -f docker-compose.prod.yml up -d

The frontend is reachable at http://<server>:3110 (or the port set via GARDENASSIST_PORT).

To pin a specific version instead of latest, edit docker-compose.prod.yml and replace :latest with the desired tag, e.g. :1.2.0.

To update to a newer version:

docker compose -f docker-compose.prod.yml pull
docker compose -f docker-compose.prod.yml up -d

Data (SQLite database + attachments) is persisted in the named Docker volume gardenassist_data and survives container restarts and image updates.

Building locally

# Copy and adjust environment variables
cp .env.example .env

# Build images locally and start the stack
docker compose up --build

To use PostgreSQL instead of SQLite, set DATABASE_URL in .env:

DATABASE_URL=postgresql://user:password@host:5432/gardenassist

Upstream reverse proxy

If a reverse proxy (e.g. Nginx, Traefik, Caddy) sits in front of the GardenAssist frontend container, it must allow large request bodies for the import endpoints β€” otherwise the proxy rejects the request with a 413 before it reaches the container. Apply an equivalent body size limit (512 MB or more) for the following paths:

  • POST /api/import/backup β€” full backup restore (tar.gz, DB + attachments)
  • POST /api/import/json β€” JSON data import

The frontend container's built-in nginx already applies client_max_body_size 512m for both paths; only the upstream proxy requires explicit configuration.

Environment Variables

All variables are optional unless marked required.

Docker host (.env / shell)

Variable Default Description
GARDENASSIST_PORT 3110 Host port the frontend is exposed on
GARDENASSIST_VERSION latest Image tag to pull from ghcr.io (e.g. 1.2.0)

Backend container

These variables are forwarded from the host environment to the backend container via docker-compose.yml / docker-compose.prod.yml.

Variable Default Description
DATABASE_URL file:/data/gardenassist.db SQLite file path or PostgreSQL connection string
DATA_DIR /data Directory for uploaded attachments and static files
PORT 3000 Internal port the backend listens on
AI_PROVIDER (empty) AI provider: anthropic, openai, or openrouter
AI_MODEL (empty) Model ID, e.g. claude-sonnet-4-6, gpt-4o, or an OpenRouter model string
AI_API_KEY (empty) API key for the selected provider

AI variable behaviour: The three AI variables are used as fallbacks when the corresponding fields in the Settings UI are empty. A value entered via the UI (stored in the database) always takes precedence. Clearing the UI value restores the env var fallback. This lets you pre-configure the assistant for a deployment without requiring each user to enter credentials manually.


Shared API types

The TypeScript types in docs/api/ are the source of truth for the data model. Both packages import them via the @api/* path alias, e.g.:

import type { Garden } from "@api/garden";

No copying or code generation required β€” the alias resolves directly to docs/api/.


Project Status

🌱 Development β€” core features implemented and in use.

Feature Status
Plant management (list, detail, edit, attachments) βœ… Done
Dashboard (task list, warnings, garden plan, weather widget) βœ… Done
Garden calendar (Gantt, color presets) βœ… Done
Journal (timeline, filters, manual entries, done/skipped tasks) βœ… Done
Supplies inventory (list, detail, ingredients, photos) βœ… Done
Settings (all sections, API integration, language switch) βœ… Done
Garden plan upload βœ… Done
AI Assistant (provider-agnostic, persistent across views) βœ… Done
Export / Import (JSON, backup tar.gz) βœ… Done
Weather widget (Open-Meteo, real-time, 5-day forecast) βœ… Done
Docker build + ghcr.io publish (GitHub Actions) βœ… Done
Mobile view (all views, AI assistant, responsive layout) βœ… Done
Soil moisture / water balance (Open-Meteo Archive) βœ… Done
CSV export πŸ”² Ready

About

An AI-based assistant to help managing the garden

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages