RTL Meshkee storefront with home/about/contact/products/blog, API auth/contact/blog wiring, and SEO sitemap-config. Co-authored-by: Cursor <cursoragent@cursor.com>
5.6 KiB
5.6 KiB
CONTEXT — Plift (آسانسور پارس)
Clone of plift.ir rebuilt in Next.js 15 (App Router) for Meshkee.
Brand
| Key | Value |
|---|---|
| Name (FA) | آسانسور پارس |
| Name (EN) | Pars Elevator |
| Apex domain | plift.ir |
| Lang / Dir | fa / rtl |
| Font | IranYekan (public/fonts/*.ttf) |
| Primary | #5932FF |
| Secondary | #4B4B4B |
| Tertiary | #9A0000 |
| Accent (ochre) | #C3964E |
| Dark | #232323 / #0E0E0E |
| Light | #F6F6F6 |
Meshkee API
- Docs: https://api.meshkee.com/docs/website
- OpenAPI: https://api.meshkee.com/docs/website/openapi.json
- Base:
https://api.meshkee.com/api/v1 - Tenant:
GET /tenants/plift.ir→businessId39 - Config:
src/lib/config.ts(DOMAIN,API_BASE,CUSTOMER_URL,BUSINESS_URL) - Client helpers:
src/lib/api.ts,src/lib/meshkee.ts
Auth / account
- Login / user icon →
https://customer.plift.ir(with?redirect=back to site) - Tokens in
localStorage:meshkee.accessToken,meshkee.refreshToken - Also captures
accessToken/refreshTokenfrom URL query/hash after portal redirect - Logged-in header shows
{name} عزیز+ dropdown: پروفایل من · خروج · (admin) مدیریت وبسایت →https://business.plift.ir GET /auth/me+ refresh viaPOST /auth/refresh
Contact
POST /tenants/plift.ir/contact-submissions{ title, name, email?, cellNumber?, text }- UI: toast + success text + form reset (
ContactForm)
Blog
- List:
GET /tenants/plift.ir/blogs - Detail:
GET /tenants/plift.ir/blogs/by-id/{id} - Routes:
/blog,/blog/{id}/{titleSlug} - Homepage
#blogshows latest 3 posts - Module enabled on tenant; content may be empty until published in dashboard
SEO
- Do not ship
public/sitemap.xmlorpublic/robots.txt(nginx → Meshkee API). - Live sitemap index:
/sitemap.xml→/sitemap-main.xml+ module sitemaps. GET /meshkee/sitemap-config.jsonfrom build-time scan ofsrc/app(scripts/generate-sitemap-config.cjs, runs onprebuild).- Output:
src/generated/sitemap-config.json(static routes only; no auth/cart/admin). - After deploy: dashboard → Website → Settings → Sync sitemap config.
- Canonical detail URLs (title slugify; never legacy DB slug):
- Blog:
/blog/{id}/{titleSlug} - Product:
/products/{id}/{nameFaSlug} - Category:
/products/category/{id}/{nameFaSlug}
- Blog:
- On-page: unique title + meta description per page; exactly one H1; CMS body H1 demoted to H2; content images have meaningful
alt.
Scope
Implemented pages:
/— homepage/about-us— about/contact-us— contact (+ Google Map + API form)/products— products marketing catalog/products/[id]/[slug]— Meshkee product detail (API)/products/category/[id]/[slug]— product category (API)/blog— blog list (API)/blog/[id]/[slug]— blog detail (API)
Still stubbed / not full Meshkee modules: cabin selector, quality control pages (nav still points to products/about). Portfolio routes omitted (module not enabled).
Source of truth
- Live site:
https://www.plift.ir - Assets from Meshkee template CDN (
plift_kltGhf0Zol) - Logo:
public/images/logo.png/logo-footer.png - Meshkee footer credit like safeteb.com (
MeshkeeCredit)
Contact data
- Address: قم ، بلوارصدوقی ، نبش کوچه ۵۷ ، پلاک ۳
- Support: ۰۲۵-۳۲۹۴۴۴۴۵
- Mobile: آقای هدایتی ۰۹۱۰۲۰۴۱۶۱۲ / آقای بلاغی ۰۹۱۲۷۴۹۸۳۵۷
- Telegram: https://t.me/plift
- Eitaa: https://eitaa.com/parslift
- Customer portal: https://customer.plift.ir
- Business dashboard: https://business.plift.ir
Project layout
src/
app/ # pages + meshkee/sitemap-config.json route
components/ # Header, Footer, Auth, Toast, BlogCard, forms, …
data/site.ts # Copy / nav / products / counters
generated/ # sitemap-config.json (build-generated)
lib/ # api, meshkee, auth helpers, format, config
scripts/
generate-sitemap-config.cjs
public/
fonts/ images/ # no sitemap.xml / robots.txt
CONTEXT.md
Commands
npm install
npm run generate:sitemap-config
npm run dev # http://localhost:3000
npm run build # runs prebuild → sitemap-config then next build
Conventions for next AI / prompts
- Keep
lang="fa"anddir="rtl". - Prefer
src/data/site.tsfor static copy; live blog/contact/products via Meshkee API. - Reuse CSS variables from
globals.css. - Keep Meshkee footer credit.
- Do not invent CMS/admin write APIs — website API only.
- Update this
CONTEXT.mdon every Meshkee prompt when scope/integrations change. - Detail URLs:
/blog|products|products/category/{id}/{titleSlug}— slugify from FA title, not DB slug. - Never add local
sitemap.xml/robots.txt/ Nextapp/sitemap.tsthat override Meshkee proxy.
Homepage section map
- Hero slider
- Intro (
info_43) - Features carousel
- Engineering (
info_65) - Products fancy
- Counters — title «پروژه های ما» (43 آسانسور / 12 پله برقی / 32 بالابر / 12 حمل بار)
- CTA band
- Blog preview (API)
Prompt history
- basic-clone (
de4b8fb6eec585ea637854ac): Initial Next.js RTL clone. - homepage / products passes: Match live sections;
/productspage. - backend (
0ad11f82dc4cbebf9e7c9c73): Customer portal auth UI; blog list/detail via API; contact form → contact-submissions + toast; CONTEXT updated. - seo (
18c6ecc67d4a93eb2d7ae277): Build-time sitemap-config; product/category SEO routes; on-page title/description/H1/alts; no local sitemap/robots.