- New shared SVG icon set (src/components/ui/icons.tsx): Menu, User,
Cart, Close, ChevronLeft — replaces emoji (☰ 👤🛒 ✕) across the
header, and the literal "←" text arrow on every "view more"-style
link (SectionTitle's action, the mega-menu link, BlogCarousel's
"ادامه مطلب").
- Header desktop account/cart area redesigned as a borderless chip:
cart icon button (right) + divider + account icon-badge/two-line
"حساب کاربری / ورود/ثبتنام" (left), matching a supplied reference.
Got the RTL DOM order backwards on the first pass (cart needs to be
first in DOM to render rightmost) and corrected it.
- Header logo: -10px (was already doubled from an earlier request).
- Footer: background is now bg-[#9a21291a] (exact hex given, not a
token substitute) with black text throughout instead of solid
dark-red/white; footer logo doubled; the meshkee-credit logo gets
brightness-0 so the white source asset stays visible on the new
light background.
- Fixed a real layout bug: <main> had no flex-1, so on any page
shorter than the viewport the footer stuck to the content instead of
the bottom of the screen, leaving a gap of bare background beneath
it. Standard sticky-footer flex fix.
- CONTEXT.md: documented the icon set, the account/cart chip's RTL DOM
ordering (to stop this regressing again), and the footer's new
color scheme + the flex-1 fix.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Per api.meshkee.com/docs/website/AI_PROMPT.md's hard rules (which an
earlier pass on this branch missed): login, register, OTP, the real
cart, addresses, and payment are the customer dashboard's job
(customer.sanihome.ir), not this storefront's. This site should only
ever run a local guest mini-cart and hand off to the dashboard.
- Remove: AuthContext, LoginModal, lib/auth.ts, lib/cart.ts (the real
/businesses/{id}/cart integration), and the /checkout page entirely.
- Add lib/guestCart.ts: localStorage + shared cookie
(meshkee-guest-cart, Domain=.sanihome.ir) cart, storeItemVariantId
keyed, matching the spec's line shape and ~3500-char cookie-size
cutoff.
- CartContext is now a thin React wrapper over the guest cart (no
server round-trip, so add/update/remove are synchronous); CartPopup's
"Continue" builds the exact customer.sanihome.ir/checkout/cart
(or /login?redirect=...) URL from the spec, base64url-encoding the
cart and detecting an existing dashboard session via the shared
meshkee_customer_access_token cookie.
- ProductCard and ProductPurchasePanel add to the guest cart directly;
no login gate on add-to-cart anymore.
- Comments panel is a plain guest name/email/text form again (the
comments API never required auth — gating it on the now-removed
login system was wrong regardless).
- CONTEXT.md rewritten to document the guest-cart contract explicitly
and flag this exact mistake so it doesn't get reintroduced.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Real in-site login/register (password + SMS OTP) against Meshkee's
/auth API, with self-healing access-token refresh (15 min lifetime) and
an in-flight-refresh guard so AuthContext and CartContext don't race
each other into a failed concurrent refresh.
- Real cart: header cart button/badge, a cart popup, and a working
"add to cart" on both product cards (where a specific variant id is
known) and the product/store-item detail buy-box (always resolves a
purchasable variant, even for single-SKU products with no selectable
variation).
- /checkout: address + cash/bank-transfer payment, posts to the real
checkout API and creates an order; refreshes the cart afterward so the
header badge doesn't go stale.
- New /store-items and /store-items/[id] pages (variant-level browsing,
separate from the product-level /products catalog), cross-referencing
the parent product for images/description/technical-info.
- Product gallery: click-to-open fullscreen lightbox alongside the
existing hover-zoom.
- Comments tab wired to the real comments API, gated to logged-in users
(a product decision — the API itself doesn't require auth) with a
login prompt otherwise.
- Similar-products row on product/store-item detail pages.
- Contact page wired to the real contact-submissions API, with a toast
and inline confirmation on success, and the form resetting.
- CONTEXT.md: a maintained architecture/conventions doc for this repo,
now auto-loaded via CLAUDE.md, covering the Meshkee integration quirks
and UI conventions established across this project.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>