{"slug": "safeplate", "title": "SafePlate", "summary": "A developer built SafePlate, an open-source TypeScript/React web app that uses on-device open-weight models (Gemma 2B, Llama 3.2, SmolLM) to scan ingredient labels for hidden allergens, plan safe shared meals, and enforce kitchen cross-contamination protocols. The project was created for a college roommate with severe Celiac disease and peanut/tree-nut anaphylaxis, and includes a local inference engine with telemetry verifying zero cloud data egress.", "body_md": "The Allergy-Safe Kitchen Guardian Built for My Roommate (Powered by On-Device Open-Weight AI)\n\npublished: true\n\ntags: hacktoberfest, opensource, ai, webdev\n\ncanonical_url: [https://safeplate-built-for-a-friend.ai.studio](https://safeplate-built-for-a-friend.ai.studio)\n\n*This is a submission for the [Hacktoberfest Weekend Challenge: Build for a Friend](https://dev.to/challenges/hacktoberfest-weekend-2026-10-01)*\n\n## \n  \n  \n  What I Built\n\nI built **SafePlate** for my college roommate and closest friend, **Sam**. \n\nSam lives with severe Celiac Disease and life-threatening peanut and tree-nut anaphylaxis. Sharing a small apartment kitchen in college was an endless source of dread and friction: roommates constantly bought seasonings with hidden wheat derivatives (maltodextrin, brewer's yeast, soy sauce blends), accidentally cross-contaminated cookware with bread crumbs, and Sam had to spend 20 minutes in supermarket aisles squinting at tiny font labels while hungry.\n\nSafePlate gives our apartment:\n\n- \n**Instant On-Device Label & Ingredient Scanner** : Detects sneaky allergen derivatives (*malt, farina, brewer’s yeast, hydrolyzed wheat, shared facility lines* ) and provides certified 1-to-1 kitchen swaps (e.g.,*San-J GF Tamari, SunButter, coconut aminos* ).\n- \n**Safe Shared Weekly Meal Planner** : Curated comfort dinners certified 100% safe for Sam that all roommates love (under $4/portion), with step-by-step cooking instructions and kitchen isolation protocols.\n- \n**Pantry & Fridge Quick Cook** : Generates instant safe recipes from whatever is in the fridge so no one orders risky takeout.\n- \n**Apartment Cross-Contamination Protocols** : Non-negotiable roommate kitchen boundaries (*The Red Toaster Sanctuary, blue allergy sponge segregation, double-dip bans on butter & jam* ).\n- \n**Safe Smart Grocery List** : Filterable shopping checklist with specific brand guidance so roommates never grab the wrong soy sauce or oat brand.\n\n## \n  \n  \n  Demo\n\n- \n**Live Deployed App** :\n- \n**Video Demo** :\n- \n**Video Demo** :\n### \n      SafePlate, open source AI, Gemma 2B, Llama 3.2, SmolLM, local AI, on-device AI, Hacktoberfest, Hacktoberfest 2026, Build for a Friend, Celiac disease, gluten free app, allergy scanner, meal planner, Dev.to challenge, privacy AI, edge AI, web development, react, typescript\n    \n \n # SafePlate: Built for a Friend 🍽️🛡️\n**An allergy-safe shared apartment meal planner and on-device ingredient guardian built for a roommate, powered by local open-weight AI.**\n *Built for the [Hacktoberfest Weekend Challenge: Build for a Friend](https://dev.to/challenges/hacktoberfest-weekend-2026-10-01).*\n \n \n ## 📖 The Story: Who I Built This ForI built **SafePlate** for my college roommate and closest friend,**Sam** (Apartment 4B).\n Sam lives with **severe Celiac Disease** and**life-threatening peanut and tree-nut anaphylaxis** . In our shared college apartment, cooking was an endless source of stress and friction:\n   - Roommates repeatedly purchased seasonings, sauces, and snacks containing sneaky wheat derivatives (*maltodextrin, barley malt, brewer’s yeast, fermented soy sauce* ).\n  - An accidental breadcrumb in the toaster or a shared porous sponge could trigger weeks of agonizing autoimmune intestinal damage or an emergency room EpiPen visit.\n  - Grocery shopping was exhausting: Sam spent 20 minutes in supermarket aisles squinting at micro-print ingredient lists while hungry.\n SafePlate provides…\n\n## \n  \n  \n  Code\n\nThe project is built as a production-grade TypeScript React web application powered by on-device open-weight model architectures. \n\nKey code modules:\n\n- \n`/src/services/openAiEngine.ts` : Local open-weight inference & heuristic safety parsing engine with real-time telemetry (0 bytes cloud egress verification, token tracking, latency measurement).\n- \n`/src/components/IngredientScanner.tsx` : Real-time allergen detection, cross-contamination vector checking, and safe ingredient substitutions.\n- \n`/src/components/MealPlanner.tsx` : Weekly apartment meal planner with full cross-contamination protocols.\n- \n`/src/components/PantryChef.tsx` : On-demand safe recipe synthesis from on-hand ingredients.\n- \n`/src/components/KitchenSafetyChecklist.tsx` : Shared apartment kitchen rules and fridge pledge.\n- \n`/src/components/OpenSourceInspector.tsx` : Interactive benchmark lab comparing on-device open weights against closed cloud APIs.\n\n## \n  \n  \n  How I Built It\n\nSafePlate has open-source AI at its very foundation:\n\n- \n**Gemma 2 2B (Google Open Weights)** : Ultra-efficient instruction-tuned model powering rapid ingredient parsing, hidden derivative detection, and safe culinary substitutions directly inside the browser runtime.\n- \n**Llama 3.2 1B (Meta Open Weights)** : High-speed edge model with sub-1GB footprint optimized for instant latency in low-memory environments.\n- \n**SmolLM2 360M (Hugging Face)** : Micro-footprint open model providing lightweight safety checks on older student laptops.\n- \n**Local On-Device Execution** : Runs completely air-gapped on the client with zero network requests to remote cloud AI endpoints.\n\n## \n  \n  \n  Why Does Open Innovation Matter?\n\nBuilding for a real person with medical vulnerabilities proved why open innovation is vastly superior to closed cloud APIs:\n\n1. \n**Medical Data Sovereignty & Absolute Privacy** : Sam's medical allergies, Celiac diagnosis, and dietary restrictions are sensitive personal health information. Closed commercial LLMs ingest user prompts for corporate telemetry and model retraining. With open-weight models,**0 bytes leave the device** .\n2. \n**Zero Recurring Cost for Students & Roommates** : College roommates and students cannot afford $20/month per-seat closed AI subscriptions just to check sauce labels or plan dinner. Open models run forever at zero marginal cost.\n3. \n**Grocery Store Dead Zones** : Supermarket basements, subways, and farm stands notoriously have zero cellular reception. SafePlate runs air-gapped on-device—no spinning loading wheels or lost connections when you need to verify a label right now.\n4. \n**Specialized Steering Over Corporate Disclaimers** : Closed commercial APIs hedge with 5 paragraphs of legal disclaimers (\"*we cannot guarantee accuracy, consult a doctor* \"). By deploying open-weight models with dedicated apartment kitchen system prompts, we enforce strict, actionable cross-contamination protocols without arbitrary corporate censorship.\n\n## \n  \n  \n  What Sam Said Upon Handoff\n\n*\"Dude, you actually made this for me?! Finally I don’t have to stand in Trader Joe’s squinting at the micro-print on sauce bottles for 20 minutes while starving. And having our apartment meals planned so the roommates don’t accidentally buy barley malt seasonings is a literal lifesaver.\"*\n\n— **Sam**, Apartment 4B Roommate\n\n## \n  \n  \n  My Agent Session\n\nAgent session saved with DevRelay. Check the interactive session log and prompt engineering iterations directly in the build timeline!\n\n## \n  \n  \n  Prize Categories\n\n- **Open-Source AI at its Core**\n- **Edge / On-Device AI & Privacy**\n- **Build for a Friend (Most Heartwarming & Usable)**", "url": "https://wpnews.pro/news/safeplate", "canonical_source": "https://dev.to/abhishek_jn_1553cf06a8e7/safeplate-2n08", "published_at": "2026-10-04 05:27:57+00:00", "updated_at": "2026-10-04 05:37:48.464725+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-tools", "large-language-models", "ai-products", "developer-tools"], "entities": ["SafePlate", "Sam", "Gemma 2B", "Llama 3.2", "SmolLM", "Hacktoberfest", "React", "TypeScript"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/safeplate", "markdown": "https://wpnews.pro/news/safeplate.md", "text": "https://wpnews.pro/news/safeplate.txt", "jsonld": "https://wpnews.pro/news/safeplate.jsonld"}}