DEV Community

Zoe Lin
Zoe Lin

Posted on

Dark Dish Lab: A Cursed Recipe Generator

April Fools Challenge Submission ☕️🤡

What I Built

Dark Dish Lab is a tiny, delightfully useless web app that generates cursed food or drink recipes.

You pick:

  • Hated ingredients
  • Flavor chaos (salty / sweet / spicy / sour)

Then it generates a short “recipe” with a horror score, a few steps, and a warning.

It solves no real-world problem. It only creates regret.

Demo

Code

How I Built It

  • Frontend: React (Vite)
    • Ingredient + flavor selection UI
    • Calls backend API and renders the generated result
  • Backend: Spring Boot (Java 17)
    • POST /api/generate endpoint
    • Generates a short recipe text and returns JSON
  • Optional AI: Google Gemini API
    • If AI is enabled and a key is provided, it asks Gemini for a very short recipe format
    • If AI is disabled or fails, it falls back to a non-AI generator
  • Notes
    • Only Unicode emojis are used (no emoji image assets)
    • API keys are kept in local env files and not committed

How I Leveraged Google AI

Gemini (via the Gemini API) is the text generator behind Dark Dish Lab’s “cursed recipe” output.

Instead of using AI as a generic chatbot, I use it as a formatting engine:

  • Input: selected ingredients + flavor axes (salty/sweet/spicy/sour)
  • Output: a short, structured recipe (name, 3 steps, 1 warning)

To keep the experience stable and demo-friendly, I added a few guardrails:

  • Server-side API key only (kept in backend/.env.local, not committed)
  • Strict prompt constraints (no emojis, short length, fixed format)
  • Fallback generator when Gemini is disabled/unavailable
  • Output trimming to avoid unexpectedly long responses

Prize Category

  • Best Use of Google AI — I integrated the Gemini API to generate short, structured cursed recipes from the user’s selected ingredients and flavor axes.
  • Community Favorite angle — Try to generate the most cursed combo you can. Comment your ingredient + flavor picks and the horror score you got. Bonus points if your friends refuse to read it.

Top comments (0)