MenuMuse - AI Smart Menu Generator

π MenuMuse - AI Smart Menu Generator
β¨ Product Overview
MenuMuse is an advanced AI-powered menu generator that transforms ordinary menu photos into poetic culinary stories. Through deep learning and natural language processing technologies, MenuMuse not only intelligently recognizes dish information but also creates unique literary descriptions for each dish and generates professional-grade food photography images.
π― Core Values
- π§ Smart Recognition: Advanced AI vision technology for precise identification of every dish on the menu
- π¨ Poetic Copy: Create unique literary descriptions for each dish, giving food the warmth of literature
- π Bilingual Presentation: Chinese-English dish names that let cuisine transcend language barriers
- πΈ Food Photography: AI-generated professional-grade food images, presenting each dish like a work of art
- π Personalized Recommendations: Intelligent pairing suggestions to help you discover perfect taste combinations
- ποΈ Cultural Heritage: Deep analysis of dishes’ cultural backgrounds and the artistry of culinary craftsmanship
π Tech Stack
Frontend Technologies
- Next.js 15 - React full-stack framework with App Router and Server Components support
- React 19 - User interface library with latest RSC features
- TypeScript - Type-safe JavaScript superset
- Tailwind CSS 4 - Utility-first CSS framework
- shadcn/ui - Modern React component library (Neutral style)
- Lucide React - Beautiful icon library
- Zustand - Lightweight state management
AI and Backend Technologies
- Vercel AI SDK - Unified AI development toolkit
- OpenAI GPT-4o - Natural language processing and content generation
- Google Vertex AI - Image generation and visual recognition
- Google Gemini - Multimodal large language model
- Zod - TypeScript-first schema validation
Development Tools
π οΈ Quick Start
Requirements
- Node.js 18.17+
- npm 9.0+
- Docker (optional, for containerized deployment)
Local Development
- Clone the project
git clone https://github.com/neozhu/menu-muse-app.git
cd menu-muse-app
- Install dependencies
npm install
- Environment configuration
cp .env.example .env.local
Edit .env.local
file and configure API keys:
# OpenAI
OPENAI_API_KEY=your_openai_api_key
# Google Vertex AI
GOOGLE_VERTEX_API_KEY=your_vertex_api_key
GOOGLE_PROJECT_ID=your_google_project_id
# Google AI (Gemini)
GOOGLE_AI_API_KEY=your_google_ai_api_key
# Next.js
NEXT_PUBLIC_BASE_URL=http://localhost:3000
- Start development server
npm run dev
- Open browser Visit http://localhost:3000 to view the application
π³ Docker Deployment
- Build image
docker build -t menu-muse-app .
- Run container
docker run -p 3000:3000 --env-file .env.local menu-muse-app
- Using Docker Compose
docker-compose up -d
π± Features
π― Core Functions
π Smart Menu Recognition
- Support for multiple image formats (JPG, PNG, HEIC)
- Intelligent text recognition (OCR) and content parsing
- Multi-language menu support (Chinese, English, Japanese, etc.)
- Automatic image preprocessing and optimization
π¨ AI Content Generation
- Poetic Copy Creation: Generate unique literary descriptions for each dish
- Bilingual Dish Translation: Chinese-English bilingual display for international presentation
- Cultural Background Analysis: Deep exploration of dishes’ historical and cultural significance
- Culinary Craft Description: Professional cooking methods and technique introductions
πΈ AI Food Photography
- Based on Google Vertex AI Imagen model
- Professional-grade food photography styles
- Automatic optimization of lighting and composition
- Multiple styles and angle options
π‘ Smart Recommendation System
- Personalized taste matching
- Nutritional pairing suggestions
- Seasonal recommendations
- Regional specialty recommendations
π User Experience
π Three Simple Steps
- Upload menu photo - Capture or select menu images
- AI smart analysis - Automatically identify and parse dish information
- Get culinary stories - Generate poetic descriptions and professional images
π¨ Modern Design
- Neutral Γ Half-Flat Minimalism design style
- Liquid Class fluid design elements
- Glassmorphism glass-like visual effects
- Complete dark mode support
- Responsive design, perfectly adapted to all devices
βΏ Accessibility
- WCAG AA standard contrast ratios
- Complete keyboard navigation support
- Screen reader friendly
- Semantic HTML structure
ποΈ Project Architecture
menu-muse-app/
βββ app/ # Next.js App Router
β βββ api/ # API routes
β β βββ analyze-menu/ # Menu analysis endpoint
β β βββ generate-image/ # Image generation endpoint
β β βββ health/ # Health check endpoint
β βββ menu-magic/ # Menu magic feature page
β βββ layout.tsx # Root layout
β βββ page.tsx # Home page
βββ components/ # React components
β βββ ui/ # shadcn/ui base components
β βββ menu/ # Menu-related components
β βββ hero-section.tsx # Hero section component
β βββ ...
βββ lib/ # Core libraries
β βββ ai/ # AI client wrappers
β β βββ aiClient.ts # Multi-model AI client
β β βββ index.ts # Unified exports
β βββ env.ts # Environment variable configuration
β βββ utils.ts # Utility functions
βββ hooks/ # Custom React Hooks
βββ types/ # TypeScript type definitions
βββ stores/ # Zustand state management
βββ public/ # Static assets
π§ Core Modules
AI Client (lib/ai/aiClient.ts
)
- Unified multi-model AI interface
- Support for OpenAI, Google Vertex AI, Google Gemini
- Automatic error handling and retry mechanisms
- Type-safe API calls
Component System (components/
)
- Design system based on shadcn/ui
- Reusable UI component library
- Strict TypeScript type checking
- Accessibility support
State Management (stores/
)
- Zustand lightweight state management
- Middleware extension support
- Server-side rendering friendly
π§ͺ Testing
Running Tests
# Unit tests
npm run test
# Integration tests
npm run test:integration
# E2E tests
npm run test:e2e
# Test coverage
npm run test:coverage
Testing AI Features
# Test image generation
npm run test:image
# Test menu analysis
npm run test:menu-analysis
π Performance Optimization
π Loading Performance
- Server Components first, reducing client-side JavaScript
- Dynamic Imports for lazy loading large components
- Image Optimization using
next/image
for automatic optimization - Font Optimization using
next/font
to reduce CLS
π― Runtime Performance
- React 19 concurrent features
- Suspense for graceful async UI
- useOptimistic for optimistic updates
- Caching Strategy intelligent data caching
π Monitoring Metrics
- Web Vitals core web vitals monitoring
- Lighthouse performance auditing
- Bundle Analyzer bundle analysis
- Performance Profiling performance analysis
π Security
π‘οΈ Data Protection
- API Key Management: Secure environment variable configuration
- Input Validation: Zod schema validation
- Error Handling: Error responses that don’t leak sensitive information
- Rate Limiting: API request frequency limiting
π Privacy Compliance
- Data Minimization: Only collect necessary data
- Temporary Storage: Automatic image deletion after processing
- Transparency: Clear privacy policies
- User Control: Complete data control rights
π Internationalization
πΊοΈ Multi-language Support
- Chinese: Simplified Chinese (default)
- English: English
- ζ₯ζ¬θͺ: Japanese (planned)
- νκ΅μ΄: Korean (planned)
π¨ Localization Adaptation
- Cultural Adaptation: Localized design elements
- Cuisine Features: Optimization for different regional cuisines
- Timezone Handling: Automatic timezone recognition and conversion
π€ Contributing
We welcome and appreciate all forms of contributions!
π How to Contribute
- Report Issues: Report bugs or suggest features in Issues
- Submit Code: Fork the repository, create branches, submit PRs
- Improve Documentation: Enhance documentation and examples
- Testing Feedback: Participate in testing and provide feedback
π οΈ Development Workflow
- Fork this repository
- Create feature branch:
git checkout -b feature/amazing-feature
- Commit changes:
git commit -m 'Add amazing feature'
- Push branch:
git push origin feature/amazing-feature
- Create Pull Request
π Code Standards
- Follow ESLint configuration
- Use TypeScript strict mode
- Write unit tests
- Maintain code readability and maintainability
For detailed contribution guidelines, please refer to CONTRIBUTING.md.