Skip to content

AI-powered kitchen assistant that transforms receipt or grocery item photos into intelligent pantry tracking. Uses Google Cloud Vision + Gemini AI to digitize groceries, predict expiration dates, and generate personalized recipes based on your actual inventory. Zero-waste cooking made effortless.

Notifications You must be signed in to change notification settings

sriram9573/GroceryCam

Repository files navigation

GroceryCam 🥦 📸

AI-Powered Smart Kitchen Assistant

Next.js Firebase Gemini AI TypeScript Tailwind


🚀 Overview

GroceryCam is an intelligent kitchen management platform that uses Computer Vision and Generative AI to automate pantry tracking and meal planning.

Instead of manually typing grocery items, users simply snap a photo of their receipt or item. The app digitizes the items, categorizes them using AI, predicts expiration timelines, and generates personalized recipes based on what's actually in stock.


✨ Key Features

📸 Receipt-to-Pantry (OCR & AI)

  • Scanning: Uses Google Cloud Vision to extract text from receipts.
  • Normalization: Google Gemini AI corrects OCR errors, standardizes names (e.g., "Mngo Lrg" → "Mango"), and categorizes items automatically.
  • Multi-Scan: Support for scanning multiple receipts in a single session.

🍳 AI Recipe Chef

  • Context-Aware: Generates recipes based only on ingredients currently in your pantry.
  • Nutritional Info: Estimates calories and macros for every generated recipe.
  • Dynamic Loading: "Chef's Kitchen" animation keeps users engaged while recipes generate.

🎙️ Voice Command Center

  • Natural Language: "Add 5 apples and a gallon of milk."
  • Intent Parsing: AI understands quantity, unit, and item name from spoken commands.

📊 Smart Dashboard

  • Glassmorphic UI: Premium, modern aesthetic with dark mode support.
  • Category Taxonomy: Standardized grouping (Produce, Dairy, Pantry) for easy sorting.
  • Spend Analytics: Visual charts to track monthly grocery spending.

🛠️ Technical Stack

Frontend

  • Framework: Next.js 14 (App Router)
  • Styling: Tailwind CSS + Framer Motion (Animations)
  • State Management: Zustand
  • Theme: next-themes (Dark/Light mode)

Backend & Services

  • Auth: Firebase Authentication (Google/Email)
  • Database: Firestore (Real-time updates)
  • Storage: Firebase Storage (Receipt images)
  • AI Core:
    • Google Cloud Vision API (OCR)
    • Google Gemini 1.5 Flash (Data Normalization & Recipe Generation)

🏗️ Architecture

  1. Upload: User uploads image → stored in Firebase Storage.
  2. Trigger: Frontend calls /api/ocr → extract text via Cloud Vision.
  3. Process: Raw text sent to /api/normalize-items → Gemini converts messy text to JSON.
  4. Review: User confirms items in a polished UI → Data committed to Firestore.
  5. Generate: User requests recipe → Gemini analyzes Firestore inventory → streams Recipe JSON.

🏁 Getting Started

Prerequisites

  • Node.js 18+
  • Firebase Project
  • Google Cloud Project with Vision API enabled
  • Gemini API Key

Installation

  1. Clone the repo

    git clone https://github.com/sriram9573/GroceryCam.git
    cd GroceryCam
  2. Install dependencies

    npm install
  3. Environment Setup Create a .env file in apps/web and apps/api:

    # Example
    NEXT_PUBLIC_FIREBASE_API_KEY=...
    GOOGLE_APPLICATION_CREDENTIALS=...
    GEMINI_API_KEY=...

    (See docs/setup-guide.md for full keys)

  4. Run Locally

    npm run dev
    • Web: http://localhost:3000
    • API: http://localhost:3001

🚀 Future Roadmap

  • Barcode Scanning integration
  • Multiple Users / Family Sharing
  • Shopping List auto-generation from Recipes

About

AI-powered kitchen assistant that transforms receipt or grocery item photos into intelligent pantry tracking. Uses Google Cloud Vision + Gemini AI to digitize groceries, predict expiration dates, and generate personalized recipes based on your actual inventory. Zero-waste cooking made effortless.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages