Back to Blog
Use Cases October 20, 2025 · 11 min read

NutriNen Baby: A Gamified Baby Nutrition App with a 33-Tool AI Chatbot and a Music Box

GM

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:

FeatureDetail
Meal loggingEvery meal with time, type, quantity, photo (optional)
Daily timelineChronological view of all meals, snacks, and milk feeds
StatisticsDaily, weekly, monthly summaries with nutritional breakdowns
Weekly plansAI-generated meal planning based on baby's stage and preferences
AgendaReminders for doctor appointments, vaccination dates, milestones, and custom events
AlarmsConfigurable 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:

SpaceContents
FridgeDairy, fresh fruits, fresh vegetables
FreezerPrepared purées, meats, fish
PantryCereals, legumes, canned goods
Medicine cabinetVitamins, supplements, medicines
EssentialsDiapers, wipes, creams
WardrobeClothes 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:

CategoryToolsExamples
Fridge5Check stock, add product, expiry alerts, suggest recipes with current stock
Shopping4Create list, add items, complete items, purchase history
Meals3Log meal, view history, suggest daily menu
Agenda3Create reminder (doctor, vaccine, milestone), list upcoming, mark done
Alarms3Create feeding alarm, list alarms, delete alarm
Profiles2View baby profile, update baby data
Gamification3View level/XP, daily challenge, achievements
Growth3Log weight/height, view charts, WHO percentiles
Music2Play melody, create playlist
General8Nutrition 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.

FeatureDetail
22 melodiesLullabies, classical, nature, ambient
6 particle effectsStars, bubbles, fireflies, musical notes, hearts, leaves — rendered on Canvas
Playlist chainContinuous playback across multiple melodies
Ducking systemLowers music volume when NutriBot speaks via TTS
ControlsPlay/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:

ElementDetail
XPExperience points for every action (logging meals, completing challenges, maintaining streaks)
LevelsProgression with stage-themed names (Milk Explorer, Purée Pioneer, BLW Champion...)
Achievements30+ unlockable badges for milestones (first vegetable, 7-day streak, all food groups in one day)
StreaksConsecutive days logging meals — the most effective retention mechanic
AI BatteryA "battery" mechanic that recharges with NutriBot usage — gamifying AI interaction itself
Daily challengesAI-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 FeatureUsage
Native TTSNutriBot speaks aloud — great for hands-busy parents
Native STTVoice dictation — "log lunch: carrot purée with chicken"
Push notificationsAgenda reminders (doctor visits, vaccines), streak alerts, daily challenges
Native alarmsSystem-level feeding schedule alarms — rings even when app is closed
CameraPhoto-logging meals
Local storageFull 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

MetricValue
index.html~19,600 lines
NutriBot tools33 function-calling tools
Music melodies22
Particle effects6
Fridge spaces6 categories
Unlockable achievements30+
Documentation files25
Dependencies0

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

Mobile App Baby Nutrition AI Chatbot Gamification Capacitor Vanilla JS

About the Author

Gonzalo Monzón

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.

Stay in the loop

Get notified when we publish new articles about AI automation, use cases, and practical guides.