Pantry Chef: AI-Powered Meal Planning to Grocery Checkout in 60 Seconds
Inspiration
My wife loves cooking, but dietary restrictions turned it into a daily puzzle. Gluten-free, dairy-free, low-FODMAP—every recipe required mental gymnastics: Can I substitute this? Will that ruin the dish? Do I have the ingredients?
When the Ship-a-ton prompt mentioned a chef frustrated with downloading recipes and pantry management, it hit home. This wasn't just my wife's problem—it's every home cook's problem.
The numbers prove it: 78 million Americans have dietary restrictions. Meal planning apps exist, but they treat restrictions as afterthoughts. Recipe sites force you to copy-paste into Notes. Grocery apps make you manually build carts. Nobody connects the dots.
I built Pantry Chef to solve this end-to-end: from meal plan to grocery checkout in under 60 seconds.
What it does
The complete flow:
- Generate AI meal plans → Create 3–7 days of recipes with dietary filters (gluten-free, vegan, kosher, low-carb, etc.)
- Review & customize → Swap meals, adjust servings for family size, regenerate individual recipes
- Smart ingredient merging → AI automatically deduplicates ingredients across recipes ("2 cups flour" + "1 cup flour" = "3 cups flour"), normalizes units, calculates optimal package sizes to minimize waste
- One-tap checkout → Send merged shopping list to Walmart with pre-filled cart
Monetization model (dual revenue):
- Primary: Walmart affiliate fees (we make money when you buy groceries—never gating checkout)
- Secondary: Subscriptions (Pro $4.99) + consumable credit packs
Credits only gate AI features (real API costs). Recipe usage is completely free—no artificial paywalls. Free users earn credits via sign-up (25 credits) and Walmart checkouts (15 → 10 → 5 diminishing rewards).
Tier features:
- Free: Meal planning, ingredient merging, Walmart checkout, earn credits
- Pro ($4.99/mo): 40 credits/month + advanced dietary settings, cookbook scanning, cost tracking, nutrition analytics
How we built it
Tech stack:
- Frontend: React Native + Expo 54 (cross-platform iOS/Android)
- Backend: Node.js/Express 5 + Prisma 7 ORM
- Database: PostgreSQL (Docker containerized)
- AI: OpenAI GPT-5o for recipe generation and ingredient intelligence
- Monetization: RevenueCat SDK (subscriptions + consumables)
Architecture highlights:
1. AI Ingredient Merging (95% auto-merge rate)
The hardest problem: recipes are unstructured text. "1 large onion, diced" vs "½ yellow onion" vs "1 medium onion (about 150g)"—same ingredient, three formats.
Two-pass pipeline:
Recipe text → GPT-4 extraction → Structured JSON
{quantity: 2, unit: "cups", item: "all-purpose flour", notes: "sifted"}
Then semantic grouping + unit normalization:
- Cups → grams for solids (using USDA density tables)
- tsp/tbsp → ml for liquids
- "1 large onion" → ~150g equivalent
Result: 95% of ingredients merge automatically. Edge cases (e.g., "diced" vs "sliced whole") flagged for review.
2. Smart Package Calculations
If a recipe needs 3 cups flour but stores sell 5-lb bags, how many bags?
Algorithm: $$\text{packages} = \lceil \frac{\text{total quantity (normalized units)}}{\text{package size}} \rceil$$
Handles fractional packages intelligently (e.g., "buy 1 lime for ¼ cup juice" vs "buy 2 lbs ground beef for 12 oz").
3. RevenueCat Integration
Learned the hard way: concurrent API calls trigger 429 rate limits (error code 7638).
Solution: Multiple useRef guards to serialize operations:
const syncingRef = useRef(false);
const loadingCustomerInfoRef = useRef(false);
const initializingRef = useRef(false);
Run init/refresh sequentially, never with Promise.all(). Unglamorous but critical for reliable purchases.
4. Auth Pattern
JWT tokens stored in AsyncStorage (key: authToken). Helper function getAuthHeaders() centralizes auth logic across API calls.
Challenges we ran into
1. Walmart integration blocked by app store approval
The checkout flow is fully implemented, but I need to publish the app before Walmart grants API credentials for cart creation. Google's identity verification is still pending. This is the reality of shipping in 4 weeks—some gates are outside your control.
2. Ingredient merging refinement
Getting from 70% to 95% auto-merge accuracy required extensive prompt engineering and edge case handling:
- "1 can (14.5 oz) diced tomatoes" vs "2 cups crushed tomatoes"
- "Salt to taste" vs "1 tsp kosher salt"
- "Fresh basil leaves" vs "1 tbsp dried basil"
Each category needed custom normalization rules.
3. Cook-from-pantry AI needs more love
The feature exists (generate recipes from available ingredients), but constraint-based generation is finicky. Sometimes it suggests ingredients you don't have. Needs better prompt engineering and validation.
4. Schema migrations with existing data
Prisma uses db push (not migrate). When adding required columns to tables with data:
- Make column nullable first → push
- Backfill with SQL
- Make required → push again
Otherwise you nuke existing records.
5. The 4-week grind
Evenings and weekends. Docker rebuilds. Wrestling with AsyncStorage. Windows path issues (/c/Users/... vs c:\Users\...). Every feature needed refinement—nothing shipped perfectly on first try.
Accomplishments that we're proud of
1. The complete loop works
Meal plan → ingredient merging → checkout in under 60 seconds. Not "coming soon" or mocked—it actually works (modulo Walmart API approval).
2. 95% auto-merge rate
Users don't notice it until they use a competitor and realize they're manually deduplicating. That's when you know AI is working—it disappears.
3. Sustainable free tier
Affiliate revenue means free users aren't a burden—they're the business model. No ads, no dark patterns, just aligned incentives.
4. Speed as a feature
Meal planning fails when it takes longer than the problem it solves. If it takes 20 minutes to plan dinner, you'll just order takeout. We made it faster than scrolling TikTok recipes.
What we learned
1. AI ingredient merging is harder than it looks
Semantic similarity + unit conversion + package math = surprisingly deep problem. The difference between "works sometimes" and "works 95% of the time" is 10x the effort.
2. RevenueCat quirks matter
SDKs have personalities. Learning to serialize API calls, use multiple ref guards, and avoid concurrent refresh/sync calls was critical for production reliability.
3. External dependencies will block you
Walmart API, Google identity verification, app store approval—you can build the perfect feature and still wait on gatekeepers. Plan accordingly.
4. Dual revenue unlocks better UX
Affiliate revenue means I can make recipe usage free (no artificial credit charges). Subscriptions gate AI costs, not core value. This only works because groceries pay the bills.
5. Shipping beats perfecting
Cook-from-pantry AI isn't perfect. Some ingredients still need manual merge review. But the app is useful today—and that matters more than waiting for 100%.
What's next for Pantry Chef
Immediate (post-competition):
- Ship Walmart integration → Pending app store approval and API credentials
- Refine cook-from-pantry AI → Better constraint handling, validation that generated recipes only use available ingredients
- Improve merge edge cases → Handle "to taste" measurements, fresh vs dried herb conversions
Pro tier features:
- Cookbook scanning → OCR + AI to digitize physical cookbooks into structured recipes
- Cost tracking → Track spending over time, compare store prices
- Nutrition analytics → Macro breakdowns, weekly nutrition summaries
Power tier features:
- Pantry tracking → Scan receipts or manually log inventory, get alerts when running low
- Family profiles → "Dad hates mushrooms, kid allergic to nuts"—filter recipes accordingly
Long-term (deferred post-competition):
- Creator economy → Let users publish recipes, charge credits for usage, revenue share payouts
The real goal: Get this in front of users. The best validation isn't a demo—it's someone saying, "I don't know how I cooked without this."
Built with: React Native (Expo 54), Node.js/Express 5, Prisma 7, PostgreSQL, OpenAI GPT-4, RevenueCat SDK
Built With
- javascript
- node.js/express-5
- openai
- openai-gpt-4
- postgresql
- prisma-7
- react-native-(expo-54)
- revenuecat
- walmart-open
Log in or sign up for Devpost to join the conversation.