The cart in Panahashi is not local — it lives on the backend and is fetched fresh each time the user opens the app or logs in. This means the cart persists across devices and sessions. From the cart, users schedule a pickup time, choose a payment method, and place an order. On success, they receive a QR code to present at the bakery counter.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.
Your cart
CartScreen displays the current cart fetched from GET /cart. Each line item shows the product name, emoji, unit price, quantity controls, and line total. A floating footer shows the running total and the primary action button.
The bottom navigation tab displays an itemCount badge so users always know how many items are waiting.
Cart state is managed globally by CartContext, which exposes:
| Value | Type | Description |
|---|---|---|
cart | object | null | Full cart object from the backend, including items, bakeryId, and bakeryName |
addToCart | function | Adds or increments a product in the cart |
updateQty | function | Updates item quantity; passing qty = 0 removes the item |
clearCart | function | Empties the cart on the backend and resets local state |
toApiItems | function | Converts cart items to the shape expected by createOrder |
itemCount | number | Total number of individual units across all items |
total | string | Cart total in COP, as a string with no decimals |
toApiItems() function used when placing an order:
Placing an order
Review cart
The user reviews items in
CartScreen, selects a pickup time slot (09:00–13:00), chooses a payment method, and optionally adds special notes.Confirm order
Tapping the confirm button calls
createOrder(), which posts to POST /orders:| Field | Type | Description |
|---|---|---|
bakeryId | string | ID of the bakery being ordered from |
items | array | Cart items from toApiItems() |
pickupTime | string | Selected pickup time in HH:mm format |
notes | string | Optional special instructions (e.g. allergen notes) |
paymentMethod | string | One of CASH_ON_PICKUP, CREDIT_CARD, DEBIT_CARD, PSE |
promotionId | string | Optional — ID of a promotion to apply to the order |
Payment (card/PSE)
If the selected method is not
CASH_ON_PICKUP, the user is sent to PaymentScreen to enter card details or confirm PSE. Cash orders skip this step entirely.Viewing your orders
OrdersScreen fetches the user’s full order history via GET /orders/me with pagination. Orders are filterable by status:
- In progress — orders with status
PENDING,CONFIRMED,BAKING, orREADY - All — the complete history including
COMPLETEDandCANCELLED
OrderDetailScreen, which fetches the full order from GET /orders/:id and also shows the QR code when the order status is CONFIRMED or READY.
QR code confirmation
After a successful order,OrderConfirmationScreen renders a QR code using react-native-qrcode-svg. The QR value is the qrCode string returned by the backend in the order response.
The QR code is presented at the bakery counter to verify and complete the pickup. The screen also displays:
- Pickup time
- Order total
- A share button to send order details via native share sheet
- Links to the Orders tab and Home screen