Files
Alireza HassaniandCursor 5909899b1e Initial Next.js clone of Pars Elevator (plift.ir).
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>
2026-09-05 14:55:42 +03:30

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

Auth / account

  • Login / user icon → https://customer.plift.ir (with ?redirect= back to site)
  • Tokens in localStorage: meshkee.accessToken, meshkee.refreshToken
  • Also captures accessToken / refreshToken from URL query/hash after portal redirect
  • Logged-in header shows {name} عزیز + dropdown: پروفایل من · خروج · (admin) مدیریت وبسایت → https://business.plift.ir
  • GET /auth/me + refresh via POST /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 #blog shows latest 3 posts
  • Module enabled on tenant; content may be empty until published in dashboard

SEO

  • Do not ship public/sitemap.xml or public/robots.txt (nginx → Meshkee API).
  • Live sitemap index: /sitemap.xml → /sitemap-main.xml + module sitemaps.
  • GET /meshkee/sitemap-config.json from build-time scan of src/app (scripts/generate-sitemap-config.cjs, runs on prebuild).
  • 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}
  • 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

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

  1. Keep lang="fa" and dir="rtl".
  2. Prefer src/data/site.ts for static copy; live blog/contact/products via Meshkee API.
  3. Reuse CSS variables from globals.css.
  4. Keep Meshkee footer credit.
  5. Do not invent CMS/admin write APIs — website API only.
  6. Update this CONTEXT.md on every Meshkee prompt when scope/integrations change.
  7. Detail URLs: /blog|products|products/category/{id}/{titleSlug} — slugify from FA title, not DB slug.
  8. Never add local sitemap.xml / robots.txt / Next app/sitemap.ts that override Meshkee proxy.

Homepage section map

  1. Hero slider
  2. Intro (info_43)
  3. Features carousel
  4. Engineering (info_65)
  5. Products fancy
  6. Counters — title «پروژه های ما» (43 آسانسور / 12 پله برقی / 32 بالابر / 12 حمل بار)
  7. CTA band
  8. Blog preview (API)

Prompt history

  • basic-clone (de4b8fb6eec585ea637854ac): Initial Next.js RTL clone.
  • homepage / products passes: Match live sections; /products page.
  • 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.