CookGPT is a modern web application that generates custom recipes using OpenAI's GPT API. Enter a food description or ingredients, and let AI create complete recipes with titles, ingredient lists, and step-by-step cooking instructions.
- 🤖 AI Recipe Generation: Powered by OpenAI GPT-4o-mini
- 👤 User Authentication: Secure login with Firebase
- 📱 Responsive Design: Mobile-first approach with Tailwind CSS
- 💾 Recipe Storage: Save and manage your generated recipes
- 🎨 Modern UI: Dark theme with smooth animations
- 📋 Premade Recipes: Sample recipes to get you started
- Frontend: Next.js 16, React 19, TypeScript
- Styling: Tailwind CSS, Framer Motion
- Backend: Next.js API Routes, Firebase
- AI: OpenAI GPT-4o-mini
- Authentication: NextAuth.js
- Database: Firebase Firestore
- State Management: Zustand
- Node.js 18+
- npm, yarn, or pnpm
- OpenAI API key
- Firebase project
- Clone the repository:
git clone <repository-url>
cd cook-gpt- Install dependencies:
npm install
# or
yarn install
# or
pnpm install- Set up environment variables:
Create a
.env.localfile with:
CHATGPT_API_KEY=your_openai_api_key
MESSAGE_PROMPT=your_custom_prompt_prefix
# Firebase configuration variables
NEXTAUTH_SECRET=your_nextauth_secret
NEXTAUTH_URL=http://localhost:3000-
Configure Firebase: Update
firebase.tswith your Firebase project credentials. -
Run the development server:
npm run dev
# or
yarn dev
# or
pnpm devOpen http://localhost:3000 to view the application.
- Sign In: Create an account or log in with existing credentials
- Generate Recipes: Enter a food description (e.g., "Italian pasta with tomatoes and basil")
- View Results: AI generates a complete recipe with ingredients and instructions
- Save Recipes: Your generated recipes are automatically saved to your account
- Browse Premade: Explore sample recipes for inspiration
cook-gpt/
├── app/ # Next.js 13+ app directory
│ ├── layout.tsx # Root layout with authentication
│ ├── page.tsx # Home page
│ └── recipes/ # Recipe pages
├── components/ # React components
│ ├── Login.tsx # Authentication component
│ ├── RecipeInput.tsx # AI recipe generation form
│ ├── RecipeItem.tsx # Recipe display component
│ └── SideBar.tsx # Navigation sidebar
├── lib/ # Utilities and data
│ └── premadeRecipes.ts # Sample recipes data
├── pages/api/ # API routes
│ ├── auth/ # NextAuth configuration
│ └── generate-recipe.ts # OpenAI integration
├── stores/ # Zustand state management
├── firebase.ts # Firebase configuration
├── memory-bank/ # Development memory system
└── styles/ # Global styles
POST /api/generate-recipe
Generate a new recipe using AI.
Request Body:
{
"prompt": "Italian pasta with tomatoes and basil"
}Response:
{
"content": "Title: Classic Spaghetti Aglio e Olio\n\nIngredients:\n- 400g spaghetti\n- 6 cloves garlic...\n\nInstructions:\n1. Cook pasta in salted water...\n..."
}This project is private and proprietary.
For API rate limit issues or support: nikos@pountzas.gr