ChefAI is an iOS app that analyzes fridge contents from a photo and recommends recipes. Take a photo of your fridge, and the app identifies food items using GPT-4o's vision API, then suggests 3-5 recipes with difficulty ratings, calorie counts, ingredient lists, and step-by-step cooking instructions.
- Frontend: React Native + Expo, TypeScript
- Navigation: Expo Router (file-based routing)
- Styling: NativeWind (Tailwind CSS for React Native)
- Async State: TanStack Query
- Validation: Zod
- Backend: Supabase (auth, storage, database)
- AI: OpenAI GPT-4o (vision + text)
- Camera: Expo ImagePicker
- Node.js (v18 or later)
- Expo CLI (
npm install -g expo-cli) - Expo Go app on your iOS device (for testing on a physical device)
- An OpenAI API key
- A Supabase project (for storage)
-
Clone the repository:
git clone https://github.com/GodSpeed0118/ChefAI.git cd ChefAI -
Install dependencies:
npm install
-
Configure environment variables:
Create a
.envfile in the project root:EXPO_PUBLIC_SUPABASE_URL=your-supabase-url EXPO_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key EXPO_PUBLIC_OPENAI_API_KEY=your-openai-api-key
# Start the Expo dev server
npx expo start
# Start with iOS simulator
npx expo start --ios
# Start in tunnel mode (for testing on a physical device over the network)
npx expo start --tunnelTo run on a physical device, scan the QR code shown in the terminal with the Expo Go app.
app/ # Expo Router pages (file-based routing)
_layout.tsx # Root layout with providers
index.tsx # Home screen (camera/gallery + analyze)
results.tsx # Recipe results screen
src/
components/ # Reusable UI components
hooks/ # TanStack Query hooks
lib/ # API clients (OpenAI, Supabase, React Query)
services/ # Business logic (AI calls, storage)
types/ # TypeScript types and Zod schemas
- Capture - Take a photo of your fridge or pick one from your gallery
- Analyze - The image is sent to GPT-4o's vision API, which identifies all visible food items
- Generate - The identified ingredients are sent back to GPT-4o, which generates 3-5 recipes
- Browse - View recipe cards with difficulty ratings, calorie counts, ingredient lists, and cooking steps