Skip to content
Lesley.
Contact

Harare

Seven sections, one lap
GitHubEmailCV
All work

The Chef's Muse

Point your phone at what's in the fridge and get a recipe that only uses the ingredients and tools you have.

Year
2026
Role
Developer
Stack
TypeScript, AI, Web Scraping, PWA deployment
Links
Live siteSource
The Chef's Muse

Problem

A recipe is written for a supermarket run, not for a kitchen. The standard instruction assumes you have an oven, a stand mixer, a lemon and precisely twelve grams of something, so the moment you open the fridge the recipe is already wrong.

That is the normal case. Most people cook from a partial shop and a fixed set of equipment, and the useful question is not "what should I cook" but "what can I cook with what I have, using the two things my kitchen actually contains".

Process

The recipe data was collected by scraping rather than written by hand, because hand-writing a usable corpus takes longer than the rest of the project combined, and the interesting problem was not the corpus.

The interesting problem is the constraint. A generated recipe is worthless if it sends you to the shop, so every step has to be checked against what the user actually has available before it is returned. If the answer cannot be made to work with that pantry and that equipment, the constraint has to hold and the dish gets changed, not the ingredient list.

Input is the rear camera, live. The device camera is opened through getUserMedia and frames are sent straight to a vision model, so the pantry gets read rather than typed. Typed input is the fallback for when someone is holding three ingredients and cannot get the phone out.

Output covers the three ways someone actually reads a recipe. The dish gets a generated photograph, prompted as professional food photography from the dish name and its first ingredient. The steps get read aloud through Gemini's speech model, because half the time you are holding a pan you cannot put down. The written steps stay the source of truth, since audio is not something you skim.

Gemini does the reading and the writing. gemini-flash-latest takes the camera frames and returns a recipe as structured JSON against a fixed schema, so the front end parses one known shape instead of scraping prose out of a paragraph.

TypeScript throughout, deployed to GitHub Pages.

Result

Live on GitHub Pages with the source public. Camera to pantry to constrained recipe in one flow, with a spoken read-through at the end.