Feature: cuisine categories, search filters (price, rating, city) and sort
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 2h 19m
- Merged PRs (30d)
- 30
Description
## Summary
Search is a single free-text keyword matched against name, city, state and description (`restaurant_routes.py:233-321`). The empty-results page even suggests searching "Cuisine types (e.g., Italian, Mexican)" (`SearchBar/index.tsx:107-109`), but there is no cuisine field, so "Italian" only matches when the owner happened to write it in the description. There is no way to filter by price (`$` to `$$$$$`), minimum rating or city, and results come back in database order.
## Proposal
- A `categories` table plus `restaurant_categories` join (or a single `category` column to start), seeded for the 10 demo restaurants; multi-select in create/edit.
- Query params on `/api/restaurants` and `/api/restaurants/search`: `category`, `price`, `min_rating`, `city`, `sort=rating|reviews|newest`.
- Filter bar on `/restaurants` and `/search/:keyword`; category chips on cards and the detail page; clicking a chip searches that category.
- Pair with the pagination and N+1 issues, since the list query gets rewritten anyway.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading restaurant_routes.py:233-321 and SearchBar/index.tsx:107-109, then trace the /api/restaurants and /api/restaurants/search entry points and the restaurant create/edit and card/detail views. Clarify the category schema choice and how pagination and N+1 work fit together. Done means category, price, rating, and city filtering, sorting, and the listed UI updates work across both restaurant views.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, typescript
- Domain
- backend, databases, frontend, search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100