Files
backend/docs/website-api/index.html
T
Alireza HassaniandCursor 016cc15bf0 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>
2026-07-22 21:39:51 +03:30

110 lines
3.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Meshkee Website API</title>
<style>
:root {
--bg: #0f1419;
--panel: #1a222c;
--text: #e8eef4;
--muted: #9aa8b5;
--accent: #3d9cf0;
--line: #2a3542;
}
* { box-sizing: border-box; }
body {
margin: 0;
font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
background: radial-gradient(1200px 600px at 10% -10%, #1b3a57 0%, var(--bg) 55%);
color: var(--text);
line-height: 1.55;
}
main {
max-width: 760px;
margin: 0 auto;
padding: 3rem 1.25rem 4rem;
}
h1 { font-size: 2rem; margin: 0 0 0.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1.15rem; margin: 2rem 0 0.75rem; }
p, li { color: var(--muted); }
strong { color: var(--text); }
code {
font-family: "IBM Plex Mono", ui-monospace, monospace;
background: #0b1015;
padding: 0.1rem 0.35rem;
border-radius: 4px;
color: #cde3f7;
font-size: 0.92em;
}
.panel {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 12px;
padding: 1rem 1.1rem;
margin: 1rem 0;
}
a.btn {
display: inline-block;
margin: 0.35rem 0.5rem 0.35rem 0;
padding: 0.65rem 1rem;
border-radius: 8px;
background: var(--accent);
color: #061018;
text-decoration: none;
font-weight: 600;
}
a.btn.secondary {
background: transparent;
color: var(--text);
border: 1px solid var(--line);
}
.eyebrow { color: var(--accent); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
</style>
</head>
<body>
<main>
<div class="eyebrow">Meshkee · Global storefront contract</div>
<h1>Website API</h1>
<p>
One API for <strong>every</strong> Meshkee business website. Not tied to a single domain.
Set your sites apex host (e.g. <code>sanihome.ir</code>) and reuse the same endpoints.
</p>
<div class="panel">
<p style="margin:0 0 0.75rem"><strong>Global links</strong> (share these with designers &amp; AI tools):</p>
<a class="btn" href="./openapi.json">OpenAPI JSON</a>
<a class="btn secondary" href="./Meshkee-Website-API.postman_collection.json">Download Postman</a>
<a class="btn secondary" href="./AI_PROMPT.md">AI prompt</a>
</div>
<h2>Base URL</h2>
<p><code>https://api.meshkee.com/api/v1</code></p>
<p>Optional per-site alias (same backend): <code>https://api.&lt;domain&gt;/api/v1</code></p>
<h2>How tenants work</h2>
<ol>
<li>Variable <code>domain</code> = website apex only (no <code>www</code>/<code>api</code>/<code>customer</code>/<code>business</code>).</li>
<li><code>GET /tenants/{domain}</code><code>businessId</code>.</li>
<li>Public pages: <code>/tenants/{domain}/...</code> (no auth).</li>
<li>Cart / orders / favorites: <code>/businesses/{businessId}/...</code> + Bearer JWT.</li>
</ol>
<h2>For a new website AI / designer</h2>
<ol>
<li>Open <a href="./AI_PROMPT.md">AI_PROMPT.md</a> and paste it into the AI chat.</li>
<li>Replace <code>&lt;WEBSITE_DOMAIN&gt;</code> with that sites apex.</li>
<li>Import the Postman collection (set <code>domain</code>, run Resolve tenant).</li>
<li>Or feed <code>openapi.json</code> to the AI / codegen tool.</li>
</ol>
<h2>Import Postman</h2>
<p>
Postman → Import → Link → paste<br />
<code>https://api.meshkee.com/docs/website/Meshkee-Website-API.postman_collection.json</code>
</p>
</main>
</body>
</html>