Files

5.2 KiB
Raw Permalink Blame History

Hoomat Store Context

Current Prompt

Source prompt: https://api.meshkee.com/api/v1/public/ai-prompts/hoomat-store/images-placeholder/28488577c9163eaa8fdb8e86

Goal: wire homepage/about static-image slots from Meshkee (GET /tenants/hoomatstore.com/website/static-images) and publish the slot catalog at /meshkee/static-image-slots. Empty/fail → keep local placeholders.

Previous prompts:

  • Backend: …/backend/114f70b804d97953f91ad26a (API auth/cart/store/blog/contact)
  • Basic create: …/basic-create/d3ca3d1229f0e5c8e532b073 (Persian RTL flat-design clone)

Meshkee Backend

  • Docs: https://api.meshkee.com/docs/website
  • OpenAPI: https://api.meshkee.com/docs/website/openapi.json
  • API base: https://api.meshkee.com/api/v1
  • Apex domain: hoomatstore.com (business id currently 35)
  • Customer app: https://customer.hoomatstore.com
  • Business admin: https://business.hoomatstore.com
  • Tenant resolve: GET /tenants/hoomatstore.com
  • Public content: /tenants/hoomatstore.com/...
  • Cart/orders: /businesses/{businessId}/... with Bearer JWT
  • Auth token keys (localStorage): meshkee_customer_access_token, meshkee_customer_refresh_token
  • Guest cart key: meshkee-guest-cart
  • Cart continue: authenticated users go to customer.hoomatstore.com/checkout/cart; guests go to customer login with redirect=/checkout/cart and optional #guestCart= payload (Meshkee customer dashboard handoff)

Static image slots

Catalog source: lib/meshkee/static-slots.ts → GET /meshkee/static-image-slots

key kind pageKey count UI
slider list home n homepage hero
categories-icon list home 6 quick category icons
special-sale-banner single home 1 sale promo beside product carousel
product-features-image single home 1 features sofa
contactus-image single home 1 homepage contact guarantee panel
two-banner-row list home 2 dual promo banners
aboutus-image single home 1 homepage about panel
three-banner-row list home 3 triple promo banners
about-us-image list about 2 about page panels

Rules: use slot.images (all if list, first if single); url → img/bg; linkUrl → wrap link; map titleFa / titleEn / subtext to UI; if UI aspect/size changes, update the catalog. Cursor rule: .cursor/rules/static-image-slots.mdc.

Source Website Data

  • Main site: https://www.hoomatstore.com/
  • About page: https://www.hoomatstore.com/about-us
  • Contact page: https://www.hoomatstore.com/contactus
  • Footer inspiration for bottom Meshkee row: https://safeteb.com/

Design Requirements

  • Language: Persian (fa)
  • Direction: RTL
  • Framework: Next.js app router
  • Style: flat design, furniture-store feel, responsive layout
  • Header: fixed with blurry/translucent background; stronger glass after scroll
  • Header now includes user menu, cart icon/badge + drawer, and products mega menu (1st + 2nd category levels)
  • Palette:
    • Primary: #00234B
    • Secondary: #CC9966
    • Tertiary: #883F3F
  • Fonts: Iran Sans (FA), Josefin Sans (EN titles), Montserrat fallback
  • Logo local fallback: public/assets/hoomat-logo.png
  • Favicon: from GET /tenants/{domain}/website/favicon when available; otherwise local logo

Implemented Routes

  • / homepage (static-image slots + local fallbacks; product carousels still sample)
  • /about-us (about-us-image ×2 + local fallbacks)
  • /contactus (contact form posts to Meshkee contact-submissions)
  • /store store-items listing
  • /store/[variantId]/[[...slug]] store item detail
  • /blog blog listing
  • /blog/[id]/[slug] blog detail
  • /meshkee/static-image-slots slot catalog JSON for Meshkee dashboard

Auth / Cart UX

  • Logged out user icon → customer login
  • Logged in: {firstName} عزیز with dropdown: پروفایل من, خروج, and مدیریت وبسایت (admins only, handoff to business app)
  • Cart badge shows total quantity; drawer continue follows Meshkee customer checkout flow above

Key Code Locations

  • API client: lib/meshkee/api.ts (getStaticImages, getStaticImageSlot)
  • Slot catalog/helpers: lib/meshkee/static-slots.ts
  • Slot UI helpers: app/components/slot-media.tsx
  • Config/domain: lib/meshkee/config.ts
  • Auth/cart/toast providers: app/providers/*
  • Header + cart drawer + mega menu: app/components/header.tsx and related components
  • Shared static homepage content still in lib/site-data.ts
  • Global styles: app/globals.css

Data Notes

  • Store-items for this tenant may be empty until inventory is published; blogs/categories are live.
  • Static-images for this tenant may be empty until CMS slots are filled; UI keeps local placeholders.
  • Product description/gallery/technical/comments for a store variant come from the linked catalog product (productId).
  • Homepage carousels still use local sample products until a later prompt wires them to API.

Maintenance Notes

  • Update this file on every Meshkee prompt.
  • Prefer Meshkee Website API docs over inventing CMS/admin endpoints.
  • Keep RTL/FA patterns and existing visual language when adding pages.
  • When UI image size/aspect changes, update STATIC_IMAGE_SLOT_CATALOG so /meshkee/static-image-slots stays correct.