Can have some Python back-end if absolutely necessary
Be light-weight and efficient
The program's purpose is to help me keep track of and organize my house plants, such as calculating GDD, when a plant was last fertilized, input which fertilizer (NPK ratio). Secondly, I would like to be able to see graphs of optimal growth stages, e.g. from the GDD, to deduce if I'm doing something "wrong" - basically to debug my plants.
It should store the input data in some file format and then be able to load it back in again. It won't be much data so no database is necessary, it can easily live within a CSV file to be honest.
This document will be fed to a LLM model so make all the steps very clear and as precise as possible as it should reference the document while coding
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
HousePlant Buddy is a lightweight Windows desktop application (C#/.NET 8 WinForms/WPF) that lets hobby growers record, analyze, and visualize key metrics for indoor plants. Core features:
Add Plant: “I enter species, sowing date, and base temp so the app starts tracking GDD automatically.”
Log Fertilization: “I record that I gave Plant X 2-1-2 fertilizer at 10 mL on 2024-06-05.”
See Dashboard: “I open a timeline showing cumulative GDD vs. recommended growth curve.”
Debug Alert: “If GDD is 20 % below ideal, show a yellow warning.”
Data Portability: “I can export my whole collection to a single CSV and later re-import without loss.”
5. Functional Requirements
ID
Requirement
F1
The app SHALL create, read, update, delete (CRUD) plant records.
F2
Each plant record SHALL store: PlantID (GUID), CommonName, ScientificName, DatePlanted, BaseTemp°C, UpperTemp°C, Notes.
F3
The app SHALL automatically fetch the day’s min/max temperature (user-input or API) and compute GDD: GDD = max(0, ((Tmax + Tmin)/2) - BaseTemp), capped at UpperTemp.
F4
The app SHALL maintain a running CumulativeGDD.
F5
The app SHALL accept fertilization events containing: Date, FertilizerName, N, P, K, Quantity, Units.
F6
The app SHALL display charts:
• Line: CumulativeGDD vs. IdealCurve.
• Bar: Fertilization events over time.
• Optionally Pie: Fertilizer NPK ratios.
F7
The app SHALL flag deviations:
• CumulativeGDD < 80 % of Ideal → “Under” warning.
• > 120 % → “Ahead” notice.
F8
Data persistence SHALL occur in plant_data.csv and fertilizer_log.csv within %APPDATA%\HousePlantBuddy\.
F9
The app SHALL load CSVs at startup and autosave every 5 min or on app close.
F10
Optional: The app MAY invoke a Python script analytics.py (bundled) for heavy plot generation if --use-python flag enabled.
6. Non-Functional Requirements
Type
Constraint
Performance
Cold start <1 s, UI response <150 ms.
Memory
Idle <100 MB; Peak <300 MB with 500 records.
File Size
Installer ≤10 MB; No external DB.
Security
No network calls unless temp API enabled; data stored locally only.
Reliability
Autosave + backup file rotation (7 days).
Maintainability
Code documented with XML comments; 80 % unit-test coverage on core logic.
import pandas as pd, matplotlib.pyplot as plt, json, sys, pathlib
df = pd.read_csv(sys.argv[1]) # plant_data.csv
# produce graph, save to out.png, also emit json summary
11. Dependencies
Component
Version
Reason
.NET SDK
8.x
Native Win support, good cross-platform potential.
WinForms/WPF
In-box
Rapid GUI.
CsvHelper
30.x
Robust CSV parsing/writing.
Optional Python
3.12
For pandas/matplotlib heavy plots.
pandas
≥2.0
Data manipulation.
matplotlib
≥3.8
Chart generation.
12. Acceptance Criteria
ID
Test
AC1
After adding a plant, the CSV file contains a new row with correct GUID.
AC2
GDD calculation matches manual spreadsheet within ±0.01.