Skip to content

🍳 AI-powered recipe management platform that transforms your ingredients into culinary masterpieces. Built with Django REST API, React, and Google AI integration for personalized cooking experiences.

Notifications You must be signed in to change notification settings

Imhotep-Tech/ImhotepChef

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

66 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🍳 ImhotepChef

Where Culinary Magic Meets Modern Technology

Django React PostgreSQL Docker

A modern, AI-powered recipe management platform that transforms your ingredients into culinary masterpieces

πŸš€ Quick Start β€’ ✨ Features β€’ πŸ› οΈ Tech Stack β€’ πŸ“± Demo β€’ 🀝 Contributing


✨ Features

πŸ” 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

πŸ› οΈ Tech Stack

Backend

  • 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

Frontend

  • React 19 - Modern component-based UI
  • Vite - Lightning-fast development
  • Tailwind CSS - Utility-first styling
  • Axios - Seamless API communication
  • React Router - Dynamic navigation

πŸ“± Demo

🏠 Homepage

Beautiful landing page introducing users to the magic of AI-powered cooking

πŸ” Authentication System

  • Register/Login - Secure user authentication
  • Google OAuth - One-click social login
  • Email Verification - Secure account activation
  • Password Recovery - Easy password reset process

🍽️ Recipe Generation

Input your available ingredients and let our AI chef create personalized recipes just for you!

πŸ‘€ User Dashboard

  • Profile Management - Update personal information
  • Recipe History - Browse your culinary journey
  • Usage Statistics - Track your monthly recipe generation

πŸš€ Quick Start for Contributors

Get cooking in less than 2 minutes! πŸš€

πŸ”§ Prerequisites

⚑ Setup (One Command!)

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 contain VITE_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!

🎯 What This Does

βœ… 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

🌐 Access Points

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

πŸ”§ Manual Setup (Alternative)

Prefer hands-on control? Follow these detailed steps!

πŸ“‹ Prerequisites for Manual Setup

πŸ“ Step-by-Step Manual Setup

1️⃣ Clone the Repository

git clone https://github.com/Kbassem10/ImhotepChef.git
cd ImhotepChef

2️⃣ Set Up PostgreSQL Database

# πŸš€ 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

3️⃣ Set Up Backend (Django)

# πŸ“‚ 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

4️⃣ Set Up Frontend (React)

# πŸ†• 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 is http://localhost:8000. Make sure your Django server is running on port 8000 with python manage.py runserver.

5️⃣ Access the Application

Service URL Status
🎨 Frontend http://localhost:3000 βœ… Ready
⚑ Backend API http://localhost:8000 βœ… Ready
πŸ”§ Django Admin http://localhost:8000/admin βœ… Ready

πŸ’» Manual Development Workflow

πŸš€ 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

πŸ”§ 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

🚨 Troubleshooting

πŸ”Œ Port Conflicts

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

πŸ› οΈ Manual Setup Issues

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

🐳 Docker Setup Issues

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)

πŸ“ Environment Configuration Notes

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 to frontend/ImhotepChef/.env
  • Ensure Django runs with: python manage.py runserver (port 8000)
  • Verify frontend .env points to correct backend port

🀝 Contributing

We welcome contributions from developers of all skill levels!

🎯 How to Contribute

  1. 🍴 Fork the repository
  2. 🌟 Create a feature branch (git checkout -b feature/amazing-feature)
  3. πŸ“ Commit your changes (git commit -m 'Add amazing feature')
  4. πŸ“€ Push to the branch (git push origin feature/amazing-feature)
  5. πŸ”„ Open a Pull Request

πŸ› Found a Bug?

Open an issue with:

  • πŸ“ Clear description
  • πŸ”„ Steps to reproduce
  • πŸ’» System information
  • πŸ“Έ Screenshots (if applicable)

πŸ’‘ Have an Idea?

We'd love to hear it! Open an issue with the enhancement label.


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


🌟 Show Your Support

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! πŸ‘¨β€πŸ³βœ¨

⬆ Back to Top

About

🍳 AI-powered recipe management platform that transforms your ingredients into culinary masterpieces. Built with Django REST API, React, and Google AI integration for personalized cooking experiences.

Topics

Resources

Stars

Watchers

Forks