/pantryTracker

An AI Pantry Tracker application using Next.js

Primary LanguageJavaScript

AI-Powered Food Inventory Management System

Project Overview

This project is an AI-powered Inventory Management System works best with food items, developed as part of the Headstarter AI Fellowship. It features real-time inventory tracking, AI-powered image recognition for adding items, and smart recipe suggestions based on available ingredients.

Dashboard Screenshot

🌟 Features

  • Real-time inventory tracking
  • AI-powered image recognition for adding items
  • Smart recipe suggestions based on available ingredients
  • Dark mode for comfortable viewing
  • Search functionality for quick item lookup
  • Responsive design for various screen sizes

🛠️ Technologies Used

🚀 Live Demo

Check out the video demo on YouTube: [Click Here!]

🏁 Getting Started

To get a local copy up and running, follow these steps:

  1. Clone the repository:
git clone https://github.com/nehalpatil7/pantryTracker.git
  1. Navigate to the project directory:
cd pantry-tracker
  1. Install dependencies:
npm install
  1. Set up environment variables: Create a .env.local file in the root directory of your project & add the following environment variables:
NEXT_PUBLIC_OPENROUTER_ENDPOINT=your_openrouter_endpoint
OPENROUTER_API_KEY=your_openrouter_api_key

FIREBASE_API_KEY=your_firebase_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_firebase_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET_NAME=your_firebase_storage_bucket
FIREBASE_MESSAGING_SENDER_ID=your_firebase_messaging_sender_id
FIREBASE_APP_ID=your_firebase_app_id
FIREBASE_MEASUREMENT_ID=your_firebase_measurement_id

Replace the placeholder values (your_firebase_api_key, your_firebase_auth_domain, etc.) with your actual Firebase and OpenRouter credentials.

To set up your Firebase project and obtain these credentials: i. Go to the Firebase Console ii. Click on "Add project" or select an existing project iii. Follow the setup wizard to create your project iv. Once your project is ready, click on the web icon (</>) to add a web app to your project v. Register your app and Firebase will provide you with the configuration object containing these values

For the OpenAI API key, sign up at the OpenAI website to get your API key.

  1. Run the development server:
npm run dev
  1. Open http://localhost:3000 with your browser to see the result.

🐛 Troubleshooting

If you encounter any issues while setting up or running the project, try the following:

  1. Ensure all dependencies are installed:
npm install
  1. Clear Next.js cache:
rm -rf .next
  1. Rebuild the project:
npm run build
  1. For OpenAI API issues, verify that your API key is correctly set in the .env.local file and that you have sufficient credits in your OpenAI account.

  2. If you're encountering CORS issues with the OpenAI API, ensure that your serverless function (in pages/api/object-detection.js) is correctly configured to handle the API request.

👤 Author

Nehal Patil

🙏 Acknowledgments

  • Headstarter AI Fellowship for the opportunity and support
  • OpenAI for providing the powerful API
  • All contributors and reviewers