This is a calorie tracking app powered by vision AI. Upload a meal photo, get estimated calories and macro breakdowns. It’s a clean example of the “image in, structured data out” product pattern.
What Your Users See
From the user’s perspective, this app is wonderfully simple:
A practical computer-vision UX — not just “describe this image.”
What the App Tracks
- Estimated total calories
- Macro breakdowns (protein, carbs, fat)
- Individual meal item analysis
- Meal type context
- Recent history
- A styled daily dashboard shell you can replace with real aggregation logic
What Powers It
- A vision-capable model for image understanding
- Schema-based structured output — the AI returns typed data, not free-form text
- Object storage for uploaded meal photos
- Better Auth + PostgreSQL for auth and saved analyses
- The shared credit system
What You Need
Better Auth + PostgreSQL
Auth, saved analyses, and account data
Default vision-model path for this app
Storage
Uploaded meal photos
How It Works Under the Hood
Structured response
The model returns typed nutrition data that matches the defined schema — not random text.
The Schema Pattern
This is one of the most reusable patterns in the repo. The app defines a schema for the expected output, and the AI is forced to return data that matches it. Here are the key files:app/(apps)/vision/schema.ts— defines what the AI must returnapp/(apps)/vision/prompt.ts— tells the AI how to analyze the imageapp/(apps)/vision/toolConfig.ts— app configuration and model selection
Great Starting Point For…
Even if you don’t want to build a calorie tracker, this app gives you a reusable pattern: Upload image -> Run vision analysis -> Force structured output -> Store results -> Show polished UI That pattern works for:- Skincare analysis
- Receipt parsing
- Product identification
- Packaging analysis
- Inspection workflows
- Any “upload image, get structured answer” product
Files to Customize
Turn this into your own vision app by editing:app/(apps)/vision/toolConfig.tsapp/(apps)/vision/prompt.tsapp/(apps)/vision/schema.tsapp/(apps)/vision/components/*

