ALL PROJECTS/MASHOOR

Overview

Mashoor brings Pakistan's local bazaars online — Multan's sohan halwa, Lahore's khussa, Peshawar's chappal, Karachi's biryani, Hunza's apricots — and delivers them vendor-direct, nationwide and abroad. It is one brand across four frontends on a single shared Django REST backend: a Next.js 16 web storefront (the SEO and desktop discovery surface), an all-Urdu editorial brand landing, a native Flutter buyer app, and a full Flutter vendor console. This case study centres on the web storefront — the newest and most demanding piece — while the marketplace it belongs to spans mobile as well.

Problem

Pakistan's most famous regional products live in physical bazaars: known in their own city, hard to reach beyond it, and nearly impossible to buy from abroad. Putting them online meant solving several problems at once. The experience had to be genuinely bilingual — English and Urdu with real right-to-left layout and Nastaliq typography, not a bolt-on translation. It had to price in multiple currencies for a global diaspora. It had to be trustworthy: secure, server-verified payment, and a way for a buyer to prove a physical product is genuine. It had to be one coherent brand across web and native mobile, serving both buyers and the vendors who run the shops. And it had to be fast on mid-range phones and Pakistani networks, and discoverable in search — a storefront is worthless if Google can't crawl it.

System Design

How It Works

01/04
01

Server-verified checkout — Stripe or Cash-on-Delivery

The backend prices and authorises every order; the browser is never trusted with money.

  1. 1The shopper opens checkout; saved addresses and any held coupons load, and the default address is auto-selected
  2. 2Choosing card lazily downloads Stripe.js and adds the config-driven service fee; choosing Cash-on-Delivery skips it entirely
  3. 3A coupon is applied from the shopper's rewards or typed in, and validated against the cart total by the backend
  4. 4For card, the backend returns a payment secret, Stripe Elements collects the card, and a confirm call finalises the order; for COD the backend creates the order directly
  5. 5The cart clears and an animated confirmation shows the order number and a what's-next timeline
02

OTP signup with referral capture

A share link turns into a referred, verified account without leaving the buying flow.

  1. 1A shopper arrives on a signup link carrying a referral code, which is captured and pre-filled
  2. 2They enter a name, a phone number or email, and a password, validated inline
  3. 3The backend sends a six-digit code; the UI advances to a verification step with resend
  4. 4On verify the account is created, tokens are stored, the referrer is linked and a welcome coupon is granted
  5. 5The shopper is returned to wherever they were — resuming checkout if mid-flow, otherwise home
03

Scan-to-confirm delivery + review

A package QR closes the loop — confirming receipt, proving authenticity, and prompting a review.

  1. 1On an order that is with the courier, the buyer taps scan-to-confirm (or marks it received manually)
  2. 2The camera scanner opens, with a manual code or URL fallback, and decodes the package token
  3. 3The backend checks the token is genuine and belongs to this order, then marks it delivered
  4. 4A review prompt opens; the buyer rates each product received with stars and a comment
  5. 5The order view refreshes to its delivered, reviewed state
04

Prerender, hydrate & localize

How a storefront page is served fast and correct in either language and any currency.

  1. 1Locale routes are prerendered at build with the right lang and direction baked into the HTML
  2. 2A server component prefetches the above-the-fold data and dehydrates it into the page
  3. 3The browser hydrates that cache and TanStack Query keeps it live without refetching what it already has
  4. 4On mount a reconciler applies the visitor's saved currency and locale, invalidating only the affected queries so prices and translations update without a flash
  5. 5Switching language flips the layout to RTL and swaps to Nastaliq fonts; switching currency refetches server-converted prices

Key Features

  • Bilingual English/Urdu storefront with full right-to-left layout and self-hosted Nastaliq typography
  • Server-verified Stripe card checkout plus Cash-on-Delivery, with a config-driven card service fee
  • Multi-currency pricing (PKR, USD, AED, SAR, GBP) with server-side conversion per request
  • Single-shop, server-authoritative cart with a shop-conflict resolution flow
  • Faceted search with infinite scroll and client-computed category, city, price and rating facets
  • Order tracking across 15 Pakistani couriers, refunds/returns (Easypaisa · JazzCash · Bank) and post-delivery reviews
  • QR product-authenticity verification and scan-to-confirm receipt on delivery
  • Referral program with welcome coupons plus a FLAT/PERCENTAGE coupon engine at checkout
  • White-label vendor storefronts at bare vanity slugs, statically regenerated and self-branded
  • Native Flutter buyer app and a full Flutter vendor console (shop, product CRUD, order queue, sales) on the same backend, with push order alerts

Outcomes

  • Brought Pakistan's regional specialties online as a bilingual, RTL-ready marketplace across web and native mobile
  • Server-verified payments (Stripe) plus Cash-on-Delivery, with multi-currency pricing for a global diaspora
  • Measured performance engineering — mobile LCP cut by more than half, API payloads ~80% smaller gzipped, layout shift eliminated
  • Unified four frontends — web storefront, brand landing, buyer app and vendor console — on one shared backend and brand

More work