Pages
| Page | Address | Notes |
|---|---|---|
| Home | / |
Hero, curated edits, new in, departments, sale, best sellers, our makers |
| Shop | /shop |
All products with filters and sort; /shop?new=1 and /shop?sale=1 are the New in and Sale pages |
| Departments | /categories |
Every category with its description and the curated edits |
| Category | /category/{slug} |
One department with filters |
| Curated edits | /collections, /collections/{slug} |
Hand-picked groups across departments |
| Search | /search?q= |
Full results with filters; the quick search dialog opens anywhere with Ctrl K |
| Product | /product/{slug} |
Gallery, size and colour, stock per variant, add to bag, wishlist, related products |
| Bag | /cart and the slide-in bag |
Quantities, prices checked against the server |
| Checkout | /checkout |
Guest or signed in; contact, address, shipping, coupon, payment |
| Order | /order/{code} |
Confirmation and live status; refreshes by itself |
| Track order | /track |
Find an order with its code and phone number |
| Account | /account |
Sign in or register; orders, wishlist, profile |
| Wishlist | /wishlist |
Saved products |
| About, FAQ, Contact, Privacy, Terms | /about, /faq, /contact, /privacy, /terms |
Texts in messages/*.json; the contact form saves messages for the dashboard |
Filters and sort
Listing pages share one filter panel. Every choice is in the address, so a filtered page can be shared or bookmarked:
| Parameter | Example | Meaning |
|---|---|---|
q |
q=linen |
Words in the name, description, department or colour, Arabic or English |
cat |
cat=women,shoes |
Departments (shop and search pages) |
new, sale, featured |
sale=1 |
New in (last 30 days), on sale, team picks |
size |
size=M,L |
Any of these sizes |
color |
color=sand |
Any of these colours |
min, max |
min=5&max=20 |
Price range in rials |
stock |
stock=1 |
In stock only |
sort |
featured, newest, best, price-asc, price-desc |
Order; sold-out products always come last |
The filtering itself is a pure function (src/lib/filters.ts) covered by unit tests.
Variants and stock
A product has one or more variants, one per size and colour combination. Each variant has its own SKU, stock and optional price (for example a large vase costs more than a small one). On the product page:
- sizes that are sold out in the chosen colour are crossed out;
- a colour with no stock left in any size is dimmed;
- "Only 2 left" appears at or below the low-stock level from Settings;
- the price updates when the variant has its own price.
Bag and checkout
The bag lives in the browser (localStorage) so it survives a reload and works without an account. Its prices are only for display: the bag page and checkout ask the server for a quote (POST /api/cart/quote) that re-prices every line from the database and reports problems (sold out, fewer left, no longer for sale).
Checkout asks for:
- Contact: name, mobile number (checked), optional email.
- Address: governorate (the 11 governorates of Oman), wilayat or area, street and building, notes for the courier.
- Shipping: the methods from Settings that deliver to that governorate, with their fee and free-delivery threshold.
- Coupon: checked on the server (active, not expired, under its usage limit, minimum order reached).
- Payment: cash on delivery and/or card through Thawani (Payments).
When the order is placed the server, in one database transaction: prices everything again, takes the stock of each variant only if enough is left, counts the coupon use only if its limit is not reached, and saves the order with its first timeline entry. If two people buy the last item at the same moment, one of them gets "only a few left" instead of overselling.
Accounts and wishlist
Shoppers do not need an account. With one, they see all their orders, keep a wishlist on any device, and checkout fills in their name and email. Accounts use a separate cookie from the dashboard: a shopper session can never open the dashboard.
Order tracking
Every order gets an unguessable code like SQ-7KQ2-M9XD. The order page and the tracking API hide all but the last three digits of the phone number. The Track order page asks for the code and the phone number used at checkout.
SEO
/sitemap.xmllists every public page in both languages withhreflangalternates;/robots.txtkeeps the dashboard, checkout, bag, account and search results out of search engines.- Every product page has a canonical link and Product structured data (JSON-LD) with one offer per variant, its price and availability. The FAQ page has FAQPage data.
- Titles and descriptions come from the product and category texts in the page's language.