Inventory-Aware Meal Planner + Auto-Shopper
MealFlow is an intelligent meal planning application that connects your recipes, inventory, and shopping needs into one seamless workflow. Plan your weekly meals, track what you have, and automatically generate optimized shopping lists with real pricing.
- Store and organize your favorite recipes
- Automatic ingredient extraction and parsing
- 3 pre-loaded sample recipes for instant testing
- Support for custom servings and instructions
- Real-time inventory management
- Track quantities and units
- Automatic deficit calculation
- Expiry date tracking (optional)
- Create weekly meal plans based on recipe frequencies
- Intelligent scheduling across the week
- Visual meal calendar
- Automatic ingredient aggregation
- Automatically calculates what you need to buy
- Smart package size optimization to minimize waste
- Real-time pricing from marketplace APIs
- De-duplication of duplicate items
- Cost estimation before purchase
- All data encrypted locally using Fernet encryption
- No data leaves your machine (except sandbox API calls)
- Secure key storage with proper file permissions
- Privacy-first design philosophy
- Beautiful gradient design with glass-morphism effects
- Responsive layout for all devices
- Smooth animations and transitions
- Professional Inter font typography
- Intuitive navigation
- Python 3.11 or higher
- pip package manager
- Clone the repository
git clone <your-repo-url>
cd mealflow- Install dependencies
pip install -r requirements.txt- Run the application
python3 src/app.py- Open your browser
http://127.0.0.1:5000
That's it! The app comes with 3 sample recipes pre-loaded for testing.
Navigate to Recipes to see the pre-loaded recipes:
- ๐ Spaghetti Carbonara
- ๐ Chicken Stir Fry
- ๐ฅ Greek Salad
Or add your own custom recipes!
Go to Inventory and add items you currently have:
Item: eggs
Quantity: 6
Unit: unit
Visit Meal Planner and select how many times per week you want each recipe:
Spaghetti Carbonara: 2 times/week
Chicken Stir Fry: 1 time/week
Greek Salad: 2 times/week
Click Generate Meal Plan to see:
- Your weekly meal schedule
- Shopping needs (what you're missing)
Click Generate Shopping Cart to:
- See optimized product selections
- View real pricing for each item
- Get total cost estimate
- Place sandbox order (no real purchase)
mealflow/
โโโ src/
โ โโโ app.py # Flask web application
โ โโโ main.py # CLI entry point (demo mode)
โ โโโ core/
โ โ โโโ recipe.py # Recipe management & parsing
โ โ โโโ inventory.py # Inventory tracking
โ โ โโโ planner.py # Meal planning logic
โ โ โโโ cart.py # Shopping cart generation
โ โโโ integrations/
โ โ โโโ marketplace.py # Amazon/Walmart sandbox API
โ โโโ storage/
โ โ โโโ db.py # Encrypted local storage
โ โโโ templates/ # HTML templates
โ โ โโโ index.html
โ โ โโโ recipes.html
โ โ โโโ inventory.html
โ โ โโโ planner.html
โ โ โโโ cart.html
โ โโโ static/
โ โโโ style.css # Modern UI styles
โโโ data/ # Encrypted data storage
โ โโโ .key # Encryption key (auto-generated)
โ โโโ recipes.enc # Encrypted recipes
โ โโโ inventory.enc # Encrypted inventory
โโโ requirements.txt # Python dependencies
โโโ README.md # This file
- Backend: Flask 3.0+ (Python web framework)
- Storage: Cryptography (Fernet encryption)
- Frontend: Vanilla JavaScript, HTML5, CSS3
- Styling: Custom CSS with modern design patterns
- APIs: Requests library for marketplace integration
All sensitive data (recipes, inventory) is encrypted using Fernet symmetric encryption:
- 128-bit AES encryption in CBC mode
- HMAC for authentication
- Automatic key generation and secure storage
- No cloud storage - everything stays on your machine
- Marketplace API calls use sandbox mode by default
- User approval required before any order placement
- Encryption key stored with restricted permissions (chmod 600)
- Plan weekly meals efficiently
- Never forget ingredients at the store
- Minimize food waste with smart planning
- Track what you have vs. what you need
- Batch plan multiple meals
- Optimize grocery shopping trips
- Calculate exact quantities needed
- Manage inventory across prep sessions
- See total costs before shopping
- Optimize package sizes to reduce waste
- Compare prices across products
- Plan meals within budget
python3 src/main.py demoThis runs a complete workflow demonstration showing:
- Recipe addition
- Inventory checking
- Meal plan creation
- Shopping cart generation
- Order placement
The Flask app runs in debug mode by default:
- Auto-reload on file changes
- Detailed error messages
- Interactive debugger
- Real Amazon/Walmart API integration
- Nutritional information tracking
- Recipe import from URLs
- Mobile app version
- Multi-user support
- Recipe recommendations based on inventory
- Price history tracking
- Meal prep scheduling
- Dietary restriction filters
- Recipe rating system
GET /recipes- View all recipesPOST /api/recipes- Add new recipeGET /api/recipes- Get recipes as JSON
GET /inventory- View inventoryPOST /api/inventory- Add inventory itemGET /api/inventory- Get inventory as JSON
GET /planner- Meal planner pagePOST /api/plan- Create meal plan
GET /cart- Shopping cart pagePOST /api/cart/generate- Generate cart from deficitPOST /api/order- Place order (sandbox)
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Flask framework for the excellent web framework
- Cryptography library for secure encryption
- Inter font family for beautiful typography
- The open-source community for inspiration
For questions, issues, or suggestions:
- Open an issue on GitHub
- Check existing documentation
- Review the code comments
- Install Python 3.11+
- Install dependencies (
pip install -r requirements.txt) - Run the app (
python3 src/app.py) - Open browser to
http://127.0.0.1:5000 - Explore the 3 pre-loaded sample recipes
- Add some inventory items
- Create your first meal plan
- Generate a shopping cart
- Place a sandbox order
Happy meal planning! ๐ฝ๏ธโจ