Feature: photos on reviews (backend exists, UI doesn't)
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 2h 19m
- Merged PRs (30d)
- 30
Description
## Summary
The second README "Future Functionality". Most of the backend already exists:
- `ReviewImage` model (`app/models/review_image.py`), `POST /api/reviews//images` with a 10-photo cap (`review_routes.py:64-87`), seeds in `app/seeds/review_images.py`, and every review payload already includes `reviewImages` (`review_with_details`).
- The React `Review` type has `reviewImages?: ReviewImage[]`, but no component renders it and no form lets a user attach one.
Gaps to close:
- The add-image route doesn't check that the caller wrote the review, so any logged-in user can attach photos to anyone's review.
- There is no `DELETE /api/review-images/` at all, and no S3 cleanup when a review is deleted.
- `ReviewImageForm` only accepts a URL; the upload flow should reuse `POST /api/images/upload` the way `AddPhotoModal` does.
## Proposal
- Author-only check on add; a new delete route (author or restaurant owner); remove S3 objects on review delete.
- Review form: multi-file picker (reuse `utils/uploads.ts`), thumbnails with remove buttons, max 10.
- Display: thumbnail strip under the review text in `GetAllReviews` and `UserPage`, opening the existing lightbox from `DisplayPhotos`.
- Tests alongside `tests/test_images.py`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Read app/models/review_image.py and review_routes.py:64-87 first, then inspect utils/uploads.ts and AddPhotoModal for the upload flow. Trace review rendering through GetAllReviews, UserPage, and DisplayPhotos, and run tests/test_images.py. Done means author/owner permissions, deletion cleanup, multi-image review uploads, thumbnails/lightbox display, and coverage for the new behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python, react, typescript
- Domain
- api, backend-api-design, full-stack, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100