DjangoLINEGeminiNext.js 2025

Fit Homie

LINE-first Fitness Agent

Fit Homie

[ Overview ]

Fit Homie is a LINE-first fitness and nutrition agent that helps users track meals, log workouts, and get micronutrient-level health insights through LINE Messenger. It uses Gemini AI to extract nutrition from food photos — snap a meal, get a full nutritional breakdown including 24+ vitamins and minerals. The architecture features a 5-layer cost optimization pipeline to keep AI inference affordable at scale, a multi-layer nutrition cache for frequently logged foods, and tiered subscription billing. Built after the user asked "my ex girlfriend and friends got hooked" on early versions in Thailand.

[ Key challenges ]

  • AI cost management at scale — 5-layer cost optimization pipeline to keep Gemini API calls affordable while processing meal photos
  • Food recognition accuracy across Thai cuisine — regional dishes, mixed plates, and ambiguous presentation
  • Multi-layer nutrition caching — deduplicating frequent foods while handling recipe variations and portion differences
  • LINE Messaging API limitations — rich menu constraints, message size limits, and platform-specific UI paradigms
  • Micronutrient database — mapping recognized foods to 24+ vitamins and minerals with daily value percentages

[ Key features ]

  • AI food extraction from photos — snap a meal, get instant nutritional breakdown with 24+ micronutrients
  • LINE-first architecture with rich messaging, interactive flex menus, and quick reply buttons
  • 5-layer cost optimization pipeline — image preprocessing, cached recognition, partial fallback, tiered model selection, result caching
  • Multi-layer nutrition cache reducing API costs by 60%+ for frequently logged foods and restaurant meals
  • Tiered subscription billing with Stripe — free tier, $9.99/mo premium with full AI and micronutrient analysis
  • Smart nutrition alerts — real-time deficiency and excess flags with context and actionable suggestions
  • AI coach chat for fitness and nutrition advice with personalized recommendations based on logged data

[ Screenshots ]

Fit Homie screenshot

[ Tech stack ]

  • Django backend with LINE Messaging API integration for rich messaging and interactive menus
  • Gemini AI for food recognition, nutritional extraction from photos, and natural language coaching
  • Next.js dashboard for nutrition analytics, progress visualization, and account management
  • 5-layer cost optimization pipeline — preprocessing → cached match → partial → full inference → result caching
  • Stripe for tiered subscription billing with webhook-driven access management
  • PostgreSQL for user profiles, meal logs, workout history, and nutrition cache
  • Redis for real-time rate limiting, session management, and hot cache for frequent food lookups

[ Stats ]

AI Cost Gates 5-layer cost optimization pipeline
Visit live project