Plant data lives in a live database now โ no code editing needed to add or update it.
Add or update data
Use + Plant on the dashboard to add a new plant.
Use the round + button (bottom right) to log watering, spraying, harvests, pests, or checks.
Use + Task to add a reminder, and tap the โ on a task chip to mark it done.
On a plant's page, use Take photo or Upload photo to add pictures โ tap a photo to view it full-size or delete it.
On a plant's page, use + Add under Fertilizer schedule to add or remove products.
The first change you make will ask for the edit PIN.
Changing the site's design or code
Edit index.html or the files in functions/.
Deploy with wrangler pages deploy . from the project folder.
Cloudflare / wrangler access
The site runs on Cloudflare Pages, D1 (database), and R2 (photo storage). The wrangler CLI is how you deploy and manage those from this PC.
First-time setup on a new machine
Install: npm install -g wrangler
Run wrangler login โ it opens a Cloudflare page in your browser.
Log in and click Allow to authorize wrangler.
Check who's logged in
wrangler whoami โ shows the account email and account name if you're authenticated.
Re-authenticating (token expired)
Cloudflare's OAuth login tokens expire periodically โ if a deploy fails with Authentication error [code: 10000] or Invalid access token [code: 9109], this is why.
Just run wrangler login again, then click Allow on the consent screen. No data is lost โ this only refreshes the CLI's access.
Revoking access
In the Cloudflare dashboard, go to your profile icon (top right) โ API Tokens.
Find the wrangler / Workers CLI entry under active authorizations and revoke it.
This immediately breaks any local wrangler session โ the next command will fail with an auth error.
Re-allowing after a revoke
Same as re-authenticating: run wrangler login and click Allow on the new consent screen.
Changing the edit PIN
wrangler pages secret put SITE_PIN --project-name garden-tracker
Enter the new PIN when prompted. It takes effect on the next deploy.