Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I Built My Friend an AI-Powered Allergy-Safe Meal Planner 🍳🤖

说明与用途

一款针对过敏者的安全餐点规划器,接收过敏原和现有食材,使用 Gemini 生成三份食谱,存储历史于 MongoDB Atlas,并对 AI 服务错误实现重试逻辑。

问题

Meal planning becomes frustrating when you have food allergies, requiring manual checks of ingredients, pantry items, and safety.

结果

The project delivers a user-friendly allergy-safe meal planner that generates structured meal ideas, handles AI failures with retries, and stores history for future reference.

工作流

  • 1. User enters allergies and pantry items in the web form.
  • 2. Frontend sends data to /api/spin endpoint.
  • 3. Backend constructs a request to Gemini, including a system prompt and user context.
  • 4. Gemini returns JSON with three meal ideas.
  • 5. Backend parses and forwards the JSON to the frontend.
  • 6. Frontend displays meal name, ingredients, instructions, and safety info.
  • 7. Backend stores the request, response, model used, and timestamp in MongoDB Atlas.
  • 8. If the AI service returns 429, 500, 503, or times out, the backend retries with exponential backoff.

证据

Meal planning can become frustrating when you have food allergies.

来源

The application lets a user enter: Allergies or ingredients they need to avoid; Ingredients currently available in their kitchen.

来源

The deployed version currently uses Gemini 3.8 Flash for meal generation.

来源

MongoDB Atlas is used to persist meal history.

来源

I added retry handling for temporary failures. The backend specifically handles: 429, 500, 503, Request timeouts.

来源

  • 记录日期: 2026-10-04T19:55:48.038Z