Skip to content

siaslas98/Cooks-Match

 
 

Repository files navigation

Cooks-Match

A receipt-to-recipe generator that uses Python's EasyOCR library to extract ingredients from grocery receipts and generates personalized recipes using Google Gemini.

📋 Prerequisites

Make sure you have the following installed on your system:

  • Python 3.8+
  • Node.js 16+
  • npm as the package manager
  • MongoDB (for recipe storage)

Before running, please make sure to download the MongoDB Community Server and Node.js.

🚀 Setup Instructions

1. Clone the Repository

git clone https://github.com/narcistiq/FoodTracker.git
cd Cooks-Match

2. Backend Setup

Navigate to Backend Directory

cd receipt-recipes/backend

Create a Python virtual environment and activate

python3 -m venv venv

source venv/bin/activate (Mac/Linux)
venv\Scripts\Activate.ps1(Windows)

Install Python Dependencies

pip3 install -r requirements.txt

Environment Configuration

Create .env file with your Gemini API key at project root:

Backend configuration:

GEMINI_API_KEY=your_gemini_api_key_here

Start the Backend Server

uvicorn main:app --reload --port 8000

The backend will be available at: http://127.0.0.1:8000

3. Frontend Setup

Navigate to Frontend Directory (in a new terminal)

cd receipt-recipes/frontend

Install Node Dependencies

npm install

Start the Frontend Development Server

npm run dev

The frontend will be available at: http://localhost:5173

🧪 Testing

  1. Backend API: Visit http://127.0.0.1:8000/docs for FastAPI interactive documentation
  2. Upload Test: Use the frontend to upload a receipt image
  3. Example Files: Test with images in receipt-recipes/backend/uploads/

About

Receipt to Recipe Generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 43.1%
  • JavaScript 29.5%
  • CSS 25.9%
  • HTML 1.5%