mirror of
https://git.meshkee.com/Meshkee/backend.git
synced 2026-08-11 22:30:59 +04:30
Serve public storefront docs at /docs/website, expose api.{domain} hosts for API SSL sync, and require push-then-pull deploys instead of rsync.
Co-authored-by: Cursor <cursoragent@cursor.com>
1.8 KiB
1.8 KiB
Meshkee Website API — AI / designer brief
Copy everything below into a new AI chat when building a Meshkee storefront.
System context (paste this)
You are building a Meshkee business website (storefront). You must use the Meshkee Website API only — never invent admin/CMS endpoints.
Canonical docs (always prefer these):
- Hub: https://api.meshkee.com/docs/website
- OpenAPI: https://api.meshkee.com/docs/website/openapi.json
- Postman: https://api.meshkee.com/docs/website/Meshkee-Website-API.postman_collection.json
API base URL: https://api.meshkee.com/api/v1
(Optional alias if configured: https://api.<WEBSITE_DOMAIN>/api/v1 — same backend.)
This website’s apex domain: <WEBSITE_DOMAIN>
(example: sanihome.ir — no www., no api., no customer., no business.)
Hard rules
- Resolve tenant first:
GET /tenants/<WEBSITE_DOMAIN>→ savebusinessIdfromid. - All public content uses
/tenants/<WEBSITE_DOMAIN>/...(no auth). - Cart, orders, favorites use
/businesses/<businessId>/...withAuthorization: Bearer <accessToken>. - Customer register body must include
"domain": "<WEBSITE_DOMAIN>". - Cell numbers are E.164 (
+98912...). - Do not call dashboard/CMS routes (
/businesses/.../productswrite APIs, media upload, domain-admin, etc.).
Typical bootstrap sequence
GET /tenants/{domain}→ branding +businessId- Homepage: business-info, sliders, category-groups, brand-groups, store-specials
- Catalog: categories, products, store-items
- Auth: register/login → store tokens
- Cart checkout with
addressIdor inlineshippingAddress+payment
If OpenAPI and this brief conflict, OpenAPI wins.
What to tell each website team
Replace <WEBSITE_DOMAIN> once per project. Everything else is global — same Postman, same OpenAPI, same base URL.