Built from ground up in 24 hours for HackCU11.
Created by Brandon Reeves, Benjamin Getches, Harrison Getches, and Rayaan Lodhi.
Visit pantrypal.up.railway.app to access the live application without any installation:
- Create a new account or log in with the demo credentials
- Explore your virtual pantry
- Try scanning products or adding them manually
- Generate recipe suggestions based on your pantry items
For local development, follow the installation instructions below.
AI Pantry Assistant is a smart kitchen management system that helps you track your pantry inventory, monitor expiration dates, and generate recipe suggestions based on what you have on hand. The application uses barcode scanning, AI-powered recipe generation, and expiration date tracking to reduce food waste and simplify meal planning.
- Scan product barcodes (UPC) to automatically add items to your pantry
- Lookup product information from online databases
- Manually add products with custom details
- Track quantity and expiration dates
- Visual calendar interface showing when items will expire
- Color-coded expiration warnings (expired, expiring soon, expiring this week)
- Reduce food waste by staying aware of expiration dates
- Get recipe suggestions based on your current pantry inventory
- Prioritizes recipes using ingredients that will expire soon
- "Cook" recipes to automatically update your pantry inventory
- Secure signup and login system
- JWT-based authentication
- Personal pantry management
- React 19
- Redux for state management
- React Router for navigation
- Material UI components
- FullCalendar for expiration date visualization
- Framer Motion for animations
- Flask (Python)
- PostgreSQL database
- OpenAI API for recipe generation
- Go-UPC API for product lookups
- JWT for authentication
- bcrypt for password hashing
- Node.js (v18+)
- Python (v3.9+)
- PostgreSQL
-
Navigate to the backend directory:
cd backend
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Create a
.env
file with the following variables:OPENAI_API_KEY=your_openai_api_key GOUPC_API_KEY=your_goupc_api_key JWT_SECRET=your_jwt_secret DB_HOST=localhost DB_NAME=pantry_db DB_USER=postgres DB_PASSWORD=your_db_password
-
Set up the database:
psql -U postgres -f create.sql
-
Start the backend server:
python app.py
-
Navigate to the frontend directory:
cd frontend
-
Install dependencies:
npm install
-
Start the development server:
npm start
- Create an account or log in
- Add products to your pantry by scanning barcodes or manual entry
- View your pantry inventory and expiration dates on the calendar
- Generate recipe suggestions based on your pantry items
- "Cook" recipes to automatically update your inventory
POST /api/signup
- Create a new user accountPOST /api/login
- Log in to an existing account
GET /api/lookup-upc
- Look up product information by UPCPOST /api/products
- Add a new product to the databaseGET /api/products/<product_upc>
- Get product details by UPC
POST /api/pantry
- Add a product to user's pantryGET /api/pantry
- Get user's pantry inventoryPUT /api/pantry/<pantry_id>
- Update a pantry itemDELETE /api/pantry/<pantry_id>
- Remove an item from pantry
POST /api/get-recipes
- Generate recipe suggestionsPOST /api/cook-recipe
- Update pantry after cooking a recipe
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for recipe generation capabilities
- Go-UPC for product database access
- All contributors who have helped build this project