DEV Community

mahip1111
mahip1111

Posted on

SafePlate AI - Open-Source Local Allergy Shield for My Friend Swayum

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🀝

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

What I Built

I built SafePlate AI for my close friend Swayum.

Swayum deals with severe peanut allergies and celiac disease (strict gluten intolerance). Whenever we hang out, cook together, or try to make dinner from random things in the fridge, it's always stressful for him. He has to spend 15 minutes inspecting every single label on spice jars and sauces, constantly worried about hidden wheat or cross-contamination. Most of the time, he just plays it safe and eats plain boiled food.

I wanted him to actually enjoy cooking without that constant background anxiety.

SafePlate AI is a lightweight, 100% local kitchen assistant that:

  1. Remembers Swayum's Exact Allergies: Stores his specific health profile so he never has to repeat his dietary restrictions.
  2. Scans Available Pantry Items: We just type or tap whatever ingredients we have in the kitchen, and it immediately scans for hidden allergen triggers.
  3. Suggests Smart, Safe Swaps: If we add regular soy sauce or peanut butter, it immediately flags the hazard and swaps it with coconut aminos, gluten-free tamari, or sunflower seed butter.
  4. Builds a Ready-to-Cook Recipe: Gives us clear, step-by-step cooking instructions with an interactive kitchen timer and a printable recipe card.

Demo

  • Live Local Setup: Runs 100% locally and offline on any standard laptop or kitchen device.
  • How to Run: Follow the quick 2-step setup in the GitHub repository (start Ollama, run node server.js, and open http://localhost:3000).

Code

The entire project is open source on GitHub:

How I Built It

SafePlate AI is built around open-source AI technologies from the ground up:

  • Local AI Brain: Powered by Ollama running Meta's llama3.2:1b open-weight model directly on local hardware via REST streaming.
  • Strict Safety Prompting: Low temperature setting (0.3) so the model stays grounded, ensuring zero hallucinated ingredients and strict allergen avoidance.
  • Instant Fallback Engine: Built-in safety rules so that even if the AI model takes a second or Ollama is paused, the app still instantly generates safe substitutes without freezing.
  • Clean Frontend: Built with vanilla HTML/CSS/JS and a zero-dependency Node.js server to keep it super fast, reliable, and lightweight.

Why Does Open Innovation Matter?

Building this for a real friend made it obvious why local open-source AI is vastly superior to closed cloud APIs:

  1. πŸ”’ Real Health Privacy: Personal medical history and allergy sensitivities shouldn't live on someone else's cloud server. Running llama3.2 locally on Ollama means Swayum's dietary data never leaves my laptop.
  2. πŸ’Έ Completely Free Forever: Cooking dinner 2–3 times a day shouldn't cost token fees or a $20/month subscription. Open models cost exactly $0.00.
  3. πŸ“Ά Kitchen-Proof & Offline: Kitchens don't always have great Wi-Fi. SafePlate works completely offline on a kitchen counter laptop without needing an active internet connection.
  4. πŸ”§ Total Control: We can tweak safety prompts, adjust models, or switch between Llama, Gemma, or Mistral without worrying about API deprecations or surprise bills.

My Agent Session

This entire project was pair-programmed, architected, and verified end-to-end with an AI coding agent using the Antigravity & DevRelay agent workflow β€” covering prompt calibration, local Ollama integration, non-blocking asynchronous streaming, and automated test suite creation.

Prize Categories

  • Main Grand Prize: Hacktoberfest Weekend Challenge: Build for a Friend
  • Partner Track: Best Open-Source AI Architecture (Local Ollama / Open-Weights)

Hand-off note: I tested this with Swayum over the weekendβ€”we made a coconut-turmeric skillet using what we had in the kitchen. It was 100% peanut-free and gluten-free, with zero stomach flare-ups. Seeing him eat dinner without worrying was the best validation!

Top comments (0)