Files
saman-andish/CONTEXT.md
T

50 lines
3.1 KiB
Markdown

# Saman Andish Website Context
## Project
- Persian RTL storefront for Saman Andish, built with Next.js 16, React 19, and TypeScript.
- Apex domain: `samanandish.com`.
- Local design assets live in `public/assets`; local fonts live in `public/fonts`.
- Public routes include `/`, `/about-us`, `/contact-us`, `/products`, canonical product details, and canonical product-category listings.
## Meshkee API
- Canonical documentation: `https://api.meshkee.com/docs/website`
- API base: `https://api.meshkee.com/api/v1`
- Optional client configuration:
- `NEXT_PUBLIC_MESHKEE_API_URL`
- `NEXT_PUBLIC_MESHKEE_DOMAIN`
- `app/lib/meshkee.ts` owns the public static-image contract and homepage fetch.
- The homepage fetches `pageKey=home` once, matches slots by key, and keeps local images whenever the API is unavailable or a slot is empty.
- The same library owns public product/category types, level-two category selection, Persian URL slugs, latest-product fetching, and detail lookups.
- The header product dropdown skips root categories and lists only level-two product categories.
- The homepage latest-machinery section resolves the newest published Meshkee products and links cards to canonical details.
## Homepage Static-Image Slots
- `slider`: unbounded list, `17:5`, recommended width 1920.
- `three-categories`: fixed list of 3, `3:2`, recommended width 900.
- `about-us-images`: fixed list of 2, `1:1`, recommended width 900.
- The dashboard-importable catalog is served by `GET /meshkee/static-image-slots`.
- If a rendered image size or crop ratio changes, update the corresponding catalog entry in `app/meshkee/static-image-slots/route.ts`.
## Sitemap and SEO
- Do not add `public/sitemap.xml`, `public/robots.txt`, `app/sitemap.ts`, or `app/robots.ts`; nginx proxies these URLs to Meshkee.
- `GET /meshkee/sitemap-config.json` is force-generated during the production build by scanning public static `app/**/page.*` routes.
- Auth, account, admin, cart, checkout, dynamic, and Meshkee integration routes are excluded from the static-page config.
- The sitemap base URL uses `NEXT_PUBLIC_SITE_URL`, then `SITE_URL`, with `https://samanandish.com` as the fallback.
- Product, category, blog, and portfolio detail pages must use Meshkee canonical `{id}/{Persian-title-slug}` URLs when those routes are implemented.
- Product details use `/products/{id}/{nameFaSlug}` and resolve with `GET /tenants/samanandish.com/products/by-id/{id}`.
- Category listings use `/products/category/{id}/{nameFaSlug}` and resolve with the category-by-id endpoint before filtering products by `categoryId`.
- Every crawlable page must have unique metadata, exactly one H1, structured H2/H3 headings, and meaningful image alt text.
- After deployment, use Business Dashboard → Website → Settings → Sync sitemap config.
## Verification
- Run `npm run lint`.
- Run `npm run build`.
- Verify `/meshkee/static-image-slots` returns the three slot definitions.
- Verify `/meshkee/sitemap-config.json` lists `/`, `/about-us`, `/contact-us`, and `/products`.
- Verify the header dropdown shows only level-two categories and product cards open canonical detail URLs.