README_EN.md 5.9 KB

๐Ÿณ YiFan FengShen (One Meal to Godhood)

English | ไธญๆ–‡

An AI-powered intelligent recipe generation platform supporting Chinese Eight Great Cuisines + International Cuisine, providing nutritional analysis, wine pairing, recipe image generation, and comprehensive cooking guidance.

Live Demo Vercel Netlify GitHub

Vercel Deploy Status Netlify Status

๐Ÿš€ Core Features

  • Smart Recipe Generation - Generate professional recipes based on ingredients and cuisine preferences
  • Nutritional Analysis - Detailed nutritional breakdown and health scoring
  • AI Food Images - One-click generation of beautiful dish images
  • Wine Pairing - Professional sommelier recommendations
  • Sauce Designer - Customized seasoning formulas
  • Favorites Management - Save and manage favorite recipes
  • Culinary Fortune - Fun food fortune telling

๐Ÿ› ๏ธ Tech Stack

  • Frontend Framework: Vue 3.4 + Composition API + TypeScript 5.3+
  • Styling: Tailwind CSS 3.4+
  • Build Tool: Vite 5.0+
  • AI Services: Yi-Lightning (01.AI) + CogView-3-Flash (Zhipu AI)
  • Deployment: Vercel + Netlify

๐Ÿš€ Quick Start

Requirements

  • Node.js 18+

Local Development

# Clone the project
git clone https://github.com/liu-ziting/what-to-eat.git
cd what-to-eat

# Install dependencies
npm install

# Configure environment variables
cp .env.example .env
# Edit .env file and add your AI API keys

# Start development server
npm run dev

Build & Deploy

# Type check + build
npm run build

# Netlify build
npm run build:netlify

# Preview build
npm run preview

๐Ÿš€ One-Click Deploy

Deploy to Vercel

Deploy with Vercel

Deploy to Netlify

Deploy to Netlify

๐Ÿ“– For detailed deployment guide, see: DEPLOYMENT.md

Environment Variables

# Text Generation API (01.AI)
VITE_TEXT_GENERATION_BASE_URL=https://api.lingyiwanwu.com/v1/
VITE_TEXT_GENERATION_API_KEY=your_text_api_key_here
VITE_TEXT_GENERATION_MODEL=yi-lightning

# Image Generation API (Zhipu AI)
VITE_IMAGE_GENERATION_BASE_URL=https://open.bigmodel.cn/api/paas/v4/
VITE_IMAGE_GENERATION_API_KEY=your_image_api_key_here
VITE_IMAGE_GENERATION_MODEL=cogview-3-flash

๐Ÿ“ Project Structure

src/
โ”œโ”€โ”€ components/          # Reusable components
โ”‚   โ”œโ”€โ”€ ConfirmModal.vue      # Confirmation dialog
โ”‚   โ”œโ”€โ”€ CookingLoader.vue     # Cooking animation loader
โ”‚   โ”œโ”€โ”€ FavoriteButton.vue    # Favorite button
โ”‚   โ”œโ”€โ”€ GlobalNavigation.vue  # Global navigation
โ”‚   โ”œโ”€โ”€ RecipeCard.vue        # Recipe card
โ”‚   โ”œโ”€โ”€ NutritionAnalysis.vue # Nutrition analysis
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ config/              # Configuration files
โ”‚   โ”œโ”€โ”€ ai.ts                 # AI model configuration
โ”‚   โ”œโ”€โ”€ cuisines.ts           # Cuisine configuration
โ”‚   โ”œโ”€โ”€ ingredients.ts        # Ingredients configuration
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ services/            # Service layer
โ”‚   โ”œโ”€โ”€ aiService.ts          # AI API service
โ”‚   โ”œโ”€โ”€ favoriteService.ts    # Favorites service
โ”‚   โ”œโ”€โ”€ imageService.ts       # Image service
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ views/               # Page components
โ”‚   โ”œโ”€โ”€ Home.vue              # Home page
โ”‚   โ”œโ”€โ”€ Favorites.vue         # Favorites page
โ”‚   โ”œโ”€โ”€ SauceDesign.vue       # Sauce designer
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ types/               # TypeScript type definitions
โ”œโ”€โ”€ utils/               # Utility functions
โ””โ”€โ”€ router/              # Router configuration

๐ŸŽฏ Development Guide

Adding New Cuisines

  1. Add cuisine configuration in src/config/cuisines.ts
  2. Write professional AI prompts for cuisine masters
  3. Add corresponding icons and descriptions

Extending Functionality

  1. Create new page components in src/views/
  2. Add route configuration in src/router/
  3. Add navigation entry in navigation component

AI Service Integration

  • Text Generation: src/services/aiService.ts
  • Image Generation: src/services/imageService.ts
  • Support for multiple AI service providers

๐Ÿ“ˆ Star History

Star History Chart

๐Ÿ™ Acknowledgments