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 ImhotepChef
2. 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
.env
file should containVITE_API_URL=http://localhost:8000
to match the Docker backend port.
3. Launch the Magic β¨
docker compose up --build
That'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_URL
must 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+C
in 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 --build
Issue: "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
.env
should have:VITE_API_URL=http://localhost:8000
For Manual Setup:
- Copy
frontend/.env.example
tofrontend/ImhotepChef/.env
- Ensure Django runs with:
python manage.py runserver
(port 8000) - Verify frontend
.env
points 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
Made with β€οΈ by the ImhotepChef Team
Happy Coding & Happy Cooking! π¨βπ³β¨