hostinger-api-mcp 4.3.0 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/gemini-extension.json +1 -1
  3. package/package.json +1 -1
  4. package/server.json +2 -2
  5. package/skills/headless/SKILL.md +55 -13
  6. package/skills/headless/VERSION +3 -3
  7. package/skills/headless/run-log.mjs +3 -5
  8. package/skills/headless/steps/01-check-state/SKILL.md +16 -5
  9. package/skills/headless/steps/02-refine/SKILL.md +56 -29
  10. package/skills/headless/steps/03-provision/SKILL.md +24 -27
  11. package/skills/headless/steps/03-provision/pocketbase/SKILL.md +190 -0
  12. package/skills/headless/steps/04-content-model/SKILL.md +50 -13
  13. package/skills/headless/steps/04-content-model/pocketbase/SKILL.md +90 -0
  14. package/skills/headless/steps/04-content-model/pocketbase/auth.md +52 -0
  15. package/skills/headless/steps/04-content-model/pocketbase/frontend.md +130 -0
  16. package/skills/headless/steps/04-content-model/pocketbase/patterns.md +286 -0
  17. package/skills/headless/steps/04-content-model/pocketbase/rules.md +66 -0
  18. package/skills/headless/steps/04-content-model/pocketbase/schema.example.json +65 -0
  19. package/skills/headless/steps/04-content-model/pocketbase/schema.md +78 -0
  20. package/skills/headless/steps/04-content-model/pocketbase/scripts/pb-apply-schema.mjs +245 -0
  21. package/skills/headless/steps/04-content-model/pocketbase/scripts/pb-lib.mjs +120 -0
  22. package/skills/headless/steps/04-content-model/pocketbase/scripts/pb-verify.mjs +127 -0
  23. package/skills/headless/steps/04-content-model/pocketbase/troubleshooting.md +55 -0
  24. package/skills/headless/steps/05-design/SKILL.md +7 -5
  25. package/skills/headless/steps/06-frontend/SKILL.md +32 -33
  26. package/skills/headless/steps/07-validate/SKILL.md +8 -2
  27. package/skills/headless/steps/08-deploy/SKILL.md +32 -17
  28. package/skills/headless/steps/09-done/SKILL.md +20 -3
  29. package/skills/headless/wait.mjs +19 -9
  30. package/src/core/skills.js +117 -40
  31. package/src/core/skills.ts +117 -40
  32. package/src/servers/agency-hosting.js +1 -1
  33. package/src/servers/agency-hosting.ts +1 -1
  34. package/src/servers/agent-readiness.js +1 -1
  35. package/src/servers/agent-readiness.ts +1 -1
  36. package/src/servers/all.js +1 -1
  37. package/src/servers/all.ts +1 -1
  38. package/src/servers/billing.js +1 -1
  39. package/src/servers/billing.ts +1 -1
  40. package/src/servers/dns.js +1 -1
  41. package/src/servers/dns.ts +1 -1
  42. package/src/servers/domains.js +1 -1
  43. package/src/servers/domains.ts +1 -1
  44. package/src/servers/ecommerce.js +1 -1
  45. package/src/servers/ecommerce.ts +1 -1
  46. package/src/servers/gpu.js +1 -1
  47. package/src/servers/gpu.ts +1 -1
  48. package/src/servers/horizons.js +1 -1
  49. package/src/servers/horizons.ts +1 -1
  50. package/src/servers/hosting.js +1 -1
  51. package/src/servers/hosting.ts +1 -1
  52. package/src/servers/mail.js +1 -1
  53. package/src/servers/mail.ts +1 -1
  54. package/src/servers/reach.js +1 -1
  55. package/src/servers/reach.ts +1 -1
  56. package/src/servers/vps.js +1 -1
  57. package/src/servers/vps.ts +1 -1
  58. package/src/servers/wordpress.js +1 -1
  59. package/src/servers/wordpress.ts +1 -1
  60. package/skills/headless/steps/03-provision/webapp/SKILL.md +0 -164
