Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/AndrewwCO/Panahashi/llms.txt

Use this file to discover all available pages before exploring further.

Panahashi lets users build a personal list of favorite bakeries for quick re-ordering, and leave star ratings after completed orders to share their experience with other customers. Both features are available without leaving the bakery detail view.

Favorites

FavoritesScreen shows the user’s saved bakeries, fetched on focus via:
fetchFavorites()
This calls GET /favorites and returns an array of bakery objects in the same format as the Bakeries tab, including name, address, rating, open/closed status, and operating hours. Each card links directly to BakeryDetailScreen. From BakeryDetailScreen, the heart button in the top-right corner toggles the favorite state for the current bakery:
toggleFavorite(bakeryId)  // POST /favorites/:bakeryId — adds if not saved, removes if saved
Two additional functions are available for more granular control:
fetchFavoriteStatus(bakeryId)  // GET /favorites/:bakeryId/status — returns { isFavorite: boolean }
removeFavorite(bakeryId)       // DELETE /favorites/:bakeryId — removes without toggling
BakeryDetailScreen uses fetchFavoriteStatus on load to set the initial heart icon state, so the button always reflects the current saved status accurately.

Leaving a review

Reviews can only be submitted for orders that have reached COMPLETED status. Before showing the review form, OrderDetailScreen checks eligibility:
canReviewOrder(orderId)  // GET /reviews/can-review/:orderId
If the check returns canReview: true, a review prompt appears at the bottom of the order detail page. Users select a star rating (1–5) and optionally add a comment, then submit via:
createReview({ orderId, rating, comment })
FieldTypeDescription
orderIdstringID of the completed order being reviewed
ratingnumberStar rating from 1 to 5
commentstringOptional free-text feedback
After a successful submission, the review prompt is hidden and a confirmation alert is shown.

Bakery reviews

All reviews for a given bakery are displayed in the Reviews tab of BakeryDetailScreen. They are fetched via:
fetchReviewsByBakery(bakeryId, page, pageSize)
This calls GET /reviews?bakeryId=<id>&page=<n>&pageSize=<n> and returns paginated reviews. Each review card shows the reviewer’s name initial, submission date, star rating, and comment.

Your reviews

Users can see all reviews they have personally submitted from their profile:
fetchMyReviews()  // GET /reviews/me
This returns all reviews left by the authenticated user across all bakeries, accessible from ProfileScreen.
You can only review an order once it reaches COMPLETED status. The canReviewOrder check also prevents duplicate reviews — the prompt disappears permanently after a review is submitted for a given order.

Build docs developers (and LLMs) love