Product Ingredient Analyzer
An app that takes a photo of an ingredient label and explains what each ingredient is and what it is for. One Cloudflare Worker serves the page, takes the upload, and calls Gemini. No accounts, nothing stored.
Problem
A vision model will explain a label it misread just as confidently as one it read right. With no reference source to check against, the app cannot tell the two apart, which limits what it should claim about anything health-related.
Approach
- The app is one Worker in plain JavaScript. GET serves the page, POST takes the upload and calls the vision model. No framework, build step or origin server.
- Browser and Worker both reject non-JPEG, PNG or WebP files and anything over 5 MB before the model sees them. Upstream failures and empty replies surface as readable errors.
Results
- One photo in, a readable summary out, with no account or install.
Limits
- One vision model, no ingredient database behind it, and free-text output with no schema. The app cannot check whether an answer is right.
Context
- page, upload, and model call
- One Worker
Architecture
- Drag-and-drop upload
- Type and size guard
- Gemini vision call
- Plain-language summary