Add guest cart drawer, Continue handoff, and shared customer login.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
ad05241a77
commit
16340c3b48
@@ -0,0 +1,36 @@
|
||||
Build storefront cart UI + Continue handoff + shared customer login for this Meshkee website.
|
||||
## Remote only
|
||||
- Production Meshkee API and live site only — no localhost / local ports.
|
||||
- Customer app: https://customer.<WEBSITE_DOMAIN>
|
||||
- Business app: https://business.<WEBSITE_DOMAIN>
|
||||
Production env:
|
||||
NEXT_PUBLIC_API_BASE_URL=https://api.meshkee.com/api/v1
|
||||
NEXT_PUBLIC_DOMAIN=<WEBSITE_DOMAIN>
|
||||
NEXT_PUBLIC_CUSTOMER_ORIGIN=https://customer.<WEBSITE_DOMAIN>
|
||||
NEXT_PUBLIC_BUSINESS_ORIGIN=https://business.<WEBSITE_DOMAIN>
|
||||
|
||||
|
||||
## Scope
|
||||
Website only. Do not rebuild customer checkout, payment, addresses, or account pages — those are global on customer.<WEBSITE_DOMAIN>.
|
||||
|
||||
|
||||
## Cart UI
|
||||
- Header cart icon + count badge
|
||||
- Popup/drawer: lines, quantity, remove, total, Continue
|
||||
- Cart lines use store item variant id (not product id)
|
||||
- Guest cart: localStorage key meshkee-guest-cart + cookie on .<WEBSITE_DOMAIN>
|
||||
- Guest line: { id, name, slug?, price, quantity, image? } (id = variant id)
|
||||
|
||||
|
||||
## Continue
|
||||
- Logged in → customer.<WEBSITE_DOMAIN>/checkout/cart#guestCart=<base64url JSON>
|
||||
- Guest → customer.<WEBSITE_DOMAIN>/login?redirect=/checkout/cart#guestCart=<base64url JSON>
|
||||
- If no guest lines left, open /checkout/cart without the hash
|
||||
|
||||
|
||||
## Shared session
|
||||
- Cookies: meshkee_customer_access_token / meshkee_customer_refresh_token on .<WEBSITE_DOMAIN> (SameSite=Lax; chunk large tokens)
|
||||
- Hydrate site session from those cookies
|
||||
- ورود → customer login with redirect=/
|
||||
- Logged in: "{firstName} عزیز" menu → profile, orders, logout; “مدیریت وبسایت” only for site admins → business app (handoff when available)
|
||||
Match existing site design. Keep the change limited to cart popup, Continue handoff, and header auth.
|
||||
Reference in New Issue
Block a user