Where Culinary Magic Meets Modern Technology
A modern, AI-powered recipe management platform that transforms your ingredients into culinary masterpieces
🚀 Quick Start • ✨ Features • 🛠️ Tech Stack • 📱 Demo • 🤝 Contributing
🔍 AI-Powered Recipe Generation - Transform your available ingredients into delicious recipes using advanced AI
👤 Smart User Profiles - Personalized cooking experience with user preferences and dietary restrictions
📚 Recipe History - Keep track of your culinary adventures with comprehensive recipe history
🔐 Secure Authentication - Multi-authentication system with Google OAuth and JWT tokens
📧 Email Verification - Secure account verification and password recovery system
📱 Responsive Design - Beautiful, mobile-first interface that works on all devices
🎨 Modern UI/UX - Clean, intuitive design built with Tailwind CSS
⚡ Real-time Updates - Instant recipe generation and seamless user experience
- Django REST Framework - Robust API development
- PostgreSQL - Reliable data persistence
- JWT Authentication - Secure token-based auth
- Google AI (Gemini) - Advanced recipe generation
- Docker - Containerized deployment
- React 19 - Modern component-based UI
- Vite - Lightning-fast development
- Tailwind CSS - Utility-first styling
- Axios - Seamless API communication
- React Router - Dynamic navigation
Beautiful landing page introducing users to the magic of AI-powered cooking
- Register/Login - Secure user authentication
- Google OAuth - One-click social login
- Email Verification - Secure account activation
- Password Recovery - Easy password reset process
Input your available ingredients and let our AI chef create personalized recipes just for you!
- Profile Management - Update personal information
- Recipe History - Browse your culinary journey
- Usage Statistics - Track your monthly recipe generation
Get cooking in less than 2 minutes! 🚀
- 🐳 Docker & Docker Compose - Install Docker
- 📦 Git - Install Git
1. Clone & Navigate
git clone https://github.com/Kbassem10/ImhotepChef.git
cd ImhotepChef2. Set Up Environment Variables 🔑
Create a .env file in the backend/ImhotepChef directory with your Gemini API keys:
# Navigate to backend directory
cd backend/ImhotepChef
# Create .env file with required Gemini API keys
cat > .env << 'EOF'
# Gemini API Keys (Required - Get from https://aistudio.google.com/app/apikey)
GEMINI_API_KEY_1=your_first_gemini_api_key_here
GEMINI_API_KEY_2=your_second_gemini_api_key_here
EOF
# Also set up frontend environment variables
cd ../../frontend/ImhotepChef
cp ../env.example .env
# Edit .env if needed - default VITE_API_URL=http://localhost:8000 should work
# Return to project root
cd ../..🚨 Important: You must have at least 1 Gemini API key and up to 2 API keys for the AI recipe generation to work. Get your free API keys from Google AI Studio.
📝 Note: The frontend
.envfile should containVITE_API_URL=http://localhost:8000to match the Docker backend port.
3. Launch the Magic ✨
docker compose up --buildThat's it! 🎉 Your culinary assistant is ready!
✅ Database Setup - PostgreSQL container (port 5430)
✅ Backend Magic - Django REST API (http://localhost:8000)
✅ Frontend Beauty - React application (http://localhost:3000)
✅ Admin Panel - Django admin with demo credentials
✅ Auto-Migration - Database schema setup
✅ Hot Reload - Live code changes
| Service | URL | Description |
|---|---|---|
| 🎨 Frontend | http://localhost:3000 | Main application interface |
| ⚡ Backend API | http://localhost:8000 | REST API endpoints |
| 🔧 Django Admin | http://localhost:8000/admin/ | Admin panel (admin/admin123) |
| 🗄️ Database | localhost:5430 | PostgreSQL instance |
Prefer hands-on control? Follow these detailed steps!
- 🐍 Python 3.11+ - Download Python
- 📦 Node.js 20+ - Download Node.js
- 🗄️ PostgreSQL 15+ - Install PostgreSQL
- 📦 Git - Install Git
git clone https://github.com/Kbassem10/ImhotepChef.git
cd ImhotepChef# 🚀 Start PostgreSQL service
sudo systemctl start postgresql # Linux
# or
brew services start postgresql # macOS
# 🗄️ Create database and user
sudo -u postgres psql
CREATE DATABASE imhotepchef_db;
CREATE USER imhotepchef_user WITH PASSWORD 'imhotepchef_password';
GRANT ALL PRIVILEGES ON DATABASE imhotepchef_db TO imhotepchef_user;
\q# 📂 Navigate to backend directory
cd backend/ImhotepChef
# 🐍 Create virtual environment
python -m venv venv
# ⚡ Activate virtual environment
source venv/bin/activate # Linux/macOS
# or
venv\Scripts\activate # Windows
# 📦 Install dependencies
pip install -r requirements.txt
# 🔄 Create environment variables (create .env file)
echo "DEBUG=True
DATABASE_NAME=imhotepchef_db
DATABASE_USER=imhotepchef_user
DATABASE_PASSWORD=imhotepchef_password
DATABASE_HOST=localhost
DATABASE_PORT=5432
SECRET_KEY=your-secret-key-here" > .env
# 🗄️ Run migrations
python manage.py makemigrations
python manage.py migrate
# 👤 Create superuser
python manage.py createsuperuser
# 🚀 Start development server
python manage.py runserver# 🆕 Open new terminal and navigate to frontend directory
cd frontend/ImhotepChef
# 📦 Install dependencies
npm install
# 🌐 Create environment variables (create .env file)
# IMPORTANT: Make sure this port matches your Django backend port (8000)
echo "VITE_API_URL=http://localhost:8000" > .env
# Alternative: Copy from example and edit
# cp ../env.example .env
# 🚀 Start development server
npm run dev🚨 Important: The
VITE_API_URLmust point to your Django backend server. Default ishttp://localhost:8000. Make sure your Django server is running on port 8000 withpython manage.py runserver.
| Service | URL | Status |
|---|---|---|
| 🎨 Frontend | http://localhost:3000 | ✅ Ready |
| ⚡ Backend API | http://localhost:8000 | ✅ Ready |
| 🔧 Django Admin | http://localhost:8000/admin | ✅ Ready |
🚀 Starting the application:
# Terminal 1 - Backend
cd backend/ImhotepChef
source venv/bin/activate
python manage.py runserver # This runs on port 8000
# Terminal 2 - Frontend
cd frontend/ImhotepChef
# Make sure .env file exists with VITE_API_URL=http://localhost:8000
npm run dev⏹️ Stopping the application:
- Press
Ctrl+Cin both terminals - Deactivate virtual environment:
deactivate
🔧 Environment File Setup:
# Frontend environment setup (if not done during initial setup)
cd frontend/ImhotepChef
cp ../env.example .env
# Edit .env to ensure VITE_API_URL=http://localhost:8000🔧 Development Mode Features:
- 🔄 Hot reloading for both frontend and backend
- 📁 Volume mounting for live code changes
- 🐛 Debug mode enabled
- 🎨 Live CSS updates with Tailwind
- ⚡ Fast refresh in React
🛑 Stop the application:
docker compose down📜 View logs:
docker compose logs -f🔄 Rebuild after dependency changes:
docker compose up --buildIssue: "address already in use" errors
💡 Solution:
# Check what's using the ports
sudo lsof -i :3000 # Frontend port
sudo lsof -i :8000 # Backend port
sudo lsof -i :5430 # Database port
# Stop conflicting services
sudo systemctl stop postgresql # Linux
brew services stop postgresql # macOS| Problem | Solution |
|---|---|
| 🗄️ Database connection failed | Verify PostgreSQL is running & credentials are correct |
| 🐍 Python import errors | Ensure virtual environment is activated |
| 📦 Node.js version issues | Update to Node.js 20+ |
| 🔐 Permission denied | Check file permissions and user access |
| Problem | Solution |
|---|---|
| 🚀 Container build fails | Run docker system prune -a and retry |
| 🗄️ Database connection timeout | Wait for health check to complete |
| 📱 Frontend not loading | Check if port 3000 is available |
| ⚡ Hot reload not working | Restart container with docker compose restart |
| 🔧 API calls failing | Verify frontend .env has VITE_API_URL=http://localhost:8000 |
| 🔑 Environment variables not working | Ensure both backend and frontend .env files are created |
| 🌐 Backend port issues | Confirm Django is running on port 8000 (check docker-compose.yml) |
For Docker Setup:
- Backend runs on:
http://localhost:8000 - Frontend runs on:
http://localhost:3000 - Frontend
.envshould have:VITE_API_URL=http://localhost:8000
For Manual Setup:
- Copy
frontend/.env.exampletofrontend/ImhotepChef/.env - Ensure Django runs with:
python manage.py runserver(port 8000) - Verify frontend
.envpoints to correct backend port
We welcome contributions from developers of all skill levels!
- 🍴 Fork the repository
- 🌟 Create a feature branch (
git checkout -b feature/amazing-feature) - 📝 Commit your changes (
git commit -m 'Add amazing feature') - 📤 Push to the branch (
git push origin feature/amazing-feature) - 🔄 Open a Pull Request
Open an issue with:
- 📝 Clear description
- 🔄 Steps to reproduce
- 💻 System information
- 📸 Screenshots (if applicable)
We'd love to hear it! Open an issue with the enhancement label.
This project is licensed under the MIT License - see the LICENSE file for details.
If you find ImhotepChef helpful, please consider:
- ⭐ Starring this repository
- 🍴 Forking to contribute
- 🐛 Reporting issues
- 💡 Suggesting new features