NutriNen Baby: A Gamified Baby Nutrition App with a 33-Tool AI Chatbot and a Music Box
Gonzalo Monzón
Founder & Lead Architect
How do you make parents actually enjoy tracking their baby's nutrition? You gamify it. You give them an AI chatbot that can check the fridge, plan meals, and play lullabies — all in the same conversation. You build a music box with 22 melodies and particle effects. And you wrap it all in a native Android app that works offline. That's NutriNen Baby: 19,600 lines of Vanilla JS that turn baby feeding into an engaging daily ritual.
No React Native. No Flutter. No frameworks at all. Just HTML, CSS, Vanilla JS, Web Audio API for programmatic music generation, Canvas for particle effects, and Capacitor 8 to ship it as a native Android app with push notifications, camera, and native TTS/STT. Built on top of our Heartbeat health engine.
Meal Tracking: The Core Loop
The foundation is simple but complete meal management:
| Feature | Detail |
|---|---|
| Meal logging | Every meal with time, type, quantity, photo (optional) |
| Daily timeline | Chronological view of all meals, snacks, and milk feeds |
| Statistics | Daily, weekly, monthly summaries with nutritional breakdowns |
| Weekly plans | AI-generated meal planning based on baby's stage and preferences |
| Agenda | Reminders for doctor appointments, vaccination dates, milestones, and custom events |
| Alarms | Configurable feeding schedule alarms — breakfast, lunch, snack, dinner |
The key insight: parents don't want a calorie counter. They want to know "did my baby eat enough variety today?" and "what should I make for tomorrow's lunch?" The stats focus on food group diversity and age-appropriate nutrition, not macros.
Virtual Fridge: 6 Storage Spaces
A complete pantry management system organized into 6 virtual spaces:
| Space | Contents |
|---|---|
| Fridge | Dairy, fresh fruits, fresh vegetables |
| Freezer | Prepared purées, meats, fish |
| Pantry | Cereals, legumes, canned goods |
| Medicine cabinet | Vitamins, supplements, medicines |
| Essentials | Diapers, wipes, creams |
| Wardrobe | Clothes by size, seasonal |
Full management: add, edit, expiry dates, low-stock alerts. The fridge integrates with NutriBot — ask "what can I make with what I have?" and the AI checks your virtual fridge stock and suggests recipes using available ingredients. Ask "what do I need to buy?" and it generates a smart shopping list based on your meal plan minus current stock.
NutriBot: AI Chatbot with 33 Function-Calling Tools
NutriBot is the most powerful feature — a conversational AI that doesn't just answer questions but takes real actions through 33 function-calling tools:
| Category | Tools | Examples |
|---|---|---|
| Fridge | 5 | Check stock, add product, expiry alerts, suggest recipes with current stock |
| Shopping | 4 | Create list, add items, complete items, purchase history |
| Meals | 3 | Log meal, view history, suggest daily menu |
| Agenda | 3 | Create reminder (doctor, vaccine, milestone), list upcoming, mark done |
| Alarms | 3 | Create feeding alarm, list alarms, delete alarm |
| Profiles | 2 | View baby profile, update baby data |
| Gamification | 3 | View level/XP, daily challenge, achievements |
| Growth | 3 | Log weight/height, view charts, WHO percentiles |
| Music | 2 | Play melody, create playlist |
| General | 8 | Nutrition tips, allergy info, BLW guidance, seasonal food |
The conversation feels natural: "My baby just had sweet potato purée for lunch" → NutriBot logs the meal, updates XP, checks if it's a new food (potential achievement), and responds with a contextual tip about vitamin A in sweet potatoes.
LLM providers: Groq (Llama 4), Gemini 2.5 Flash, DeepSeek, Cloudflare Workers AI. Multi-provider with automatic fallback. Smart deduplication prevents the same tool from being called twice in a single conversation turn.
Music Box: 22 Melodies, Zero Audio Files
This is the feature parents love most. A complete music box with 22 melodies — lullabies, classical pieces, nature sounds, ambient music — all generated programmatically through Web Audio API. No MP3 files, no downloads, no storage. Pure code-generated music.
| Feature | Detail |
|---|---|
| 22 melodies | Lullabies, classical, nature, ambient |
| 6 particle effects | Stars, bubbles, fireflies, musical notes, hearts, leaves — rendered on Canvas |
| Playlist chain | Continuous playback across multiple melodies |
| Ducking system | Lowers music volume when NutriBot speaks via TTS |
| Controls | Play/pause, volume, next, shuffle |
The particle effects sync with the music — stars twinkle on beat, bubbles float at the tempo of the melody. When NutriBot speaks, the ducking system smoothly fades the music to 20%, lets the bot speak, then fades back up. It's the kind of polish that makes parents forgive the occasional AI misunderstanding.
Gamification: XP, Levels, and Daily Challenges
Full gamification system personalized by the baby's feeding stage:
| Element | Detail |
|---|---|
| XP | Experience points for every action (logging meals, completing challenges, maintaining streaks) |
| Levels | Progression with stage-themed names (Milk Explorer, Purée Pioneer, BLW Champion...) |
| Achievements | 30+ unlockable badges for milestones (first vegetable, 7-day streak, all food groups in one day) |
| Streaks | Consecutive days logging meals — the most effective retention mechanic |
| AI Battery | A "battery" mechanic that recharges with NutriBot usage — gamifying AI interaction itself |
| Daily challenges | AI-generated challenges based on baby's current stage ("Try a new green vegetable today!") |
The AI Battery is a clever hook: it gives parents a reason to engage with NutriBot daily. Use NutriBot → battery charges → battery powers special features. It turns every AI interaction into a game mechanic.
WHO Growth Charts
Pediatric growth tracking based on official WHO tables:
- Weight percentiles by age and sex
- Height percentiles with WHO reference curves
- BMI tracking for pediatric body mass index
- Visual timeline with registered data points over time
- Alerts when the baby falls outside normal percentile ranges
Parents log weight and height periodically; the app plots them against WHO reference data. NutriBot can access growth data through its tools — ask "how is my baby's growth?" and it analyzes percentile trends, not just current values.
Native Android App via Capacitor 8
The entire app ships as a native Android application through Capacitor 8:
| Native Feature | Usage |
|---|---|
| Native TTS | NutriBot speaks aloud — great for hands-busy parents |
| Native STT | Voice dictation — "log lunch: carrot purée with chicken" |
| Push notifications | Agenda reminders (doctor visits, vaccines), streak alerts, daily challenges |
| Native alarms | System-level feeding schedule alarms — rings even when app is closed |
| Camera | Photo-logging meals |
| Local storage | Full offline operation with background sync |
The offline-first architecture means the app works perfectly without internet. Meals get logged, gamification updates, music plays — everything local. When connectivity returns, changes sync to Cloudflare D1/R2 in the background. No loading spinners, no "you're offline" messages.
Progressive Authentication
A thoughtful auth flow that doesn't block first-time users:
First visit → Guest mode (soft auth)
│
├── Use the app freely
├── Data stored in localStorage
│
└── When syncing/saving → Required login (hard auth)
├── Google SSO
├── Email + password
└── Early Adopter invitation code
Early Adopters get special benefits: bonus XP, exclusive badges, direct feedback channel to the development team. It's a beta program disguised as a VIP experience.
The Numbers
| Metric | Value |
|---|---|
| index.html | ~19,600 lines |
| NutriBot tools | 33 function-calling tools |
| Music melodies | 22 |
| Particle effects | 6 |
| Fridge spaces | 6 categories |
| Unlockable achievements | 30+ |
| Documentation files | 25 |
| Dependencies | 0 |
Key Takeaways
1. Gamification is the difference between "logging meals" and "using the app daily." Streaks, XP, daily challenges — these mechanics turn a chore into a habit. Parents who wouldn't open a nutrition tracker come back every day to maintain their streak.
2. 33 function-calling tools make the chatbot actually useful. A chatbot that just answers questions is a novelty. A chatbot that checks your fridge, logs meals, plays lullabies, and generates shopping lists is a daily utility. Function calling transforms NutriBot from FAQ to personal assistant.
3. Web Audio API eliminates the music asset problem. 22 melodies with zero audio files. No CDN costs, no loading times, no file management. Pure code-generated music that sounds good enough for lullabies and light enough for instant playback.
4. Capacitor gives you native without native complexity. One codebase, one language (JS), native features (TTS, STT, camera, push notifications). The tradeoff vs. React Native or Flutter? No framework learning curve, no build system complexity, no dependency hell. Just your HTML/JS/CSS wrapped with native bridges.
5. Progressive auth reduces friction to zero. Letting parents use the app fully before requiring login means they're already invested when the auth wall appears. Conversion from guest to registered user is dramatically higher than blocking at the door.
Tags
About the Author
Gonzalo Monzón
Founder & Lead Architect
Gonzalo Monzón is a Senior Solutions Architect & AI Engineer with over 26 years building mission-critical systems in Healthcare, Industrial Automation, and enterprise AI. Founder of Cadences Lab, he specializes in bridging legacy infrastructure with cutting-edge technology.
Related Articles
No-Code Workflows That Actually Work in Production — 7,000 Lines of Execution Engine
Most "no-code" tools break at the first real-world edge case. We built a visual workflow engine with 20+ node types, Canvas API at 60fps, Durable Objects for long-running execution, and step-by-step debugging. Here's how 7,073 lines of engine code make drag-and-drop actually production-grade.
From 4-Hour Response Time to Instant: How Our AI Voice Agents Make Real Phone Calls
Twilio for calls, Gemini Flash for real-time conversation, ElevenLabs for 15+ natural voices. We built AI agents that confirm appointments in 35 seconds, qualify leads with 3 questions, and switch between Spanish, English, and Catalan mid-call. Plus: God Mode lets humans supervise and intervene live.
Synapse Studio: A 2D Virtual Office Where AI Agents Do the Real Work
We built a SimTower-style animated office where AI agents with multimodal capabilities — vision, image generation, web search, iterative image evolution — collaborate on real tasks. Zero dependencies, pure Vanilla JS, running on Cloudflare.