https://github.com/ibalosh/recipe-finder-backend
Backend-driven playground recipe search system built in Rails with a React client, focused on ranking and domain logic
https://github.com/ibalosh/recipe-finder-backend
Last synced: 3 months ago
JSON representation
Backend-driven playground recipe search system built in Rails with a React client, focused on ranking and domain logic
- Host: GitHub
- URL: https://github.com/ibalosh/recipe-finder-backend
- Owner: ibalosh
- Created: 2025-05-30T15:30:21.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-16T12:42:28.000Z (5 months ago)
- Last Synced: 2026-02-16T20:07:26.897Z (5 months ago)
- Language: Ruby
- Homepage:
- Size: 1.12 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π₯ Recipe Finder - Backend - API
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.
[](https://github.com/ibalosh/recipe_time/actions)
π **Live frontend demo**: [recipe-finder](https://recipe-finder.playground.ibalosh.com/)
π» **Frontend repo**: [github.com/ibalosh/recipe_time_frontend](https://github.com/ibalosh/recipe_time_frontend)
---
## π‘ Project Overview
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.
#### Example: searching for `["water", "oil", "flour"]`
| 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 |
---
## π§ Database Structure
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](docs/DATABASE.md).
API endpoints are documented in [docs/API_ENDPOINTS.md](docs/API_ENDPOINTS.md).
---
## π Backend Improvements
- β
**Test coverage** for data models and API endpoints
- β
**Improved seeds**: transforms fields like URLs and enriches records with fields like `short_description` and `instructions` to make the frontend experience more engaging
- β
**Basic authentication**: added simple single token-based protection to prevent public access to the API