It’s a solo project inspired by a Scrimba course. The app collects ingredients from the user through a form, then sends them to an AI with a prompt asking for a recipe using those ingredients. Try ChefanneLnAI 👨🍳
- Each ingredient must be unique in a recipe.
- Ingredient comparison is case-insensitive.
- The AI must detect the ingredients'language and generate the recipe in the same language.
- Show user that response can be long
The OpenRouter API key is secured using a Netlify function. The key is stored server-side and never exposed to the frontend.
Files:
netlify/functions/get-recipe.js- Secure proxynetlify.toml- Netlify configuration
- Event Listeners
- State
- Forms in react
- State management strategies
- Use React-MarkDown to get Html
- Added an animation before the recipe is displayed to keep users waiting.
- use vite.js
- Secure API key management using Netlify Functions Proxy