@@ -15,26 +15,13 @@ workspace `~/.hostinger/<domain>/src/`.
15
15
  > When it is **Bring your own frontend**, follow [`bring-your-own-frontend.md`](bring-your-own-frontend.md): wire the user's own project to the
16
16
  > backend instead of scaffolding one. When it is **Agent designs and builds**, proceed normally.
17
17
 
18
- > ## ⚠️ Webapp backend? Read this first
19
- > A `webapp` brief has **no CMS/store and no `content-model.md`** — the app owns its own data (its own
20
- > API, or the MySQL database recorded in `site.json → database`). It comes in two shapes, decided back in
21
- > **refine**:
22
- >
23
- > - **An existing app under Build mode "Bring your own frontend"** (refine routes "deploy my app" here). **Use their
24
- > project as the source** — copy/point `~/.hostinger/<domain>/src/` at it and keep its own framework and
25
- > UI. **Do not scaffold a new project, and do not re-implement `design.md` over it** (so **the design
26
- > step does not apply** to an app that brings its own UI). Your job is only to make it deployable: set
27
- > `engines.node` to `22`, remove any `.htaccess`, wire its data/env, then hand off to deploy. **Skip the
28
- > Step 2 design pass**, and ignore the `content-model.md` requirement in Step 3.
29
- > - **A new app built from the brief.** Scaffold and build it from `brief.md` (and `design.md` if the
30
- > design step produced one — design *does* run for a from-scratch app). Its data is owned by the app, so
31
- > there is still **no `content-model.md`** to bind against. An existing app under **Build mode "Agent
32
- > designs and builds"** takes this shape too, but starts from its source: copy the project at
33
- > `brief.md` → **Existing project** into `~/.hostinger/<domain>/src/`, keep its framework, screens,
34
- > features and data wiring, and rebuild its UI to `design.md` instead of scaffolding a new project.
35
- >
36
- > Framework choice (Step 1), the build, and hand-off (Step 4) apply to both. The per-backend bullets in
37
- > Step 3 are **WordPress / WooCommerce / Ecommerce only** — for a webapp follow the Webapp bullet there.
18
+ > **PocketBase backend?** A `pocketbase` brief has **no CMS/store**: the app's data lives in the
19
+ > PocketBase backend recorded in `site.json → pocketbase`, its collections in `pocketbase/schema.json`
20
+ > (and the `## Data` section of `content-model.md`), and its fixed copy in `content-model.md`. A new
21
+ > app is scaffolded from `brief.md` and `design.md` and binds its forms and views to the collections
22
+ > in `pocketbase/schema.json`; an existing app under **Agent designs and builds** starts from its
23
+ > source, keeps its screens and features, wires its data to the backend and rebuilds its UI to
24
+ > `design.md`. In Step 3 follow the PocketBase bullet.
38
25
 
39
26
  ## Step 1 — Pick the framework (guess → default → confirm)
40
27
 
@@ -45,10 +32,13 @@ it, and the backend constraint:
45
32
  Next.js is the default, not a requirement (Express, Nuxt, SvelteKit, etc. are all fine).
46
33
  - **WordPress + WooCommerce → SSR required** (same reason — cart/checkout need per-request rendering).
47
34
  - **WordPress → SSG (Astro)** when the brief says SSG, otherwise **SSR (Next.js default)**.
48
- - **Webapp → the app's own stack.** An **existing app** keeps its current framework (don't impose one), including
35
+ - **PocketBase → the app's own stack.** An **existing app** keeps its current framework (don't impose one), including
49
36
  one rebuilt under **Agent designs and builds**; a
50
37
  **new app** uses whatever fits the brief (SSR or SPA). Either way it deploys as a Node.js app (Step 8) —
51
- an SSR app runs a server, a SPA builds to static output.
38
+ an SSR app runs a server, a SPA builds to static output. The app must not serve anything under
39
+ `/api` or `/_`: PocketBase owns those paths on this domain, so server routes go under another prefix
40
+ (`/server`): Next.js `app/server/…` never `app/api/…`, and likewise no Nuxt `server/api/`, SvelteKit
41
+ `src/routes/api/` or Astro `src/pages/api/`.
52
42
  - Map rendering → framework: **`ssr` → Next.js**, **`ssg` → Astro** — unless the brief/prompt explicitly
