Inspiration

Globally, more than 1 billion meals are thrown away every single day, and over 60% of that waste happens inside ordinary household kitchens (UNEP Food Waste Index). An average family loses roughly \$1,500 every year simply because food gets pushed to the back of the refrigerator, expiration dates slip by unnoticed, and people don't know what to make with random leftover ingredients.

Traditional recipe apps fail at this: they ask "What do you want to cook?" and search by recipe titles, rather than asking "What is about to spoil in your crisper drawer right now?"

Growing up around South Asian home kitchens, we saw firsthand how traditional culinary practices naturally prevent waste—turning pantry staples and yesterday's vegetables into comfort meals like Bhuna Khichuri, Aloo Palak, or Dim Bhuna. We built UseItUp to bring that waste-nothing mindset into modern homes with intelligent tracking and transparent environmental math.


What it does

UseItUp turns the ingredients about to expire in your kitchen into dinner tonight, while measuring the physical and financial waste you prevented:

  1. Intelligent Freshness Triage: Categorizes ingredients by urgency: Urgent ($\le 24\text{h}$ remaining), Coming Soon ($2\text{--}3\text{d}$), and Fresh ($>3\text{d}$).
  2. Tonight's Rescue Mission: An algorithm evaluates your pantry and prescribes the single highest-impact dinner to cook right now, explaining why in plain English.
  3. Urgency-First Recipe Matching: Recommends meals prioritized by the spoilage risk of the ingredients used rather than mere ingredient count.
  4. "I Cooked This" Reconciliation: An atomic cooking transaction deducts the exact quantities used from your pantry, awards celebration confetti, and logs verifiable metrics.
  5. Empirical Environmental Math (No Fake Stats):
    • Physical mass saved in $\text{kg}$ mapped to USDA nutrient weight standards.
    • Avoided greenhouse gas emissions ($\text{kg CO}_2\text{e}$) calculated from peer-reviewed lifecycle analyses (Poore & Nemecek, 2018, Science): $$\text{Avoided Emissions} = \sum (\text{Mass}_i \times \text{Emission Factor}_i)$$ (e.g., $1.9\text{ kg CO}_2\text{e/kg}$ for produce, $4.8\text{ kg CO}_2\text{e/kg}$ for dairy/eggs, $7.2\text{ kg CO}_2\text{e/kg}$ for poultry).
    • Grocery dollars saved based on user purchase price or USDA ERS food benchmarks.
  6. Shareable Impact Badge: Generates high-resolution PNG summary cards client-side using html2canvas.
  7. Local-First & Zero Surveillance: Works 100% in-browser without accounts, tracking beacons, or registration walls, complete with SHA-256 verified JSON database backups.

How we built it

  • Frontend & App Shell: React 18, Vite 5, and TypeScript 5.6.
  • Design System: Custom "Editorial Kitchen" theme built in Tailwind CSS 3.4 (#173B2F forest green, #F7F7F2 warm canvas, and WCAG 2.2 AA-compliant contrast).
  • Data Visualization & Motion: Recharts for responsive weekly activity breakdowns and Framer Motion for micro-interactions.
  • Recipes & APIs: TheMealDB REST API blended with curated offline-first homestyle recipes and a sliding-window client rate limiter.
  • Security & Integrity: Client-side WebCrypto API for SHA-256 envelope checksums and XSS input sanitization.
  • Production Server & Deployment: A zero-dependency Node HTTP server (server.js) with security headers and SPA route fallback, deployed on Railway and configured for Vercel.
  • Automated Testing Suite: 129 automated unit and integration tests across 12 test suites in Vitest, plus an automated headless Google Chrome DevTools Protocol (CDP) end-to-end browser test script.

Challenges we ran into

  1. Culinary Measure Normalization: Recipe ingredients arrive in chaotic units—"a pinch", "2 medium bunches", "1/2 cup", "400g". We wrote a dedicated measure-parsing engine with 18 automated test cases to convert fractional and volume strings into normalized metric units (g, kg, ml, l, pcs).
  2. Deterministic Cooking Transactions in React 18: Under React 18's StrictMode double-invocations, state updates can accidentally record duplicate impact entries. We designed an idempotent, pure transaction engine that reconciles pantry deductions and logs impact in an atomic step with zero side effects.
  3. Client-Side Image Export Across Displays: Generating high-DPI shareable PNG cards with html2canvas often leads to blurry typography or clipped borders. We isolated the render target in an off-screen staging viewport with fixed CSS aspect ratios and scale multipliers.
  4. Container Port Routing on Railway: Railway proxies dynamic ports (PORT=8080) to the container. We tailored server.js to dynamically bind to 0.0.0.0:${PORT} and configured domain proxy routing to eliminate 502 gateway errors.

Accomplishments that we're proud of

  • 129 Passing Automated Tests: 100% test coverage across mathematical scoring, date math (including leap years and calendar boundary conditions), storage rollbacks, and cryptographic backup envelopes.
  • Truly Local-First & Zero Friction: Anyone can visit the site and immediately rescue food without creating a password, providing an email, or accepting tracking cookies.
  • Honest Environmental Attribution: Every single gram of carbon and dollar saved is derived from published agricultural data rather than arbitrary random counters.
  • Live Deployment: Successfully packaged and deployed live to Railway with HTTP/2 200 response times across all SPA routes.

What we learned

  • Local storage can be robust: With schema versioning, automated migrations, and SHA-256 integrity checks, browser-local data can offer a faster, more private, and more resilient user experience than a remote SQL database for personal productivity utilities.
  • Urgency beats simple matching: A recipe matching 5 pantry staples is useless if your sole container of spinach goes bad tonight. Weighting recommendations by $\frac{1}{\text{days until expiry}}$ fundamentally changes cooking behavior.
  • Headless Chrome CDP testing: Driving real browser journeys over WebSocket protocols provides confidence that layouts, modals, and client storage transitions function properly in real production builds.

What's next for UseItUp

  • On-Device Receipt & Barcode Scanning: Integrating WebAssembly-powered OCR to populate the pantry in seconds from store receipts.
  • Encrypted Household Sharing: Enabling peer-to-peer WebRTC sync so roommates or family members can share a live pantry without centralized database accounts.
  • Neighborhood Pantry Surplus Mode: Allowing users to export safe surplus alerts to local community food banks or neighbors before high-value items spoil.

Built With

  • chrome-devtools-protocol
  • clean-code
  • css3
  • food-tech
  • framer-motion
  • html2canvas
  • html5
  • javascript
  • localstorage
  • lucide-react
  • node.js
  • offline-first
  • pwa
  • railway
  • react
  • recharts
  • sustainability
  • tailwindcss
  • themealdb-api
  • typescript
  • vercel
  • vite
  • vitest
  • webcrypto-api
  • zero-waste
Share this project:

Updates

Submission history