-
Notifications
You must be signed in to change notification settings - Fork 0
Features
Zoff edited this page Feb 23, 2026
·
1 revision
Main component: src/components/PantryTracker.jsx
This module lets users:
- add food items with category, quantity, and expiration date
- view active (not consumed) items
- mark items as consumed
- delete items
- see "expiring soon" alerts for items with 0 to 3 days remaining
Implementation notes:
- loads data from
localStorageon mount - saves automatically to
localStorageafter every update - expired items display an
Expiredbadge
Component: src/components/AddFoodForm.jsx
Available fields:
-
name(required) -
category(required) -
quantity(optional) -
expiryDate(required)
Important rule:
- if
expiryDateis empty, changing the category pre-fills a date based on estimated shelf life
Component: src/components/RecipeGenerator.jsx
This module:
- lists active ingredients
- highlights items expiring within 7 days
- allows selecting ingredients
- generates a recipe locally (mocked)
Current state:
- no OpenAI API call in the current code
- includes a 1.5s simulated API delay
Component: src/components/ImpactDashboard.jsx
Displayed KPIs:
- Food Saved (lbs)
- CO2 Prevented (kg)
- Water Saved (gallons)
- Money Saved ($)
Current formulas per consumed item:
foodSaved += 0.5co2Prevented += 2.5waterSaved += 50moneySaved += 4
The dashboard also includes:
- saved vs wasted progress bars
- environmental context cards
- achievements