Files
salar-store/Ai-data/CONTEXT.md
T
Alireza HassaniandCursor 49b83223f1 Wire homepage banners to Meshkee static-image slots.
Publish a slot catalog so the dashboard can import keys, and keep local placeholders when a slot is empty.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 17:54:10 +03:30

45 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Salar Store — AI context
Persian RTL storefront for **salarstore.com**. Next.js App Router. Do not invent Meshkee admin/upload APIs.
## Meshkee
- Apex domain: `salarstore.com`
- API: `https://api.meshkee.com/api/v1` (`NEXT_PUBLIC_API_BASE_URL`)
- Tenant: `GET /tenants/salarstore.com` → `businessId`
- Public content: `/tenants/salarstore.com/...` (no auth)
- Customer app: `https://customer.salarstore.com`
- Business app: `https://business.salarstore.com`
Docs: https://api.meshkee.com/docs/website
## Static image slots
Dashboard-replaceable homepage images. Fetch `GET /tenants/salarstore.com/website/static-images?pageKey=home`. Empty/fail → keep local placeholders.
The business dashboard **Refresh** button imports keys from:
`GET https://salarstore.com/meshkee/static-image-slots`
Source of truth: `lib/static-images.ts` (`STATIC_IMAGE_SLOT_CATALOG`).
| key | kind | itemCount | aspectRatio | where |
| --- | --- | --- | --- | --- |
| `slider` | list (duplicatable) | unbounded | `21:8` | Homepage hero |
| `banners-below-slider` | list | 2 | `13:5` | Two tiles under the slider |
| `categories` | list (duplicatable) | unbounded | `1:1` | Category row |
| `four-banner-section` | list | 4 | `21:9` | 2×2 banner grid |
| `three-banner-row` | list | 3 | `12:5` | Three-up row |
| `about-us-image` | single | 1 | `8:5` | Home about block + `/aboutus` hero |
Rules:
- Use `slot.images` (all if `kind=list`, first if `kind=single`). `url` → `<img src>`. `linkUrl` → wrap in `<a>`.
- Apply `slot.aspectRatio` from the API on the rendered frame.
- **If a slot’s on-page size or aspect ratio changes, update `STATIC_IMAGE_SLOT_CATALOG` (`aspectRatio` + `recommendedWidth`) in the same change** so the dashboard cropper stays in sync.
- Do not add upload/CMS endpoints on this website.
## Cart + customer session
Guest cart key `meshkee-guest-cart` (localStorage + cookie on `.salarstore.com`). Line `id` is the **store item variant id**. Continue hands off to `https://customer.salarstore.com/checkout/cart#guestCart=...` (guests go via login with that hash inside `redirect`). Shared cookies: `meshkee_customer_access_token` / `meshkee_customer_refresh_token`.