Skip to content

PrShivashish/PantryIQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🍳 PantryIQ | The Intelligent Culinary Engine

PantryIQ Banner

Transforming leftover ingredients into culinary masterpieces through a synergistic algorithmic pipeline.

Features · Algorithms · Tech Stack · Local Setup · Deployment

Next.js FastAPI Graph Theory License: MIT


🚀 The Vision: Computational Gastronomy

PantryIQ is not just another recipe finder. It's an intelligent culinary assistant engineered to solve the "what can I make?" problem with computational precision. By leveraging a sophisticated blend of graph theory, backtracking, and greedy algorithms, PantryIQ models the complex relationships between ingredients to deliver optimal, context-aware recipe suggestions from what you already have in your kitchen.

Our vision is to minimize food waste and maximize culinary creativity, transforming the home cooking experience from a daily chore into a delightful exploration of flavors.

✨ Key Features

  • Intelligent Recipe Suggestions: Dynamically generates recipes based on available ingredients, dietary needs, and cuisine preferences.
  • Ingredient Gap Analysis: Identifies missing ingredients for a target recipe and provides the best available substitutions from your pantry.
  • Graph-Powered Substitutions: Utilizes a complex ingredient relationship graph to find smart, context-aware ingredient alternatives.
  • Optimal Meal Planning: Employs backtracking to find the best combination of recipes, maximizing ingredient usage and minimizing waste.
  • Real-time Algorithm Metrics: A unique /api/algorithms/demo endpoint showcases the performance and complexity of the underlying algorithms for academic and demonstration purposes.

🧠 Algorithmic Core: The Trifecta Pipeline

PantryIQ's intelligence is powered by a three-stage pipeline that ensures both speed and optimality.

Algorithm Role Time Complexity
1. Greedy Algorithm The Fast Filter: Rapidly scores and selects a pool of high-potential candidate recipes based on ingredient match ratios. O(n log n)
2. Graph Theory The Relationship Expert: Analyzes the candidate pool using a NetworkX ingredient graph to find substitutions and complementary flavors. O(V + E)
3. Backtracking The Optimizer: Performs an exhaustive, pruned search on the enhanced candidates to find the optimal recipe combination that satisfies all constraints. O(2^n) worst-case (heavily optimized via pruning)

This synergistic approach allows PantryIQ to navigate a vast combinatorial space efficiently, delivering human-like intuition at machine speed.


🛠️ Tech Stack

PantryIQ is built with a modern, high-performance technology stack designed for scalability and maintainability.

Category Technologies
Frontend Next.js, React, TypeScript, Tailwind CSS, shadcn/ui
Backend Python, FastAPI, Gunicorn, Uvicorn
Algorithms & Data NetworkX (Graph Theory), Pydantic (Data Validation)
Auth & Database Supabase (PostgreSQL, Auth)
Deployment Render, GitHub

🚀 Getting Started: Local Development

Prerequisites

1. Backend Setup

# Navigate to the backend directory
cd backend

# Create and activate a Python virtual environment
python -m venv venv
source venv/bin/activate # For macOS/Linux
# venv\Scripts\activate # For Windows

# Install dependencies
pip install -r requirements.txt

# Run the development server
uvicorn main:app --reload

### 1. Backend Setup

2. Frontend Setup

# Navigate to the backend directory
cd backend

# Create and activate a Python virtual environment
python -m venv venv
source venv/bin/activate # For macOS/Linux
# venv\Scripts\activate # For Windows

# Install dependencies
pip install -r requirements.txt

# Run the development server
uvicorn main:app --reload

About

PantryIQ is an intelligent culinary assistant engineered to minimize food waste and maximize culinary creativity, transforming the home cooking experience from a daily chore into a delightful exploration of flavors.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors