Add website API docs, SSL api-hosts, and git-only deploy workflow.

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>
This commit is contained in:
Alireza Hassani
2026-07-22 21:39:51 +03:30
co-authored by Cursor
parent bb59d5e9ba
commit 016cc15bf0
32 changed files with 6159 additions and 37 deletions
@@ -0,0 +1,37 @@
{
"id": "meshkee-website-api-global",
"name": "Meshkee Website API — Global",
"values": [
{
"key": "baseUrl",
"value": "https://api.meshkee.com/api/v1",
"type": "default",
"enabled": true
},
{
"key": "domain",
"value": "YOUR_WEBSITE_DOMAIN",
"type": "default",
"enabled": true
},
{
"key": "businessId",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "accessToken",
"value": "",
"type": "secret",
"enabled": true
},
{
"key": "refreshToken",
"value": "",
"type": "secret",
"enabled": true
}
],
"_postman_variable_scope": "environment"
}
@@ -1,21 +1,21 @@
{
"info": {
"name": "Meshkee Website API",
"description": "Customer-facing APIs for Meshkee business websites.\n\n**Quick start**\n1. Set `domain` (e.g. shop-a.local) and `baseUrl`\n2. Run **Resolve tenant** saves `businessId`\n3. Run **Login - Customer** or **Register** — saves tokens\n4. Public content: `/tenants/{domain}/...` (no auth)\n5. Cart, orders, favorites: `/businesses/{businessId}/...` (Bearer token)\n\n**Dev seed customer:** +989124444444 / password\n**Dev domain:** shop-a.local (businessId 1)",
"name": "Meshkee Website API (Global)",
"description": "# Meshkee Website API — Global reference for all storefronts\n\nCanonical docs: https://api.meshkee.com/docs/website\n\nThis collection is **not** tied to one business. Every Meshkee website (any domain) uses the same endpoints.\n\n## How multi-tenancy works\n1. Set collection variable `domain` = the **website apex** only (e.g. `example.com`, `sanihome.ir`). Never use `www.` / `api.` / `customer.` / `business.` here.\n2. Set `baseUrl` (see below).\n3. Run **Resolve tenant** saves `businessId`.\n4. Public content: `/tenants/{{domain}}/...` (no auth).\n5. After login: cart / orders / favorites use `/businesses/{{businessId}}/...` with Bearer token.\n\n## baseUrl options (same Nest API)\n- Preferred central: `https://api.meshkee.com/api/v1`\n- Per-site alias (if DNS+SSL configured): `https://api.{{domain}}/api/v1`\n- Local: `http://localhost:3000/api/v1`\n\nTenant is always taken from the **path** (`/tenants/{domain}`), not from the API hostname.\n\n## Auth\n- Public: no header\n- Customer: `Authorization: Bearer {{accessToken}}`\n- Register requires body field `domain` = same website apex\n\n## Not in this collection\nCMS / dashboard / super-admin APIs (staff only).\n",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"variable": [
{
"key": "baseUrl",
"value": "http://localhost:3000/api/v1"
"value": "https://api.meshkee.com/api/v1"
},
{
"key": "domain",
"value": "shop-a.local"
"value": "YOUR_WEBSITE_DOMAIN"
},
{
"key": "businessId",
"value": "1"
"value": ""
},
{
"key": "accessToken",
@@ -27,35 +27,35 @@
},
{
"key": "productId",
"value": "1"
"value": ""
},
{
"key": "productSlug",
"value": "meshkee-x-phone"
"value": ""
},
{
"key": "blogId",
"value": "1"
"value": ""
},
{
"key": "blogSlug",
"value": "how-to-choose-phone"
"value": ""
},
{
"key": "blogCategoryId",
"value": "5"
"value": ""
},
{
"key": "portfolioId",
"value": "1"
"value": ""
},
{
"key": "portfolioSlug",
"value": "phone-launch-campaign"
"value": ""
},
{
"key": "portfolioCategoryId",
"value": "7"
"value": ""
},
{
"key": "storeItemVariantId",
@@ -95,11 +95,11 @@
},
{
"key": "categoryId",
"value": "2"
"value": ""
},
{
"key": "brandId",
"value": "1"
"value": ""
}
],
"item": [
@@ -159,7 +159,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"cellNumber\": \"+989126666666\",\n \"password\": \"password123\",\n \"firstName\": \"New\",\n \"lastName\": \"Customer\",\n \"email\": \"new@example.com\",\n \"domain\": \"{{domain}}\"\n}"
"raw": "{\n \"cellNumber\": \"+98XXXXXXXXXX\",\n \"password\": \"min8chars\",\n \"firstName\": \"First\",\n \"lastName\": \"Last\",\n \"email\": \"optional@example.com\",\n \"domain\": \"{{domain}}\"\n}"
},
"url": "{{baseUrl}}/auth/register"
}
@@ -191,7 +191,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"cellNumber\": \"+989124444444\",\n \"password\": \"password\"\n}"
"raw": "{\n \"cellNumber\": \"+98XXXXXXXXXX\",\n \"password\": \"YOUR_PASSWORD\"\n}"
},
"url": "{{baseUrl}}/auth/login"
}
@@ -1166,6 +1166,13 @@
{
"name": "Homepage",
"item": [
{
"name": "Get business info (website)",
"request": {
"method": "GET",
"url": "{{baseUrl}}/tenants/{{domain}}/website/business-info"
}
},
{
"name": "List category groups (website)",
"request": {
@@ -1664,4 +1671,4 @@
]
}
]
}
}