This post is my submission for DEV Education Track: Build Apps with Google AI Studio.
What I Built
I built the AI Healthy Meal Planner, an intelligent application that generates comprehensive, 7-day diabetes-friendly and heart-healthy vegetarian meal plans. It specializes in North/South Indian and Chinese cuisines, generating meal plans from a user-managed dish database. The core functionality relies on a powerful prompt engineering approach with the Gemini API to request a structured JSON output that includes the entire weekly plan, ensuring it adheres to strict health rules like low glycemic index, low saturated fats, and low sodium. I also utilized the AI for dynamic features like generating recipes for new custom dishes and providing instant, health-focused feedback when a user tries to swap a meal.
Demo
https://ai-healthy-meal-planner-554719291717.us-west1.run.app/
My Experience
Working through the track and building the AI Healthy Meal Planner was a highly valuable and surprisingly smooth experience.
What I Learned and Key Takeaways
My biggest takeaway was the power and reliability of structured output when working with the Gemini API. By defining a strict JSON schema for the meal plan, I was able to get a complex, multi-day data structure in a predictable format, which drastically simplified the frontend integration and logic. It taught me that for complex applications, the model isn't just a text generator; it's a powerful, self-correcting data engine if given the right instructions.
I also learned to appreciate the efficiency of using AI for database management logic. Instead of writing complex, rule-based code to check if a meal plan adhered to "diabetes-friendly, heart-healthy" rules, I simply included these constraints directly in the system prompt. The Gemini model handles the complex filtering and balancing of dishes from the database, effectively acting as an intelligent planner and rule-checker in one go.
What Was Surprising
The most surprising aspect was how effective the model was at handling layered constraints and contextual feedback. For instance, when a user attempts a meal swap, the AI not only replaces the meal but provides an immediate, nutritional-based justification for the swap (e.g., "This new dish adds more fiber but slightly increases the sodium for the day"). This level of subtle, context-aware reasoning felt like a huge leap from simpler API calls and opened my eyes to the potential for creating truly interactive and personalized AI features within an application.
Top comments (2)
Great post, @shyam Kumar V N! The way you used the Gemini API along with structured JSON prompts to build your AI meal-planner app is really impressive — especially the part where the model handles layered constraints like low glycemic index, low saturated fats, and low sodium with contextual feedback.
A few thoughts/questions:
Thanks for sharing your workflow — this kind of build-in-public example is super valuable for the community! Looking forward to your next project.
That is exceptionally insightful feedback, —thank you. I appreciate you drilling down into the architectural and UX design choices.
Here is a breakdown of how the app handles these areas, and how your feedback informs the roadmap:
1. Adaptive Logging and Fine-Tuning
You're right—this is the path to a truly "learning" planner.
generateMealPlanprompt, allowing the AI to automatically make better-personalized suggestions without explicit user input.2. Handling Dynamic Dietary Preferences
The app is already highly flexible, handling this via a data + prompt engineering pattern:
vegan,gluten-free,nut-free).3. Interactive "Why did this meal fit you better" Tooltip
I'm glad you spotted this crucial UX feature—it's already live!
EditMealModalperforms a real-time Gemini API call.Your questions provide a clear mandate for the transition from a robust prototype to a scalable production system, particularly around the data architecture needed for true AI learning. Thank you for validating the key design decisions and pushing the roadmap forward