docs(skill): swagger now reachable on the public domain (frontend rewrite)

This commit is contained in:
yeuimu
2026-09-23 05:39:01 +00:00
parent c5e291a7cf
commit 20c1e48193
2 changed files with 6 additions and 6 deletions
@@ -15,7 +15,7 @@ Two origins — pick by where you run:
| Origin | API (`/api/*`) | Swagger (`/docs`, `/docs-json`) |
|---|---|---|
| Public domain, e.g. `https://table.inkreach.cc` | ✅ works (proxied to backend) | ❌ 404 — frontend does NOT proxy swagger paths |
| Public domain, e.g. `https://table.inkreach.cc` | ✅ works (proxied to backend) | ✅ works (frontend rewrite, since 2026-09-23) |
| Backend origin, e.g. `http://localhost:3003` (reference deployment) | ✅ | ✅ |
```bash
@@ -165,15 +165,15 @@ const res = await fetch(triggerInput._apiBaseUrl + "/api/table/tblB/record", {
The backend exposes **~362 paths**; this guide documents the
agent-operational core (what the CLI wraps). The authoritative full spec is
the live OpenAPI JSON — but it is only served on the **backend origin** (the
public domain 404s it):
the live OpenAPI JSON — served on the backend origin, and on the public
domain via the frontend rewrite (`/docs`, `/docs-json`; verified 2026-09-23):
```bash
# works ONLY when BASE is the backend origin (e.g. http://localhost:3003):
curl -s "$BASE/docs-json" | python3 -c "import json,sys; [print(m.upper(), p) for p,o in json.load(sys.stdin)['paths'].items() for m in o]"
# browsable UI: $BASE/docs
# from any other machine, reach the backend origin via an ssh tunnel:
# deployments WITHOUT that rewrite: docs-json only exists on the backend
# origin — reach it via an ssh tunnel from other machines:
ssh -L 3003:localhost:3003 <backend-host> # then use http://localhost:3003/docs-json
```
@@ -8,7 +8,7 @@ endpoint/ports for your own deployment.
| Service | URL / Port | Mode | Purpose |
|---------|-----------|------|---------|
| Public domain | `https://table.inkreach.cc` | — | Frontend UI + `/api/*` proxied to backend; swagger (`/docs`, `/docs-json`) NOT proxied (404) — use the backend origin for those |
| Public domain | `https://table.inkreach.cc` | — | Frontend UI + `/api/*` and `/docs`+`/docs-json` proxied to backend (frontend next.config.js rewrites, since 2026-09-23) |
| Backend API | `http://localhost:3003` | production (`NODE_ENV=production`) | REST API, automation engine, websocket, swagger `/docs` + `/docs-json` |
| Frontend | `http://localhost:3002` | production | End-user web UI (Next.js) |
| PostgreSQL | `localhost:5432` | — | Database (db: `teable`, user: `teable`) |