How phoebelh/culinai works
CulinAI is a Next.js recipe-generation site: a user uploads a food or fridge photo, the home page submits it for ingredient and recipe generation, then uses the returned recipe title and ingredients to request a generated food image and displays the result. The README describes LLaVa and Stable Diffusion; the sampled API code confirms separate Replicate prediction routes and model versions, but does not identify the first model by name. The map omits uninspected details beyond the documented workflow.
Main entry points: pages/index.js Upload and orchestration · predictions/index.js Ingredient prediction create · [id].js Ingredient prediction status · image_predictions/index.js Image prediction create
Components 8
Web experience
- Upload and orchestration
pages/index.js - Recipe display
pages/recipe.js
Recipe generation
- Ingredient prediction create
pages/api/predictions/index.js - Ingredient prediction status
pages/api/predictions/[id].js
Recipe visuals
- Image prediction create
pages/api/image_predictions/index.js - Image prediction status
pages/api/image_predictions/[id].js
Other components
- User
- Replicate API
Connections 19
- User → Upload and orchestration: uploads photo
- Upload and orchestration → Ingredient prediction create: submits image and prompt
- Ingredient prediction create → Replicate API: creates prediction
- Replicate API → Ingredient prediction create: returns prediction
- Ingredient prediction create → Upload and orchestration: returns prediction
- Upload and orchestration → Ingredient prediction status: polls prediction
- Ingredient prediction status → Replicate API: gets prediction
- Replicate API → Ingredient prediction status: returns status
- Ingredient prediction status → Upload and orchestration: returns status
- Upload and orchestration → Image prediction create: submits image prompt
- Image prediction create → Replicate API: creates prediction
- Replicate API → Image prediction create: returns prediction
- Image prediction create → Upload and orchestration: returns prediction
- Upload and orchestration → Image prediction status: polls prediction
- Image prediction status → Replicate API: gets prediction
- Replicate API → Image prediction status: returns status
- Image prediction status → Upload and orchestration: returns status
- Upload and orchestration → Recipe display: renders recipe and image
- Recipe display → User: displays result