whxx

Go back

SnapCal

Calories and macros from a photo of your meal.

SnapCal homepage
NextJSTypeScriptPrismaTailwindCSSPostgreSQLZodshadcn-uiVercel AI SDKOpenAI API

Take a photo of your meal and get its calories. A small app I built to try structured output from a vision model.

The photo is compressed with sharp, uploaded through UploadThing and sent to GPT-4o mini through the Vercel AI SDK with a Zod schema – so the answer comes back as typed JSON: meal name, calories, carbs, protein, fat and ingredients. It is saved to Postgres and shows up in your meal history.

Features

  • Calories and macros (carbs, protein, fat) from a single photo
  • Meal history with a page per meal
  • Delete a meal
  • Installable as a PWA
  • Auth with better-auth, Prisma on Postgres

Screenshots

Dashboard with recent meals
Dashboard with recent meals

© 2026 whxx. All rights reserved.