53
43
  names another supported framework, in which case use that.
54
44
 
@@ -114,10 +104,20 @@ Read the backend from `site.json`:
114
104
  `false`, a graceful disabled-checkout state, no `/checkout` call, not a build error). **Never embed a
115
105
  consumer key client-side.**
116
106
  - **Ecommerce** → the public Hostinger Storefront Core V2 API: follow [`ecommerce.md`](ecommerce.md).
117
- - **Webapp** → **no `content-model.md` and no headless backend to read**. The app uses its own data source:
118
- the MySQL database from `site.json → database` (through the `DB_*` / `DATABASE_URL` env vars — set at
119
- provision/deploy, see `../03-provision/webapp/SKILL.md` Step 3; `127.0.0.1` only resolves on the server,
120
- not locally), or whatever external API the app calls. For an existing app, keep its data layer as-is.
107
+ - **PocketBase** → the `pocketbase` SDK against the backend on the same domain, following
108
+ [`../04-content-model/pocketbase/frontend.md`](../04-content-model/pocketbase/frontend.md) (skip its
109
+ static `.htaccess` section: a headless site deploys as Node.js and keeps no `.htaccess`). In the one
110
+ data module: `new PocketBase(<origin>)` where the origin is `window.location.origin` in the browser
111
+ and `site.json → urls.site` in local dev and on the server, then `pb.autoCancellation(false)` once.
112
+ Build filters with `pb.filter()`, load a list then subscribe to it for live views, and unsubscribe on
113
+ unmount. Build each form and view against the fields in `pocketbase/schema.json`, and show a rule
114
+ rejection (a 400 with no field errors, a 404 on update) as a normal "not allowed" state. Add the
115
+ sign-in form only when the schema has an auth collection visitors use
116
+ ([`../04-content-model/pocketbase/auth.md`](../04-content-model/pocketbase/auth.md)). A public form
117
+ includes its recipe's honeypot field, empty and hidden. **The superuser password never reaches the
118
+ frontend**; server-side superuser work reads `PB_URL`, `PB_SUPERUSER_EMAIL` and
119
+ `PB_SUPERUSER_PASSWORD` from the app's environment variables (`frontend.md`, Node.js apps). For an
120
+ existing app, keep its screens and swap its data calls to the backend.
121
121
 
122
122
  Guidelines (framework-agnostic):
123
123
 
@@ -125,10 +125,10 @@ Guidelines (framework-agnostic):
125
125
  to inspect, one base URL to switch. Keep it swappable so the shell can build against stubs first.
126
126
  - **Fetch at request time for SSR** (fresh content, no rebuild); a static build fetches at build time.
127
127
  - **A failed or incomplete fetch is an error, not a silent empty/placeholder.** Planned content missing
128
- from the API is a build error too — a site that builds with holes ships with holes. *(WordPress/Ecommerce;
129
- a webapp has no planned content to check.)*
130
- - **`content-model.md` is the source for what should exist** (pages, nav, collections mapping) — for
131
- WordPress/Ecommerce only; a **webapp has no `content-model.md`**.
128
+ from the API is a build error too — a site that builds with holes ships with holes. *(On PocketBase
129
+ the planned content is the fixed pages plus the seed records.)*
130
+ - **`content-model.md` is the source for what should exist** (pages, nav, collections mapping) — on
131
+ every backend; on PocketBase it also carries the `## Data` section.
132
132
  - **No `.htaccess`** in the project (deploy would overwrite the live one); don't commit `node_modules`
133
133
  or build output.
134
134
  - Set `engines.node` to `22` (the deploy builds on Node 22).
@@ -158,6 +158,5 @@ won't size a window below ~500 px, so a phone-width window comes back cropped: s
158
158
  both widths in one image. The live site runs this same build, so it needs no screenshots; deploy checks
159
159
  that it serves.
160
160
 
