PWA for caring for indoor plants: watering and fertilizing calendar, AI diagnosis (Cursor), and weather-based recommendations (Open-Meteo, no API key).
Self-hosting: see docs/self-hosting.md for Supabase setup, environment variables, cron jobs, and production auth.
- Nuxt 4 + Vue 3 + Nuxt UI
- Supabase (Postgres, magic link auth, storage)
- @cursor/sdk on Nitro routes (
server/api) — optional - @vite-pwa/nuxt
- Copy
.env.exampleto.env:
cp .env.example .env- Create a project on Supabase and apply migrations:
npx supabase link
npx supabase db push- Configure environment variables (from Project Settings → API):
.env variable |
Supabase key | Purpose |
|---|---|---|
SUPABASE_URL |
Project URL | API endpoint |
SUPABASE_KEY |
Publishable (anon) | Client; respects RLS |
NUXT_SUPABASE_SECRET_KEY |
Secret (service_role) | Server only (server/api) |
The Secret key has elevated permissions: do not expose it in the frontend or commit it to Git.
| Variable | Purpose | If missing |
|---|---|---|
CURSOR_API_KEY |
AI diagnosis and recommendations | Those features return 503 |
PERENUAL_API_KEY |
Species variety tab | Species tab returns 503 |
NUXT_PUBLIC_HOME_LAT / NUXT_PUBLIC_HOME_LON |
Default weather location | Defaults to Madrid coordinates |
NUXT_PUBLIC_VAPID_PUBLIC_KEY / VAPID_PRIVATE_KEY |
Web Push | Push disabled |
CRON_SECRET |
Authorize cron endpoints on self-host | Cron returns 403 without Vercel header |
Weather and exterior watering recalculation use Open-Meteo (free, no configuration).
Core plant care (plants, sites, calendar, photos) works with Supabase only.
Requires Node.js 22.
npm install
npm run devnpm run build
node .output/server/index.mjsOr npm run preview for a local check.
Deploy on Vercel, a VPS, or any Node 22 host with the same environment variables. For non-Vercel hosts, scheduled jobs and SMTP for magic links are documented in docs/self-hosting.md.
vercel.json triggers:
| Endpoint | Schedule (UTC) | Purpose |
|---|---|---|
GET /api/cron/send-daily |
Daily 09:00 | Push reminders |
GET /api/cron/recalculate-watering |
Sundays, midnight | Exterior watering from weather |
Set CRON_SECRET in production. Vercel cron sends Authorization: Bearer <CRON_SECRET>; endpoints also accept x-vercel-cron or x-cron-secret.
npx web-push generate-vapid-keys # optional, for pushSee CONTRIBUTING.md. Architecture overview: docs/architecture.md.