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 includes a per-bakery loyalty program. Every time you complete an order at a bakery, you earn one stamp on that bakery’s card. When your card reaches 9 stamps, a free reward is unlocked. You can track all your stamp cards — one per bakery you’ve ordered from — in the Loyalty screen.

How stamps work

Each completed order at a bakery awards exactly one stamp on that bakery’s loyalty card. Stamps accumulate independently per bakery, so ordering from three different bakeries earns stamps on three separate cards. LoyaltyScreen displays each card with:
  • A grid of 9 stamp slots — filled slots show a bread emoji, empty slots appear as dashed outlines
  • A progress bar that fills as stamps accumulate
  • A freeItemsAvailable badge (shown in green) when a reward is ready to claim
  • A stats row showing totalRewardsEarned (lifetime rewards) and the current stamps count
The in-app explanation text reads: “Cada pedido completado suma un sello. Al completar 9 sellos en una panadería, ¡ganás un producto gratis!”

Viewing your loyalty cards

LoyaltyScreen calls fetchMyLoyaltyCards() on focus, which hits GET /loyalty and returns all loyalty cards for the authenticated user across all bakeries. Each card object includes:
FieldDescription
stampsCurrent number of stamps on this card
stampsForRewardTarget stamp count to earn a reward (always 9)
freeItemsAvailableNumber of unclaimed free rewards
totalRewardsEarnedLifetime total rewards earned on this card
The screen supports pull-to-refresh to sync the latest stamp counts from the backend.

Per-bakery card

When a user is viewing a specific bakery in BakeryDetailScreen, the app can fetch that bakery’s loyalty card directly:
fetchLoyaltyCard(bakeryId)
This calls GET /loyalty/:bakeryId and returns the card for the current user at that bakery. This is used to show inline loyalty progress on the bakery detail page.

Redeeming a reward

When freeItemsAvailable > 0, the green badge on the loyalty card indicates a reward is ready. Redemption happens in person at the bakery counter — the user presents their order QR code for a free product on their next eligible order. The badge remains visible until the reward has been applied by the bakery.
Stamps are only awarded on COMPLETED orders — orders that are cancelled or still pending will not count toward your loyalty card.

Build docs developers (and LLMs) love