161
- > **Webapp:** just confirm the app builds clean and `state.json → frontend` is right — there's no
162
- > `content-model.md` or headless backend to check. A DB-backed app can't reach its database locally
163
- > (`127.0.0.1` is server-only), so its data layer is verified **after** deploy, not here.
161
+ > **PocketBase:** the app reaches the live backend from local dev (`frontend.md`, Local development),
162
+ > so check one list and one create against it here, then delete the test records before handing over.
@@ -20,7 +20,7 @@ description: "Step 7 (validate) of the Hostinger Headless flow. OPTIONAL quick g
20
20
  barrier, don't deploy. Deploy's pre-flight asks the connector again (see *State and artifacts* in the
21
21
  top-level `SKILL.md`).
22
22
 
23
- ## 2 — Backend API status (WordPress / WooCommerce / Ecommerce, always, quick)
23
+ ## 2 — Backend API status (every backend, always, quick)
24
24
 
25
25
  Hit the live API from `site.json` and confirm it answers **with the content the push created** — a 200
26
26
  with an empty catalog means the push didn't land:
@@ -33,7 +33,13 @@ with an empty catalog means the push didn't land:
33
33
  count matches the plan. Don't test checkout while `woocommerce.payment_enabled` is `false`.
34
34
  - **Ecommerce:** query `urls.storefront_api` for the sales channel → 200 with the seeded products and
35
35
  prices *(confirm against the store)*.
36
- - **Contact form** (`site.json → contact_form.enabled`): send the two throwaway test submissions in
36
+ - **PocketBase** (`site.json → backend: "pocketbase"`): `GET {urls.api}/health` → 200, and every
37
+ collection with `seed` records in `pocketbase/schema.json` lists them
38
+ (`GET {urls.api}/collections/<name>/records?perPage=1` → `totalItems` at least the seed count, for
39
+ collections visitors may list). `pb-verify.mjs` already ran at the content-model push, so don't
40
+ repeat it here.
41
+ - **Contact form** (`site.json → contact_form.enabled`, Contact Form 7, WordPress only): send the two
42
+ throwaway test submissions in
37
43
  [`../04-content-model/wordpress/contact-form.md`](../04-content-model/wordpress/contact-form.md) §5: the
38
44
  first must return `status` **`mail_sent`**, the one with the honeypot filled **`spam`**.
39
45
 
@@ -68,13 +68,15 @@ framework's own build output.
68
68
  - **Next.js 16+:** `package.json`'s `build` script is `next build --webpack`, not plain `next build` —
69
69
  the server's glibc can't run Turbopack's native compiler, and Turbopack doesn't fall back to webpack
70
70
  (see `../06-frontend/SKILL.md` Step 3). On Next.js 15.x leave it as plain `next build`. Fix it here if it isn't.
71
- 3. **Env vars (only if used).** Build-time vars (e.g. `NEXT_PUBLIC_*`) must be set **before** the build
72
- with `hosting_nodejs_replace-environment-variables` (full replace). Never put secrets in the repo or
73
- the archive. **Webapp with a database:** that full replace wipes the `DB_*`/`DATABASE_URL` that
74
- `hosting_databases_setup-website` injected (the generated password reads back masked), so set all app
75
- vars in the same replace and, if you can't, first reset the password with
76
- `hosting_databases_change-password` and resend every `DB_*`/`DATABASE_URL` — see
77
- `../03-provision/webapp/SKILL.md` Step 3.
71
+ 3. **PocketBase: nothing under `/api` or `/_`.** The app serves no route under those
72
+ prefixes, whatever its framework (Next.js `app/api/` or `pages/api/`, Nuxt `server/api/`, SvelteKit
73
+ `src/routes/api/`, Astro `src/pages/api/`, an Express or Fastify route), and `src/` holds no
74
+ `.pocketbase/` folder or `credentials.json`. Fix it here if it does.
75
+ 4. **Env vars (only if used).** Build-time vars (e.g. `NEXT_PUBLIC_*`) must be set **before** the build
76
+ with `hosting_nodejs_replace-environment-variables` (full replace: list the current keys first and
77
+ send the complete set). Never put secrets in the repo or the archive. On PocketBase, server-side
78
+ superuser work reads `PB_URL`, `PB_SUPERUSER_EMAIL` and `PB_SUPERUSER_PASSWORD` from here (the
79
+ values come from `~/.hostinger/<domain>/.pocketbase/credentials.json`, never from the archive).
78
80
 
