Connect homepage image slots and favicon to the API, add sitemap config and page metadata, and implement header login with profile/admin dropdown. Co-authored-by: Cursor <cursoragent@cursor.com>
2.7 KiB
2.7 KiB
Safeteb — Meshkee website context
Next.js storefront for safeteb.com (RTL, Persian). Uses the Meshkee Website API for CMS-managed static images and favicon.
Environment
| Variable | Purpose |
|---|---|
NEXT_PUBLIC_DOMAIN or NEXT_PUBLIC_WEBSITE_DOMAIN |
Apex domain (safeteb.com) |
NEXT_PUBLIC_API_BASE_URL or NEXT_PUBLIC_MESHKEE_API_BASE |
API base (https://api.meshkee.com/api/v1) |
NEXT_PUBLIC_CUSTOMER_DASHBOARD_URL |
Customer portal URL |
Meshkee integration
Static images
- Fetch:
GET /tenants/safeteb.com/website/static-images?pageKey=home - Catalog (dashboard refresh):
GET /meshkee/static-image-slots - Implementation:
src/lib/static-images.ts+ homepage insrc/app/page.tsx
Homepage slot keys (match by key):
| Key | Section | Kind | Count |
|---|---|---|---|
slider |
Hero slider | list (duplicatable) | — |
four-icon |
Hero quick links | list | 4 |
two-banner |
Hero promo row | list | 2 |
online-program-banner |
Online program image | single | 1 |
four-link-icon |
Services icons | list | 4 |
medical-plants-banner |
Medicinal plants image | single | 1 |
two-banner (2nd occurrence) |
Lower promo row | list | 2 |
about-us-banner |
About section image | single | 1 |
Rules:
- Use
slot.images— all images ifkind=list, first ifkind=single. url→<img src>.linkUrl→ wrap in<a>.- Empty slot or API failure → keep local placeholder from
public/images/. - Use
slot.aspectRatiofrom API; catalog ratios inSTATIC_IMAGE_SLOTSmust stay in sync when layout changes.
Favicon
- Fetch:
GET /tenants/safeteb.com/website/favicon→{ faviconUrl, logoUrl, ... } - Layout:
src/app/layout.tsxusesfaviconUrlwhen set; otherwise/favicon.png.
SEO + sitemap
- Do not ship
public/sitemap.xmlorpublic/robots.txt— nginx proxies both to the Meshkee API. - Sitemap config:
GET /meshkee/sitemap-config.json(generated at build viascripts/generate-sitemap-config.mjs). - On-page SEO: unique title + meta description per page (
src/lib/seo.ts), one H1 per page, meaningful imagealttext. - After deploy: business dashboard → Website → Settings → Sync sitemap config.
Pages
/— Home (static-image slots wired)/about— About/contact— Contact
AI prompt reference
Latest images-placeholder prompt:
https://api.meshkee.com/api/v1/public/ai-prompts/safeteb/images-placeholder/67da3a9c5a81b4c50d53768c
Latest SEO prompt:
https://api.meshkee.com/api/v1/public/ai-prompts/safeteb/seo/52c03d5a636374e28da417cd
Docs
- Meshkee Website API: https://api.meshkee.com/docs/website
- OpenAPI: https://api.meshkee.com/docs/website/openapi.json