A fast, minimal web app to search recipes and view details (ingredients and instructions) using TheMealDB API. Built with plain HTML, CSS (Tailwind CDN), and JavaScript—no build step required.
- Search recipes by name
- Responsive grid of recipe cards
- Modal details: ingredients, instructions, tags, area, category
- Loading state and empty results message
- Keyboard-friendly: close modal via the close button
- Frontend: HTML, Tailwind (via CDN), Font Awesome (via CDN)
- Language: Vanilla JavaScript
- API: TheMealDB
- Clone or download this repository.
- Open
index.htmldirectly in your browser, or use a simple static server (recommended):
# Using VS Code Live Server (recommended)
# Right-click index.html → "Open with Live Server"
# Or use any static server, e.g.:
npx serve .No environment variables or build steps are needed.
- Enter a recipe name (e.g., "potato") in the search bar.
- Press the search button.
- Click "View" on any result to open the modal with full details.
- Use the close button in the top-right of the modal to exit.
Place images in assets/ and reference them with relative paths:
Recipe-Finder-App/
├─ index.html # App layout and containers
├─ index.js # Search, render, and modal logic
├─ style.css # Additional styles (Tailwind provided via CDN)
└─ README.md
- Search endpoint used:
https://www.themealdb.com/api/json/v1/1/search.php?s={query} - Results are parsed and rendered as cards; clicking "View" shows a modal with ingredients and instructions.
- Results depend on TheMealDB data availability and uptime.
- Category color indicator is basic (Vegetarian/Dessert highlighted; others default).
- High-contrast theme with Tailwind classes.
- Modal provides a clear close button. (Enhancements like ESC-to-close and focus trapping can be added.)
- ESC key to close modal and focus management
- Persist last search query
- Offline error handling and retries
- Unit tests for rendering functions
- Data: TheMealDB
- UI: Tailwind CSS CDN, Font Awesome CDN
This project is provided for learning/demo purposes.
Made with ❤️ Sumit Tomar