79
81
  ## Step 2 — Archive the source
80
82
 
@@ -83,8 +85,9 @@ Zip the project **source** with `package.json` at the archive root. **Include**
83
85
  `package.json`, `package-lock.json`, `.nvmrc`. **Exclude** `node_modules/`, the build output
84
86
  (`.next/`, `dist/`, `out/`), `.git/`, and any `.htaccess` — the server installs and builds from source.
85
87
  **Never archive secrets:** the commands below also leave out `.env*` files, `.npmrc` and key/certificate
86
- files (`*.pem`, `*.key`, `*.p12`, `*.pfx`). A brought-in project often has a `.env.local`; its values go in
87
- as environment variables (Step 1), never in the archive.
88
+ files (`*.pem`, `*.key`, `*.p12`, `*.pfx`) and any `.pocketbase/` folder. A brought-in project often has a `.env.local`; its values go in
89
+ as environment variables (Step 1), never in the archive. `hosting_deploy` also skips any file named
90
+ `credentials.json` itself and lists it in `skippedFiles`.
88
91
 
89
92
  > ## ⚠️ Write the archive outside `~/.hostinger/` (the deploy refuses it there)
90
93
  > `hosting_deploy` refuses any `path` under a hidden folder at the top of the home directory
@@ -100,7 +103,7 @@ as environment variables (Step 1), never in the archive.
100
103
  cd ~/.hostinger/<domain>/src
101
104
  DEPLOY_DIR=$(mktemp -d)
102
105
  zip -r -X "$DEPLOY_DIR/app.zip" . -x 'node_modules/*' '.next/*' 'dist/*' 'out/*' '.git/*' '**/.htaccess' \
103
- '.env*' '*/.env*' '.npmrc' '*/.npmrc' '*.pem' '*.key' '*.p12' '*.pfx'
106
+ '.env*' '*/.env*' '.npmrc' '*/.npmrc' '*.pem' '*.key' '*.p12' '*.pfx' '.pocketbase/*' '*/.pocketbase/*'
104
107
  echo "$DEPLOY_DIR/app.zip" # the absolute path to pass as `path` in Step 3
105
108
  ```
106
109
 
@@ -110,7 +113,7 @@ echo "$DEPLOY_DIR/app.zip" # the absolute path to pass as `path` in Step 3
110
113
  cd $HOME\.hostinger\<domain>\src
111
114
  $DeployDir = Join-Path $HOME "hostinger-deploy\<domain>"; New-Item -ItemType Directory -Force $DeployDir | Out-Null
112
115
  tar -a -cf "$DeployDir\app.zip" --exclude=node_modules --exclude=.next --exclude=dist --exclude=out --exclude=.git --exclude=.htaccess `
113
- --exclude=.env* --exclude=.npmrc --exclude=*.pem --exclude=*.key --exclude=*.p12 --exclude=*.pfx .
116
+ --exclude=.env* --exclude=.npmrc --exclude=*.pem --exclude=*.key --exclude=*.p12 --exclude=*.pfx --exclude=.pocketbase .
114
117
  "$DeployDir\app.zip" # the absolute path to pass as `path` in Step 3
