MenuGen is a full-stack web app that turns raw menu photos into a visual, understandable menu experience.
It first extracts dish text with an LLM-powered pipeline, then asynchronously searches and verifies dish images so users can quickly understand what to order.
The project supports runtime API configuration from the frontend settings panel, so core model/search keys are no longer required in backend .env.
| Feature | Description | Status |
|---|---|---|
| 📸 Menu OCR + Structuring | Extracts dish names, prices, and descriptions from menu images | ✅ |
| 🌍 Multilingual Output | Returns translated dish info while keeping original names for ordering | ✅ |
| 💱 Currency Context | Supports source currency input for better menu understanding | ✅ |
| 🔍 Hybrid Image Retrieval | Finds candidate dish images and verifies relevance before display | ✅ |
| ⚡ Two-Stage UX | Fast text-first response, then progressive image backfill | ✅ |
| 🧠 Runtime API Settings | Configure LLM/Search/Image generation settings directly in frontend UI | ✅ |
| 💬 Menu Chat Assistant | Ask follow-up questions with current menu context | ✅ |
- Python 3.9+
- Node.js 18+
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
uvicorn main:app --reload --port 8000cd frontend
npm install
# optional: cp .env.example .env
npm run dev- Frontend:
http://localhost:5173 - Backend:
http://127.0.0.1:8000
Open Settings in the frontend and fill in what you need:
- LLM: API Key / Base URL / Model / Temperature / Timeout
- Search: SerpAPI Key / Candidate Results
- Pipeline: RAG toggle / Verify threshold
- Generation: Enable toggle / API Key / Model
These values are sent from frontend requests at runtime and do not need to be fixed in backend .env:
llm_api_keyllm_base_urlllm_modelllm_temperaturellm_timeoutserpapi_keysearch_candidate_resultsgeneration_api_keygeneration_modelenable_image_generationenable_rag_pipelineimage_verify_threshold
Keep backend .env for service-level defaults such as:
- host/port/CORS
- search provider policy
- timeout and concurrency defaults
- upload limits and optional proxy
See backend/.env.example for the current minimal template.
POST /api/analyze-text-only- Phase 1 text analysisPOST /api/search-dish-image- Phase 2 single-dish image retrievalPOST /api/analyze-menu- Legacy full flowPOST /api/menu-chat- Chat with menu contextGET /health- Health check
MenuGen/
├── backend/
│ ├── main.py
│ ├── config.py
│ ├── schemas.py
│ ├── services/
│ └── .env.example
├── frontend/
│ ├── src/
│ │ ├── api/client.js
│ │ ├── components/
│ │ └── App.jsx
│ └── .env.example
├── assets/
└── README.md
MIT License.
