Skip to content

timotius-devin/pantry-chef

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pantry Chef 🍳

Turn what's in your pantry into delicious recipes — powered by Claude (Anthropic).

Disclaimer: Recipes generated by this application are AI-generated and may contain errors, unusual ingredient combinations, or unsafe cooking instructions. Always use your best judgment, verify measurements, and follow food safety guidelines when cooking. The authors are not responsible for any culinary disasters.


What is this?

Pantry Chef is a simple AI-powered recipe generator. You tell it what ingredients you have sitting in your fridge or pantry, and it gives you back realistic, complete recipe ideas — including measurements, step-by-step instructions, cook time, and difficulty level.

Example: type in chicken, garlic, pasta, cream and it might return a creamy garlic chicken pasta with a full ingredient list and cooking steps.


Tech stack

Layer Technology
Frontend React 18 + Vite
Backend Python 3.12 + FastAPI
AI Claude (Anthropic) via anthropic SDK
Validation Pydantic v2
Env management Conda (backend), npm (frontend)

Getting started

Prerequisites

1. Clone the repo

git clone https://github.com/timotius-devin/pantry-chef.git
cd pantry-chef

2. Set your API key

cp .env.example .env

Then edit .env and paste your Anthropic API key:

ANTHROPIC_API_KEY=sk-ant-your-actual-key-here

The .env file is in .gitignore — it will never be committed to GitHub.

3. Start the backend

./run-be.sh

This script will:

  • Create a conda environment named pantry-chef (Python 3.12) if it doesn't exist
  • Install all Python dependencies (fastapi, anthropic, uvicorn, etc.)
  • Start the FastAPI server on http://localhost:8001

4. Start the frontend (in a separate terminal)

./run-fe.sh

This script will:

5. Open the app

Go to http://localhost:5174, type some ingredients, and generate recipes!


Project structure

pantry-chef/
├── .env.example           # Template for your API key
├── .gitignore
├── run-be.sh              # Start script — backend
├── run-fe.sh              # Start script — frontend
├── README.md
├── backend/
│   ├── main.py            # FastAPI app + Claude proxy
│   └── requirements.txt   # Python dependencies
└── frontend/
    ├── index.html
    ├── package.json
    ├── vite.config.js      # Proxies /api → localhost:8001
    └── src/
        ├── main.jsx        # React entry point
        ├── App.jsx         # Main app component
        └── App.css         # Styles

Contributing

Contributions are welcome! Here's how:

  1. Fork the repository
  2. Create a branch for your feature or fix:
    git checkout -b feature/my-feature
  3. Make your changes — keep them focused and well-tested
  4. Run both servers and verify everything still works
  5. Commit with a clear, descriptive message:
    git commit -m "Add dark mode toggle to recipe cards"
  6. Push your branch:
    git push origin feature/my-feature
  7. Open a pull request — describe what you changed and why

What's next?

  • Dark mode / theme switcher
  • Save favorite recipes to localStorage
  • Dietary restriction filters (vegan, gluten-free, etc.)
  • "Surprise me" random ingredient picker
  • Print-friendly recipe layout
  • Share recipe via link
  • Docker setup for easier deployment

Style guide

  • Backend: follow the existing FastAPI patterns and Pydantic validation style
  • Frontend: use the same CSS variable system and component structure
  • Keep error handling exhaustive — every failure path should have a user-friendly message

License

MIT

About

AI-powered recipe generator — turn your pantry ingredients into complete recipes with Claude. Built with FastAPI + React + Vite.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors