A Next.js application that allows users to upload menu images and ask questions about them using OCR and embeddings.
- 📷 Upload menu images via drag & drop, file selection, or clipboard paste (Ctrl+V)
- 🔍 OCR text extraction from menu images using Tesseract.js
- 🗃️ PostgreSQL database with pgvector for storing menu embeddings
- 💬 Ask questions about uploaded menus
-
Configure API Key:
- Get an Anthropic API key from https://console.anthropic.com
- Copy
.env.exampleto.env.local - Add your API key to
.env.local:ANTHROPIC_API_KEY=your_anthropic_api_key_here
-
Start the database:
npm run db:up
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser: Navigate to http://localhost:3000
-
Upload Menu Images:
- Drag and drop image files onto the upload area
- Click to browse and select files
- Paste from clipboard: Hover over the upload area and press Ctrl+V (or Cmd+V on Mac) to paste images directly from your clipboard
-
Enter Restaurant Name:
- Type the restaurant name in the text field
-
Upload:
- Click the upload button to process the images with OCR and store them in the database
npm run db:up- Start the PostgreSQL databasenpm run db:down- Stop the databasenpm run db:reset- Reset the database (removes all data)