A Next.js application that generates cooking recipes from food images using Groq's vision models. The application uses a secure server-side API to protect your Groq API key.
- Drag and drop image upload
- AI-powered recipe generation using server-side API
- Secure handling of API credentials
- Responsive design for desktop and mobile
- Node.js 18+ installed
- A Groq API key (get one from Groq Console)
- Clone the repository
git clone <repository-url>
cd recipe-this
- Install dependencies
npm install
- Set up environment variables
Create or edit the .env.local
file in the root directory:
GROQ_API_KEY=your_groq_api_key_here
- Start the development server
npm run dev
- Open http://localhost:3000 in your browser
- Drag and drop a food image or click to select a file
- Click "Generate Recipe" to process the image
- View the generated recipe with ingredients, instructions and cooking time
- User uploads an image via the browser
- The image is converted to base64 format
- The app makes a request to a secure server-side API route
- The server uses the Groq API key to communicate with Groq's vision model
- The generated recipe is returned to the client
- Next.js (with App Router)
- React
- Groq API (with vision model support)
- Next.js API Routes for server-side processing
- TailwindCSS
- React Dropzone
MIT
This project was bootstrapped with Create Next App.