DEV Community

Cover image for PantryPal
Anika Jha
Anika Jha

Posted on

PantryPal

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

Your kitchen, figured out.

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

"We have food at home."
❌ opens fridge
❌ opens pantry
❌ stares for 30 seconds
❌ orders food anyway

Too relateable right??

Let's change that
"We have food in the pantry."
✅ Okay. What can we make?

That tiny difference is basically why I built PantryPal for the Hacktoberfest Weekend Challenge: Build for a Friend.

What I Built

The challenge was to build something for a friend or loved one, so instead of starting with a cool technology and looking for a problem, I started by asking my friends:

And the perks of having foodie friends leads you to these:

One friend basically said:

"I want protein-rich meals, but I'm bored of eating the same things."

Another wanted:

"Can something please remind me before the food I bought becomes a science experiment?"

And another problem kept coming up:

"I have ingredients. I just don't know what to cook."

You know that feeling?
You bought curd last week because you were definitely going to eat healthier.
Now you're opening the fridge wondering whether the curd is still food or has started developing its own biodiversity.

Or maybe you're living alone with:

  • 3 eggs
  • half an onion
  • some spinach
  • a questionable tomato
  • one pan
  • and absolutely no idea what to cook. And somehow, the answer is always the same five recipes you've already made a hundred times.

So I built PantryPal.

The idea is simple:

Tell PantryPal what you have → tell it what you want → get something you can actually cook.

You can add pantry items naturally:

"Bought 6 eggs and 250g spinach today."

PantryPal turns that into structured pantry information and keeps track of quantities, dates, freshness, and notes.

Then it answers the question that somehow gets harder every evening:

"What should I cook?"

Pick the ingredients you want to use, tell PantryPal what you're working with, and it generates multiple meal ideas around your real constraints.
Want:

  • something high-protein?
  • something quick?
  • Indian food?
  • Surprise?
  • something healthy?
  • one-pan only?
  • microwave only?
  • something different because you're bored of eating the same thing? PantryPal works around that.

You can also tell it:

Cuisine: Indian, International, etc.

Time: 10–60 minutes

Effort: Very easy → Challenge

Equipment: One pan, stovetop, microwave, air fryer, oven, etc.

Because if your entire kitchen is basically one pan, "use a blender and finish in the oven" isn't exactly helpful.


And then there's the food you forgot about.

This was another thing my friends wanted.

You know that ingredient you bought with a very specific plan?

And then completely forgot existed?

PantryPal keeps those dates visible and brings ingredients that need attention forward.

So instead of silently letting:

Tomatoes — Use by Oct 3

sit somewhere in your pantry...

it can say:

Check your tomatoes.
You marked them to expire yesterday.

Not:

"THIS FOOD IS DEFINITELY UNSAFE."

Just a useful nudge to check before you forget again.

Because sometimes the most useful AI isn't telling you something complicated.

It's telling you:

"Hey. The tomatoes."


What makes PantryPal different?

I didn't want to build another AI recipe generator.

There are already plenty of those.

The problem isn't:

"Can AI invent a recipe?"

The problem is:

"Can AI figure out what makes sense with the food, time, equipment and preferences I actually have?"

So PantryPal connects:

What I have
     ↓
What needs using
     ↓
What I want
     ↓
What equipment I have
     ↓
What can realistically be cooked
     ↓
Dinner
Enter fullscreen mode Exit fullscreen mode

Instead of generating one random recipe, PantryPal generates multiple candidates and validates them against the user's constraints.

It also calculates a deterministic Meal Efficiency Score based on:

  • how much of the selected food gets used
  • how efficiently it fits the available cooking time
  • how well it covers the selected ingredients

The AI doesn't get to make up that score.


Demo

Live app: Pantry Pal

The demo shows the complete flow:

Add → Track → Decide → Cook → Remember

  1. Add pantry ingredients in natural language
  2. Edit quantities, dates and notes
  3. See ingredients that need attention
  4. Choose what you want to cook with
  5. Select cuisine, goal, time, effort and available equipment
  6. Generate multiple recipe ideas
  7. Compare them
  8. Enter Cook Mode
  9. Save recipes and plan meals

Code

GitHub: Source Code

PantryPal is a full application rather than a static AI demo, with a frontend, backend API, structured AI generation, pantry logic, recipe validation, scoring, and recipe/planning flows.


How I Built It

The AI core of PantryPal is Gemma, specifically:

Gemma 4 26B A4B IT

I wanted the model to handle the messy, human parts of the interaction:

  • understanding natural-language pantry entries
  • generating recipes
  • adapting recipes to cuisines
  • suggesting substitutions
  • turning constraints into useful meal ideas

But I didn't want to ask the model to be the source of truth for everything.

The application itself handles:

  • pantry state
  • quantities
  • dates
  • freshness
  • equipment constraints
  • time constraints
  • recipe validation
  • recipe ranking
  • Meal Efficiency Score

So the architecture is roughly:

                 PANTRYPAL
                     │
          ┌──────────┴──────────┐
          │                     │
     Kitchen Logic           Gemma
     deterministic             AI
          │                     │
   dates / quantities     natural language
   freshness              recipe generation
   constraints             substitutions
   scoring                 cuisine adaptation
          │                     │
          └──────────┬──────────┘
                     ↓
              A meal you can make
Enter fullscreen mode Exit fullscreen mode

Why Does Open Innovation Matter?

Using an open-weight model like Gemma made it possible to build the AI into the product, rather than just putting a chatbot next to it.

The interesting part isn't:

"Ask an AI for a recipe."

It's being able to take:

"I have eggs, spinach and half an onion, I want something high-protein, I have one pan, and I don't want to spend more than 20 minutes"

and turn that into a structured, validated kitchen decision.

Open innovation makes experimentation with that entire pipeline possible:

User context
     ↓
Open model
     ↓
Application logic
     ↓
Validation
     ↓
Personalized result
Enter fullscreen mode Exit fullscreen mode

The model is one part of the product — not the product itself.


My Agent Session

I built PantryPal iteratively using DevRelay as an agent-assisted development workflow.

DevRelay helped me implement and refine features across the application, debug the Gemma integration, troubleshoot structured recipe generation and validation, improve the pantry and recipe flows, and test the complete application end-to-end.

I used the agent as a development partner rather than a one-shot code generator iterating through implementation, debugging, testing, and refinement until the application worked as a complete product.


Prize Categories

PantryPal uses a hybrid architecture:

  • Gemma for natural-language understanding and recipe generation
  • Node.js + Express for the application backend
  • MongoDB Atlas for production pantry and recipe data
  • HTML / CSS / JavaScript for the responsive frontend
  • Render for deployment

Built for a friend. Useful for anyone who has ever opened the fridge and immediately regretted it.

The funny thing about this project is that none of the original problems sounded like "AI problems."

One friend wanted more protein.

One wanted expiry reminders.

One was tired of cooking the same five meals.

Someone else just wanted to stop wasting groceries.

And underneath all of them was the same question:

"What am I supposed to do with all this food?"

So that's what PantryPal tries to answer.

We have food at home.

Now we also know what to do with it.

There's a meal in there.

Top comments (0)