Initial commit: Alma Beauti Next.js site.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-31 19:00:05 +03:30
co-authored by Cursor
commit 755eb424b2
102 changed files with 10854 additions and 0 deletions
+139
View File
@@ -0,0 +1,139 @@
# Alma Beauti — AI / Project Context
Persian RTL rebuild of **almabeauti.com** (کلینیک تخصصی پوست و زیبایی آلما بیوتی، قم). Keep this file current — other AI tools and later prompts read it first.
## Source of truth
- Live site being cloned: https://www.almabeauti.com/
- Prompt instructions: `Ai-data/prompt.txt`
- Backend / Meshkee Website API: https://api.meshkee.com/docs/website
- Static image slots prompt (later): `Ai-data/prompt-images-slot.txt`
- SEO prompt: `Ai-data/prompt-seo.txt`
- Domain: `almabeauti.com`
## Stack
- Next.js 15 (App Router) + React 19 + TypeScript
- Tailwind CSS v4 (`@import "tailwindcss"` in `src/app/globals.css`) + custom CSS
- Language: `fa`, direction: `rtl`
- Fonts (downloaded from Meshkee CDN into `public/fonts/`):
- `yekan-bakh` (default Persian UI) — Light + Regular
- `montserrat` (English kickers)
## Color palette (from live site CSS vars)
- Primary: `#594AB8` (`--wb-primary-color`)
- Secondary: `#7936FA` (`--wb-secondary-color`)
- Page gray: `#F8F8F8`
- Muted: `#6F6F6F` / `#ACACAC`
- Navbar pill: `#E5E5E5`
## Routes
| Route | Purpose |
|-------|---------|
| `/` | Homepage |
| `/about` | درباره ما (original `/aboutus`) |
| `/contact` | تماس با ما (original `/contactus`) |
| `/services` | خدمات — all 9 services as in-page sections with anchors |
| `/blog` | مقالات (Meshkee blogs API) |
| `/blog/{id}/{titleSlug}` | جزئیات مقاله |
| `/blog/{id}` | Legacy redirect → canonical |
Individual service detail URLs (`/facial`, `/carboxytherapy`, …) still deferred — nav dropdown links to `/services#{slug}`.
## Meshkee API integration
Base: `{NEXT_PUBLIC_MESHKEE_API_BASE}/tenants/{domain}/...`
Helpers: `src/lib/meshkee.ts` → `meshkeeGet`, `tenantPath`, `getTenant`, `getBusinessId`
Tenant: `almabeauti.com` (id `30`, modules: `products`, `blog`, `finance`)
### Blog
- List: `GET /blogs?page=&pageSize=`
- Detail: `GET /blogs/by-id/{id}` (canonical URL `/blog/{id}/{titleSlug}`)
- Legacy redirect: `/blog/{id-or-slug}` → canonical
- Comments: `GET /comments?entityType=blog&entityId={id}`
- Lib: `src/lib/blog.ts`
- Homepage preview: `src/components/ArticlesPreview.tsx` (3 latest posts)
- Title images may be on `c804387.parspack.net` (allowed in `next.config.ts`)
- If API is empty, fall back to static `articles` in `src/data/site.ts`
### Auth / customer portal
- Login icon → `https://customer.almabeauti.com` (`customerPortalUrl` in `src/lib/config.ts`)
- Admin dashboard: `https://business.almabeauti.com`
- Session: `src/lib/session.tsx` + shared cookies (`src/lib/shared-auth-cookie.ts`)
- Shared cookies: `meshkee_customer_access_token` / `meshkee_customer_refresh_token` (storefront + customer portal)
- Profile API proxy: `GET /api/auth/me` → Meshkee `/auth/me`
- Admin handoff: `POST /api/auth/handoff` → Meshkee `/auth/handoff` → `https://business.almabeauti.com`
- Logged-in header: `{name} عزیز`; dropdown: پروفایل من، خروج، مدیریت وبسایت (admins only)
- Component: `src/components/AccountMenu.tsx`
### Favicon
- API: `GET /tenants/{domain}/website/favicon`
- Helper: `src/lib/branding.ts` → `getWebsiteBranding`, `resolveFavicon`
- Current tenant has no dedicated favicon (`hasDedicatedFavicon: false`) → fallback `/favicon.png`
## Original business data (do not invent replacements)
- Phone: `09355036991` (footer `tel:` also used `09195196326` on the old site; display number is `09355036991`)
- Hours: شنبه تا پنجشنبه، ۴ بعد از ظهر تا ۸:۳۰ شب
- Address: بلوار شهید اخلاقی، بین بیست متری گلستان و بلوار شهید مفتح (محله‌ی بکایی)، پلاک ۵
- Instagram: https://www.instagram.com/alma.skincares/
- Telegram: https://t.me/almaskincares
- Map embed: Google Maps iframe in `src/data/site.ts`
## Homepage order
Hero slider → About → Price packages → Services grid (6) → Purple banner → Why Alma → Testimonials → Articles (Meshkee, local fallback) → Contact/map
## Content & assets
- Copy, services, FAQs, phones, address, socials: `src/data/site.ts`
- Logo: `public/images/logo.png` (from live theme)
- Favicon: `public/favicon.png`
- Banners / icons / service photos: `public/images/`
- Fonts: `public/fonts/`
## Footer Meshkee credit
- Bottom row matches https://meshkee.com/ (light bar, framed hover, “Designed And Developed By / Meshkee E-Commerce Team”)
- Component: `src/components/Footer.tsx` → `.meshkee-credit`
- Styles: `src/app/globals.css`
- Links to `https://meshkee.com`
- Logo: `public/images/footer/MeshkeeLogo.png`
## Important paths
- Layout / shell: `src/app/layout.tsx`, `src/components/Providers.tsx`
- Header + account: `src/components/Header.tsx`, `src/components/AccountMenu.tsx`
- Footer: `src/components/Footer.tsx`
- Home: `src/app/page.tsx`, `src/components/HeroSlider.tsx`, `src/components/AboutSection.tsx`
- Hero + About share `container-fluid` (5rem inset ≥992px). About matches the live overlapping layout: vertical purple strip aligned with the slide counter, image overflowing into a white card, dotted grid on the left.
- Blog: `src/app/blog/`, `src/components/ArticlesPreview.tsx`, `src/components/EntityTabs.tsx`
- Config: `src/lib/config.ts`
- Data: `src/data/site.ts`
## Env
```bash
NEXT_PUBLIC_WEBSITE_DOMAIN=almabeauti.com
NEXT_PUBLIC_MESHKEE_API_BASE=https://api.meshkee.com/api/v1
# Optional overrides:
# NEXT_PUBLIC_CUSTOMER_PORTAL_URL=https://customer.almabeauti.com
# NEXT_PUBLIC_BUSINESS_ORIGIN=https://business.almabeauti.com
```
## Commands
```bash
npm install
npm run dev
npm run build
npm run generate:sitemap-config
```
## SEO canonical URLs
- Blog: `/blog/{id}/{titleSlug}` → `GET /blogs/by-id/{id}`
- Slugify helper: `src/lib/seo-slug.ts` (Farsi letters kept, spaces → `-`, punctuation stripped; do not use legacy DB slug in public URLs)
- Page metadata helper: `src/lib/seo.ts` → `pageMetadata()` (absolute title, description, canonical, Open Graph, Twitter)
- Exactly one `<h1>` per page (homepage: visually hidden brand in hero; inner pages: `PageHero`)
- Content images use meaningful `alt` (CMS title when available)
## Sitemap + robots
- **Do not** add `public/sitemap.xml` or `public/robots.txt` (nginx proxies to Meshkee API)
- Live sitemap index: `/sitemap.xml` → `/sitemap-main.xml` + CMS URLs
- Static pages config: `GET /meshkee/sitemap-config.json`
- Generated at build: `scripts/generate-sitemap-config.mjs` → `src/lib/sitemap-config.generated.json`
- Run manually: `npm run generate:sitemap-config`
- After deploy: business dashboard → Website → Settings → Sync sitemap config
## Next planned prompts
1. Wire static image slots (`Ai-data/prompt-images-slot.txt`)