Files
Alireza HassaniandCursor f078cdad0e Add category detail URLs and polish mega menu UX.
Route categories to /products/category/{id}/{slug}, improve menu hover/layout, and hide stock/category clutter on product cards.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-23 00:34:23 +03:30

6.1 KiB
Raw Permalink Blame History

BRB Store — AI context

Persian RTL storefront for brb-store.com (فروشگاه و تعمیرگاه لوازم خانگی برادران برقعی، قم). Next.js App Router rebuild of the original WillaMall/BeTheme site. Keep this file current — other AI tools read it first.

Stack

  • Next.js 16 (App Router, Turbopack) + React 19 + TypeScript + Tailwind v4
  • Locale: fa, direction: rtl
  • Fonts: Vazirmatn (Persian) + Montserrat (English kickers)
  • Icons: Lucide
  • Dev: npm run dev

Brand

Token Value
Brand red #e7432b
Brand dark #c93621
Ink #161616
Muted #6c6363
Paper #f4f0ec

Logo: public/images/brand/logo.png. Dark glossy caption bars: lib/glossy.ts.

Meshkee API

This site is catalog-only (no shopping cart). Login / user icon goes to the customer portal. Do not build a local login page.

Routes

Path Source
/ Homepage + static image slots + store specials + latest blogs
/products Catalog / store items list + search (?q=)
/products/category/[id]/[slug] Category page via GET .../categories/by-id/{id} + products filtered by categoryId
/products/[id]/[slug] Product detail via GET .../products/by-id/{id}
/blog Blog list
/blog/[id]/[slug] Blog detail via GET .../blogs/by-id/{id}
/about About us
/contact Contact us
/meshkee/static-image-slots Slot catalog for the dashboard Refresh button
/meshkee/sitemap-config.json Build-time route manifest for Meshkee sitemap sync
/api/search?q= Instant product search (store-items?name=, min 3 chars)

Homepage order

Hero → Services → اقلام مصرفی → CategoryShowcase → قطعات یخچال → AboutPreview → قطعات ماشین لباسشویی → five-banner (2+3) → BlogCarousel → two-banner-row → Stats → WideBanner → Branches.

Homepage carousels (store specials)

GET /tenants/{domain}/store-specials matched by key:

  1. consumeables — اقلام مصرفی
  2. refrigrator-parts — قطعات یخچال
  3. washing-machine-parts — قطعات ماشین لباسشویی

BRB specials use source: "product" (items may have empty variants[]). Map product fields directly; resolve slug via catalog for detail links. If a special has no items, keep sample products from lib/data.ts.

Products list/search: prefer store-items; if empty, fall back to GET /products catalog.

Catalog

  • Mega menu: full product category tree (unwraps shallow roots like «کالاها»); nested level-4+ links (GET /tenants/{domain}/categories?entityType=product). Links: /products/category/{id}/{nameFaSlug}.
  • Instant search: header input searches products when query length > 2 (/api/search → store-items?name=). Enter or “مشاهده همه” → /products?q=.
  • Product pages are display-only (price, gallery, description, comments). No cart / add-to-cart.
  • Details gallery: product images[].url + thumbnail. Click = lightbox, hover = zoom.
  • Details tabs: description (descriptionHtml) and comments (GET /comments?entityType=product&entityId={productId}). Unauthenticated users see a login box to the customer portal.

Static image slots

GET /tenants/{domain}/website/static-images?pageKey=home. Catalog: GET /meshkee/static-image-slots from STATIC_IMAGE_SLOTS in lib/static-images.ts.

key kind itemCount
slider list null
three-icon-image list 3
categories list null
about-us-image single 1
five-banner-section list 5
two-banner-row list 2
full-row-image single 1
two-branch-image list 2

url → img, linkUrl → wrap in a link, empty/fail → placeholder. Use slot.aspectRatio. If a slot’s size/ratio changes in CSS, update STATIC_IMAGE_SLOTS in the same change.

SEO

  • Do not ship public/sitemap.xml or public/robots.txt (nginx proxies to Meshkee API).
  • Build generates lib/sitemap-config.generated.json (npm run generate:sitemap-config / prebuild); served at GET /meshkee/sitemap-config.json.
  • After deploy: business dashboard → Website → Settings → Sync sitemap config.
  • Detail URLs (Meshkee defaults — omit templates unless customized):
    • Product: /products/{id}/{nameFaSlug} — slugify nameFa (Farsi kept, spaces → -); resolve with products/by-id/{id}. Never use legacy DB slug in public URLs.
    • Category: /products/category/{id}/{nameFaSlug} — categories/by-id/{id} then list products with that categoryId.
    • Blog: /blog/{id}/{titleSlug} — blogs/by-id/{id}.
  • Legacy /products?categoryId= and slug-only detail URLs redirect to the canonical {id}/{slug} form.
  • Live sitemap is an index: /sitemap.xml → /sitemap-main.xml + /sitemap-products.xml (Meshkee/nginx; do not ship static files).
  • Every public page has unique title/description; product/blog prefer CMS fields.

Original business data (do not invent replacements)

About: 30+ years. Sells home appliances, spare parts, and repairs small appliances. Wholesale and retail.

Branches

  1. قم، خیابان سی متری کیوانفر، روبروی داروخانه الهادی
  2. قم، بلوار صدوقی، خیابان امام حسین (ع)، نبش کوچه ۲۱

Phones: 0912-309-3407، 0912-651-7619، 025-36604454، 025-32404070، تلفکس 0253-6638866
Telegram: https://t.me/borgheeibrothers
Email: alirezaborghei20@gmail.com
Map: 34.6564, 50.8696

Local fallbacks

  • Copy / nav / sample products / local blog: lib/data.ts
  • Empty catalog art: /public/placeholders/*.svg
  • Downloaded originals: public/images/