DEV Community

Cover image for SafePlate 🍽️ —I Built an Allergy-Safe Meal Planner for My Friend Priya Using Gemma
Roshni Mishra
Roshni Mishra

Posted on

SafePlate 🍽️ —I Built an Allergy-Safe Meal Planner for My Friend Priya Using Gemma

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

My friend Priya is vegetarian, lactose-intolerant, and allergic to peanuts. For two years she ate the same 5 meals on rotation — not because she lacks creativity, but because she was terrified of accidentally eating something that could hurt her.

I built SafePlate: a personalized weekly meal planner powered by Gemma (Google's open-weight model) that generates safe, exciting, and varied meal plans tailored to her exact dietary restrictions.

SafePlate generates:

  • A full 3–7 day meal plan (breakfast, lunch, dinner + snack)
  • Prep time for every meal
  • A safety confirmation that every ingredient is restriction-safe
  • Shopping tips
  • Beautiful day-by-day browsable UI

Demo

🚀 Live App: https://safeplate-beige.vercel.app/

Try it yourself:

  1. Restrictions are pre-set for Priya (Vegetarian + No Lactose + No Peanuts)
  2. Pick your preferred cuisines
  3. Hit Generate Priya's Meal Plan
  4. Browse through the week day by day

Code

https://github.com/roshni09mishra-0/safeplate

How I Built It

Tech stack:

  • Next.js 14 + TypeScript
  • Tailwind CSS
  • Gemma 3 12B (gemma-3-12b-it) — open-weight model via Google AI Studio
  • @google/generative-ai SDK
  • Deployed on Vercel

The core is a Next.js API route that sends a structured prompt to Gemma:


typescript
const genAI = new GoogleGenerativeAI(apiKey);
const model = genAI.getGenerativeModel({ model: "gemma-3-12b-it" });
const result = await model.generateContent(prompt);
Enter fullscreen mode Exit fullscreen mode

Top comments (0)