Task on hand: It's dinner time! Create an application that helps users find the most relevant recipes that they can prepare with the ingredients that they have at home.
A fast and lightweight Rails API for searching recipes by ingredients you already have at home.
🌐 Live frontend demo: recipe-finder
💻 Frontend repo: github.com/ibalosh/recipe_time_frontend
This application allows users to search recipes by one or more ingredients (e.g. eggs mushrooms) and get back recipes that contain the most relevant matches. The API ranks results by how many of the searched ingredients match, relative to each recipe’s total ingredients.
Searching for flour water oil will prefer recipes that contain all ingredients compared to total number ingredients in the recipe.
| Recipe | Total Ingredients | Matched Ingredients | Relevance (%) |
|---|---|---|---|
| Gluten-Free Sourdough Starter | 3 | 3 | 100.00 |
| Fried Flour Tortilla Chips | 2 | 2 | 100.00 |
| Chapati (East African Bread) | 6 | 5 | 83.33 |
The data is imported from a JSON dataset (9,000+ recipes). The database uses a relational schema with denormalization in some areas to favor performance, maintainability, and development speed.
For a deeper look at the schema and the reasoning behind optimizations (indexing, partial normalization), see docs/DATABASE.md. API endpoints are documented in docs/API_ENDPOINTS.md.
- ✅ Test coverage for data models and API endpoints
- ✅ Improved seeds: transforms fields like URLs and enriches records with fields like
short_descriptionandinstructionsto make the frontend experience more engaging - ✅ Basic authentication: added simple single token-based protection to prevent public access to the API