115
118
  ```
116
119
 
@@ -138,10 +141,12 @@ Pass the framework's build settings **inline** on the deploy call — there is n
138
141
 
139
142
  `hosting_deploy` uploads the source and triggers `npm install` + the build **end-to-end** — do not call
140
143
  any upload or build operation yourself. It returns a build `buildUuid` at once. This **overwrites the
141
- website root** (expected) and keeps `/cms` intact. `type` is always `"nodejs"` for a headless site, with the explicit `appType`/`outputDirectory` from
144
+ website root** (expected) and keeps the backend's paths intact (`/cms` for WordPress; `/api` and `/_/`
145
+ for PocketBase). `type` is always `"nodejs"` for a headless site, with the explicit `appType`/`outputDirectory` from
142
146
  *Build configurations* —
143
147
  **never `"static"`**, which serves the build as plain files over the document root and **overwrites
144
- `/cms`**, destroying the WordPress backend. A static-built SPA (Vite/React/Vue) still deploys as
148
+ `/cms`**, destroying the WordPress backend, and would likewise break the routing that keeps `/api` and
149
+ `/_/` on a PocketBase backend. A static-built SPA (Vite/React/Vue) still deploys as
145
150
  `type: "nodejs"` with its `appType`.
146
151
 
147
152
  ## Step 4 — Wait for the build and the live root
@@ -178,9 +183,11 @@ It waits for `hosting_get-deployment` to report the build `completed`, then up t
178
183
  | Static serves *(static frameworks)* | `GET https://<domain>/` | 200 HTML with real home content |
179
184
  | Key routes | a couple of planned routes + one deep route | 200, real content |
180
185
  | **Backend survived** *(WordPress / WooCommerce)* | `GET https://<domain>/cms/wp-json/wp/v2/posts?per_page=1` | 200 |
186
+ | **Backend survived** *(PocketBase)* | `GET https://<domain>/api/health` and `GET https://<domain>/_/` | 200 and 200 |
187
+ | **No credentials served** *(PocketBase)* | `GET https://<domain>/.pocketbase/credentials.json` | 404 |
181
188
 
182
- > **Only WordPress (including WordPress + WooCommerce) has a `/cms` on the domain**, so the *Backend
183
- > survived* check is WordPress-only.
189
+ > **Only WordPress (including WordPress + WooCommerce) has a `/cms` on the domain**, and only PocketBase
190
+ > has `/api` and `/_/`, so the *Backend survived* check depends on the backend.
184
191
  > - **WordPress + WooCommerce:** also confirm the store survived the deploy —
185
192
  > `GET https://<domain>/cms/wp-json/wc/store/v1/products?per_page=1` → 200. There is nothing external to
