AI AGENT / FULLSTACK
myBot, a LINE Fitness Coach
AI meal logging from photos
Logging food usually means opening an app, searching for each item and filling in a form; with myBot, you start by taking a photo. In the backend I put the LLM last, to keep cost and latency down and the replies more predictable: rules catch explicit commands, a formula works out daily calorie needs, and only photos and messages that need language understanding reach the LLM.
ROLE
Solo backend developer
STACK
TypeScript · Vercel Serverless · Gemini · Supabase
LINE bot · 8-layer intent routing · solo backend
HIGHLIGHTS
- Rules before Gemini: 8-layer intent routing runs cheap regex and keyword checks on explicit commands first, and only what gets past them reaches Gemini
- Asks about portion size: photo recognition takes two steps; the bot saves a pending_context with a TTL, asks a follow-up and ties the two LINE webhook calls (photo and reply) together, so Gemini's portion estimate is more accurate
- Cycle-aware replies: the menstrual cycle is split proportionally into four phases, and the current phase goes into the system prompts of three LLMs (coach, cravings, strength training)
- TDEE by formula: calculated with the Mifflin-St Jeor equation, not estimated by the LLM, so the same inputs always give the same number