How tabarakmukhtar/recipe-snap works
Project type and purpose
• Recipe Snap is a modern full-stack web application built on Next.js (App Router) with AI-powered photo-to-recipe capabilities.
• The purpose is to let users snap or upload a photo of ingredients, have an AI identify them, allow edits, then generate complete recipes which can be saved in browser local storage.
File structure
• Top level:
• next.config.ts, tsconfig.json, tailwind.config.ts – Next.js, TypeScript, and Tailwind config
• netlify.toml, apphosting.yaml – Deployment configs (Netlify, Google App Hosting)
• src/app – Next.js App Router pages (layout.tsx, page.tsx)
• src/components – React UI components (ShadCN-based under ui/, recipe-specific under recipe/)
• src/ai – AI orchestration code: dev.ts (local Genkit server startup), genkit.ts (Genkit client), flows/ (analyze-photo.ts, generate-recipe.ts)
• src/hooks, src/lib – utility hooks and helper functions
• No traditional database; state/persistence is browser localStorage for recipe history. AI backend is Genkit (locally in dev, cloud-hosted in prod) which in turn calls Gemini API.
README for additional insights
• Tech stack: Next.js, React, Tailwind, ShadCN UI, Genkit (generative AI), TypeScript
• Runtime: single command npm run genkit:dev launches both Next.js and Genkit in dev
• External dependencies: Gemini API key for AI tasks
• Deployment: Netlify with environment variable for GEMINI_API_KEY
Essential details to capture
• Frontend entrypoint and client components
• Next.js App Router and API surface
• Genkit flow modules and their roles (analyze-photo, generate-recipe)
• External Gemini dependency
• Browser localStorage for history
• Deployment config (Netlify) if relevant for hosting context