186
193
  > link (no sales-channel step — that's Ecommerce only). **Checkout** stays owner-completed: when
@@ -192,7 +199,14 @@ It waits for `hosting_get-deployment` to report the build `completed`, then up t
192
199
  > checkout can be reached when `site.json → ecommerce.payment_enabled` is `true`** — on a free account
193
200
  > (`payment_enabled: false`) there is no checkout, so **skip that check entirely**; a catalog that serves
194
201
  > 200 is a passing, complete deploy. Never fail or hold the deploy because checkout is unavailable.
195
- > - **Webapp:** no content backend at all — the whole root is the app. Skip the check; `/cms` won't resolve.
202
+ > - **PocketBase** (`site.json → backend: "pocketbase"`): the backend lives on this domain at `/api`
203
+ > and `/_`, so check both survived and that the credentials URL is a 404, then run
204
+ > `node <skill>/steps/04-content-model/pocketbase/scripts/pb-verify.mjs ~/.hostinger/<domain>/.pocketbase/credentials.json ~/.hostinger/<domain>/pocketbase/schema.json`
205
+ > and expect `READY` (its last check, the website serving the app, now passes). If `/api/health`
206
+ > fails while the root serves the app, the app is answering `/api`: move its routes off that prefix
207
+ > and redeploy. If the credentials URL returns anything but 404, rotate the superuser at once
208
+ > (`hosting_pocketbase_set-superuser`, see `../03-provision/pocketbase/SKILL.md` Step 3) and
209
+ > redeploy without the file.
196
210
 
197
211
  The root check is already done when `wait.mjs build` returned `ok: true`; check the rest in one shell
198
212
  command (`curl` each URL). A `completed` build whose root 403s almost always means the build settings
@@ -226,7 +240,8 @@ No secrets in `deploy.json`. The `urls.cms` field and the `backend_preserved` ch
226
240
  - **Ecommerce:** omit `urls.cms`/`backend_preserved`; record the store URLs instead (`urls.storefront_api`,
227
241
  `urls.store_admin` from `site.json`) and link the custom sales channel to the live domain —
228
242
  `ecommerce_sales-channels_update { store_id, sales_channel_id, url }` (see the ecommerce provision step).
229
- - **Webapp:** omit `urls.cms` and `backend_preserved` entirely — `urls` is just `{ "live": "https://<domain>" }`.
243
+ - **PocketBase:** omit `urls.cms`; add `urls.api` and `urls.admin` from `site.json`,
244
+ `checks.backend_preserved` (the `/api/health` and `/_/` checks) and `checks.pb_verify: "READY"`.
230
245
 
231
246
  Update `state.json` (`stage` → `done`), then continue to Step 9 (done).
232
247
 
@@ -64,10 +64,20 @@ Write it in this order:
64
64
  login is the store admin (wp-admin → WooCommerce → Products/Orders) — do **not** use the Ecommerce
65
65
  `store_admin` path; the store setup the owner still needs is spelled out under *Next steps*. For a
66
66
  Hostinger **Ecommerce** store, link the store admin from `urls.store_admin` instead.
67
+ - **PocketBase dashboard** (a PocketBase backend): `urls.admin` (`https://<domain>/_/`). Give
68
+ the owner the **login access** in three lines: the sign-in email (`site.json →
69
+ pocketbase.superuser_email`, by default the website owner's email), the full path of the
70
+ credentials file (`~/.hostinger/<domain>/.pocketbase/credentials.json`, which holds
71
+ `superuser_email` and `superuser_password`), and one command to read it (`cat <that path>`).
72
+ **Name the file, never paste the password**, and tell them to move both into their password
73
+ manager, since Hostinger can't show the password again. Say that this is the owner's
74
+ superuser login, not a member account: members sign up on the site and live in the `users`
75
+ collection. A lost password is reset by asking the agent to rotate the superuser
76
+ (`hosting_pocketbase_set-superuser`), which saves a new password to the same file.
67
77
  - **hPanel site dashboard:** `https://hpanel.hostinger.com/websites/<domain>` (the headless website
68
78
  is installed by now).
69
79
  - **Onboarding (resume):** `https://hpanel.hostinger.com/headless-onboarding/<order_id>/<username>/`
70
- - **REST API** (for developers): `urls.rest_api`.
80
+ - **REST API** (for developers): `urls.rest_api`, or `urls.api` on PocketBase.
71
81
 
72
82
  > URL shape note: `<username>` may be dropped from the onboarding/success URLs in a future hPanel
73
83
  > release. If a built URL 404s, retry the same path without the `/<username>` segment before
@@ -90,7 +100,13 @@ Write it in this order:
90
100
  - **Hostinger Ecommerce store:** when `site.json → ecommerce.payment_enabled` is `false`, finish
91
101
  payment setup in the store admin (`urls.store_admin`) before the storefront can sell; otherwise it's
92
102
  ready to take orders.
93
- - **Webapp:** manage the app from hPanel → the website (environment variables, deployments, logs).
103
+ - **PocketBase:** manage the app from hPanel → the website (environment variables, deployments,
104
+ logs). Say in plain words who can do what, one line per kind of data from
105
+ `pocketbase/schema.json` (e.g. "anyone can book a free place; only you can see who booked"), and
106
+ that everything visitors enter is in the dashboard (`/_/`) → *Collections*. Then the two things
107
+ only the owner can set there: **Settings → Mail settings** (SMTP) before password-reset or
108
+ verification emails can be sent — required when visitors have accounts — and **Settings →
109
+ Backups**. Data changes show up live; a schema change needs no redeploy.
94
110
 
95
111
  5. **Where state lives** — the workspace path `~/.hostinger/<domain>/`, the `stage` that a
96
112
  resumed run will start from, and the build report `~/.hostinger/<domain>/report.html`.
@@ -111,7 +127,8 @@ already checked this — this is a quick re-confirm, not a full re-run):
111
127
  - **WordPress admin:** `GET {urls.wp_admin}` → reachable (a login page, 200/302), not 404.
112
128
  - **Backend API:** `GET {urls.rest_api}/posts?per_page=1` → 200 (WordPress); for a **WooCommerce** store
113
129
  (`site.json → woocommerce.enabled`) also `GET {urls.store_api}/products?per_page=1` → 200; or the
114
- storefront API for the sales channel → 200 (Ecommerce).
130
+ storefront API for the sales channel → 200 (Ecommerce); or `GET {urls.api}/health` → 200 and
131
+ `GET {urls.admin}` → 200 (PocketBase).
115
132
  - **Contact form** (`site.json → contact_form.enabled`): validate already sent a test submission, so
116
133
  don't send another here. Hand it over as
117
134
  [`../04-content-model/wordpress/contact-form.md`](../04-content-model/wordpress/contact-form.md) §6 says.
@@ -6,6 +6,7 @@
6
6
  // node wait.mjs cms <domain> <username> # wordpress_installations_list → /cms row is_valid (shell swap)
7
7
  // node wait.mjs build <domain> <buildUuid> # hosting_get-deployment → build completed, then the root serves 200 (http:// while SSL is pending)
8
8
  // node wait.mjs live <domain> # https://<domain>/ serves 200 (http:// while SSL is pending)
9
+ // node wait.mjs pocketbase <domain> # https://<domain>/api/health serves 200 (http:// while SSL is pending)
9
10
  // any of them: [--timeout 10m]
10
11
  //
11
12
  // It talks to the local Hostinger MCP server, which reuses the sign-in from the connect step. Progress
@@ -79,17 +80,19 @@ const rowsFor = (data, domain) =>
79
80
  (Array.isArray(data) ? data : data?.data ?? []).filter((r) => r.domain?.toLowerCase() === domain.toLowerCase());
80
81
 
81
82
  // A new domain's SSL certificate can take far longer than the build, and until then HTTPS fails at the
82
- // TLS handshake. When plain HTTP serves the app, the deploy is done; HTTPS follows on its own.
83
- const waitLive = (domain, timeoutMs) =>
84
- poll('live', timeoutMs, async () => {
85
- const status = await httpStatus(`https://${domain}/`);
86
- if (status === 200) return { done: { ok: true, live: `https://${domain}/` } };
87
- if (status !== 0) return { status: `root ${status}` };
88
- const plain = await httpStatus(`http://${domain}/`);
89
- if (plain === 200) return { done: { ok: true, live: `http://${domain}/`, https_pending: true } };
90
- return { status: `root unreachable over https, http ${plain || 'unreachable'}` };
83
+ // TLS handshake. When plain HTTP serves the path, the job is done; HTTPS follows on its own.
84
+ const waitUrl = (label, path, key, domain, timeoutMs) =>
85
+ poll(label, timeoutMs, async () => {
86
+ const status = await httpStatus(`https://${domain}${path}`);
87
+ if (status === 200) return { done: { ok: true, [key]: `https://${domain}${path}` } };
88
+ if (status !== 0) return { status: `${label} ${status}` };
89
+ const plain = await httpStatus(`http://${domain}${path}`);
90
+ if (plain === 200) return { done: { ok: true, [key]: `http://${domain}${path}`, https_pending: true } };
91
+ return { status: `${label} unreachable over https, http ${plain || 'unreachable'}` };
91
92
  });
92
93
 
94
+ const waitLive = (domain, timeoutMs) => waitUrl('root', '/', 'live', domain, timeoutMs);
95
+
93
96
  const LIVE_TIMEOUT = '5m';
94
97
 
95
98
  const KINDS = {
@@ -159,6 +162,13 @@ const KINDS = {
159
162
  timeout: LIVE_TIMEOUT,
160
163
  run: (_mcp, { domain }, timeoutMs) => waitLive(domain, timeoutMs),
161
164
  },
165
+
166
+ // A PocketBase backend answers on the site's own domain; no Hostinger operation to poll, so no MCP server.
167
+ pocketbase: {
168
+ args: [],
169
+ timeout: '3m',
170
+ run: (_mcp, { domain }, timeoutMs) => waitUrl('/api/health', '/api/health', 'api', domain, timeoutMs),
171
+ },
162
172
  };
163
173
 
164
174
  const { positional, flags } = parseArgs(process.argv.slice(2));