A dinner planner for my vegetarian friend that doesn't trust its own AI
This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend What I Built My friend is vegetarian, so "what's for dinner?" always comes with a rule: no meat, no fish, and none of the hidden stuff either, like gelatin or Worcestershire sauce. I wanted a tool that looks at what is actually in their kitchen and suggests dinners that follow that rule every time. Safe Plate is a…
This submission for the Hacktoberfest Weekend Challenge aims to create a dinner planner tailored to a vegetarian friend who is wary of AI systems. The app, named Safe Plate, determines meals based on what ingredients are present in the user's kitchen. The user inputs the recipient's dietary restrictions, personal preferences, and kitchen inventory.
A local language model then proposes a meal plan which subsequently undergoes a safety check to ensure compliance with restrictions. If any dish breaches these rules, it is highlighted in red and moved to the bottom of the list. Conversely, meals that comply receive a green label indicating successful allergen checks. This tool operates locally and does not necessitate any hosting.
The AI model used is Gemma 3 1B, an open-weight model from Google, running on a low-spec Windows laptop. Users can pull the model using Ollama, a platform for running AI models locally. The application is a single HTML file with no framework, which interacts with Ollama's local chat endpoint to fetch meal suggestions. If the model rejects the schema, the app retries in plain JSON mode.
The safety check employs a word list that flags any ingredients matching the user's restrictions. Although this system is not a medical tool and can sometimes flag ingredients incorrectly, it errs on the side of caution. The recipes proposed by the model are simple yet practical, such as lentil rice or potato and lentil curry, both of which pass the vegetarian check.
Open innovation is emphasized in this project because dietary restrictions and allergies are sensitive health information that should not be shared with external servers. Running this tool locally ensures privacy, eliminates costs, and provides users with full control over their data. The use of open-weight models also allows for easy swapping in more capable models if desired.
However, there is a trade-off between the quality of the recipes produced by a larger, more powerful model versus the benefits of privacy, zero cost, and local control.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.