Eat Decider is a single-page HTML tool that helps users decide what to eat for dinner based on their dietary restrictions, hunger level, food cravings, budget, and cooking effort. It offers meal recommendations—from delivery options to quick & easy recipes to chef-mode cooking—along with detailed instructions and a handy shopping list generator.
- Purpose: Quickly narrow down dinner choices by filtering through dietary preferences, hunger level, craving type, budget, and cooking effort.
- Technology Stack:
- HTML for structure
- Tailwind CSS for styling
- JavaScript for interactivity
Everything is contained in a single HTML file, making it straightforward to open in a browser and use immediately.
-
Dietary Restrictions Selection
- Choose among vegetarian, vegan, gluten-free, dairy-free, or none.
-
Hunger Level
- Starving, quite hungry, or just peckish.
-
Craving Type
- Savory, spicy, fresh, or comfort food.
-
Budget
- Low (
$), medium ($ $), or high ($$$).
- Low (
-
Effort Level
- Delivery (no cooking), quick & easy, or chef mode.
-
Recipe Details
- Recipes come with:
- Prep time
- Cook time
- Ingredients
- Step-by-step instructions
- Optional cooking tips
- Recipes come with:
-
Shopping List Generator
- Check off the ingredients you need for your selected recipe.
-
Progress Bar
- A handy progress bar at the top to show which step you’re on.
-
Start Over
- A simple reset button to begin a new decision-making process at any time.
-
User Selections
As users answer each question (diet, hunger, craving, etc.), the script updates thepreferencesobject in the background. -
Filtering
The script filters through three arrays of meal options:deliveryOptionsquickAndEasyOptionschefModeOptions
Based on the user’s final preferences, one best match is returned (or a fallback if no perfect match is found).
-
Recipe Display
- If the chosen suggestion has a
recipeKey, the detailed recipe is displayed along with a "Generate Shopping List" button. - The shopping list section shows all ingredients as a checklist for easy reference.
- If the chosen suggestion has a
-
Reset
- Clicking Start Over clears all preferences and resets the quiz to the first step.
- Download or Clone this repository containing the
index.html(the single-page file). - Open the file in a web browser (e.g., Chrome, Firefox, Safari).
No additional setup is required since external dependencies are loaded via CDNs.
- Open the
index.htmlfile in your browser. - Answer each question in order:
- Select dietary restrictions (you can choose multiple or “No Restrictions”).
- Click Confirm & Continue.
- Choose hunger level, craving, budget, and effort.
- Get your suggestion:
- If Delivery is chosen, you’ll see a recommended delivery option.
- If Quick & Easy or Chef Mode is chosen, you may also get a recipe with the option to view details.
- (Optional) Generate Shopping List:
- If a recipe is shown, click Generate Shopping List to display the required ingredients in a checklist.
- Start Over at any time by clicking Start Over to clear your selections and begin again.
- Tailwind Version: This file uses the Tailwind CSS CDN (
https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css). You can update the URL for a newer Tailwind version or replace it with a local version of Tailwind if desired. - Meal Options: The arrays
deliveryOptions,quickAndEasyOptions, andchefModeOptions(along with therecipesobject) can be edited to add, remove, or modify your meal recommendations. - Styling: Tailwind classes can be changed directly in the HTML to adjust colors, spacing, and layout.
- Recipe Data: The
recipesobject contains all recipe details. Adding a new recipe requires:- A unique
recipeKey - A corresponding JSON-like entry (name, prepTime, cookTime, ingredients, instructions, tips, etc.)
- A unique
Contributions are welcome! Here’s how you can help:
- Fork this repository.
- Create a new branch (e.g.,
feature/new-delivery-options). - Commit changes (e.g., update meal arrays or enhance UI/UX).
- Open a Pull Request detailing your changes and why they should be merged.
This project is provided under the MIT License. Feel free to use, modify, and distribute this code as you see fit.
Enjoy your perfect meal with Eat Decider! Bon appétit!