Live: https://meal-muse-8888.vercel.app/
This app lets you search deterministic recipes (Hugging Face), save favorites, and build a shopping list backed by Supabase auth and tables.
- Email/password auth (Supabase GoTrue), password reset via
/reset, password update with confirmation, and client-side validation - Deterministic recipe generation via Hugging Face
chat/completions - Filters: meal type, cuisine, diet
- Save/unsave recipes per user (Supabase
saved_recipes) - Shopping list per user with check/uncheck + from-recipe tagging (
shopping_list_items) - Aggregated shopping list merges identical ingredients, shows per-recipe contributions, and supports removing whole recipe batches (even multiple instances of the same recipe)
- Saved recipes expand to show ingredients and instructions
- Loading skeletons during recipe search for smoother UX
- Next.js (app router, Node runtime)
- Supabase JS client (
@supabase/supabase-js) - Hugging Face Inference API
- Tailwind base import for resets; custom CSS theme
- Node.js 18+ recommended
- Supabase project (URL + anon key)
- Hugging Face API token
-
Install deps
npm install
-
Env vars: create
.env.localHF_API_KEY=your_hf_token NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Database: run schema in Supabase SQL editor
- File:
supabase/schema.sql - Creates
profiles,saved_recipes,shopping_list_itemswith RLS policies.
- File:
-
Dev server
npm run dev
Visit http://localhost:3000
- Set env vars in Vercel project settings:
HF_API_KEYNEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEY
- Deploy the repo; no Turbopack flags are used (Webpack default).
GET /api/recipes/search?q=term&mealType=&cuisine=&diet=- Deterministic HF call with caching.
- Returns
{ recipes: [...] }JSON or error JSON.
- Sign up / sign in via the home page panel.
- Reset password sends email; redirect completes at
/reset. - Data is per-user in Supabase tables (RLS enforced).
- 500 from recipe search: check
HF_API_KEYis set and valid; inspect server logs for HF response parsing errors. - Supabase 404/401: ensure
supabase/schema.sqlran and tables exist inpublicwith RLS policies; confirm URL/anon key match the target project. - Dark mode contrast: theme is set in
app/globals.css; adjust CSS variables if needed.
npm run dev— start dev server (localhost:3000)npm run build— production buildnpm run start— start production buildnpm run lint— lint code
app/— Next app router pages and API routesapp/api/recipes/search/route.js— Hugging Face recipe searchcomponents/— auth, search, saved, shopping, providerssrc/lib/supabaseClient.js— Supabase client setupsupabase/schema.sql— database schema + RLS