A modern, full-featured recipe management application built with React and Vite. Search recipes, manage your pantry, create shopping lists, and chat with an AI assistant powered by Google Gemini. Get real-time pricing from Kroger stores!
Hosted on Cloudflare Pages: https://recipe-wizard.pages.dev/
- οΏ½ Recipe Search - Find recipes by name or ingredients using Spoonacular API
- π€ AI Chat Assistant - Natural language conversation with Gemini AI to find recipes, add items to pantry/shopping list
- οΏ½ Pantry Management - Track ingredients you have at home
- π Smart Shopping List - Create shopping lists with real-time Kroger pricing and availability
- π° Price Estimation - See estimated cart totals from Kroger stores
- π User Authentication - Secure sign-in with Supabase
- πΎ Persistent Storage - All data saved to your account
- π± Responsive Design - Works on desktop and mobile
- Node.js (v14 or higher)
- npm or yarn
- Clone the repository
git clone https://github.com/cyberdataint/Recipe_Wizard.git
cd Recipe_Wizard- Install dependencies
npm install-
Set up environment variables
Create a
.envfile in the root directory:VITE_SUPABASE_URL=your_supabase_project_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key VITE_SPOONACULAR_API_KEY=your_spoonacular_api_key VITE_GEMINI_API_KEY=your_google_gemini_api_key VITE_KROGER_CLIENT_ID=your_kroger_client_id VITE_KROGER_CLIENT_SECRET=your_kroger_client_secret
-
Start the development server
npm run dev- Open your browser to
http://localhost:5173(or the port shown in your terminal)
| Command | Description |
|---|---|
npm install |
Install all dependencies |
npm run dev |
Start Vite development server (port 5173) |
| npm run build | Build for production |
| npm run preview | Preview production build |
For full functionality, you need TWO terminals:
Terminal 1 - Frontend:
npm run dev- Search by recipe name: "chocolate cake"
- Search by ingredients: "chicken, rice, broccoli"
- Click any recipe to see full details and ingredients
- Add ingredients you have at home
- Track quantities and expiration dates
- Organized by category
- Add items you need to buy
- Click "Get Prices" to fetch real-time Kroger pricing
- See estimated cart total
- Check off items as you shop
- Ask the AI assistant for recipe suggestions
- Natural language requests: "Add milk and eggs to my shopping list"
- Get cooking tips and ingredient substitutions
- Chat history is saved to your account
- Spoonacular API - Recipe search and nutritional data
- Google Gemini AI - Conversational AI chatbot with function calling
- Kroger API - Real-time product pricing and availability
- Supabase - Authentication and PostgreSQL database
- React 19.1.1 - UI framework
- Vite 7.1.2 - Build tool and dev server
- Supabase - Backend (PostgreSQL + Auth)
- Google Gemini AI - LLM with function calling
- Express - Proxy server for Kroger API
- Spoonacular API - Recipe database
- Kroger API - Product pricing
Recipe_Wizard/
βββ src/
β βββ App.jsx # Main orchestrator - handles tab switching
β βββ main.jsx # React entry point
β βββ Supabase.jsx # Supabase client configuration
β βββ KrogerAPI.jsx # Kroger API service with OAuth
β βββ FavoritesAPI.jsx # Supabase helpers for favorites (recipes/ingredients)
β βββ components/
β β βββ Recipes.jsx # Recipe search (Spoonacular)
β β βββ Pantry.jsx # Pantry management (Supabase)
β β βββ ShoppingList.jsx # Shopping list with pricing (Supabase + Kroger)
β β βββ Chat.jsx # Gemini AI chatbot with function calling
β β βββ Auth.jsx # Sign in/up UI
β β βββ TopNav.jsx # Tab navigation bar
β βββ contexts/
β βββ AuthContext.jsx # Supabase authentication provider
βββ kroger-proxy-server.js # Express server for Kroger API (avoids CORS)
βββ supabase_chat_table.sql # Database schema for chat messages
βββ test-kroger-auth.js # Test script for Kroger credentials
βββ .env # Environment variables (create this)
βββ package.json # Dependencies and scripts
This app supports favoriting recipes and ingredients per user using Supabase. Add a star next to a recipe or shopping-list ingredient to save it.
The Store Picker now supports a "Use my location" button. When clicked, your browser (Edge, Chrome, or Firefox) asks for permission to access your location. If granted, it finds nearby Kroger stores using latitude/longitude and fills the ZIP automatically from the nearest store. You can still search by ZIP manually.
Troubleshooting:
- If your browser blocks location, allow it in site permissions.
- On desktop, geolocation may use IP-based estimates; results can be broader than on mobile.