hostinger-api-mcp 4.2.1 → 4.4.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 (61) hide show
  1. package/CHANGELOG.md +13 -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 +14 -7
  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 +20 -25
  11. package/skills/headless/steps/03-provision/pocketbase/SKILL.md +190 -0
  12. package/skills/headless/steps/04-content-model/SKILL.md +12 -12
  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/06-frontend/SKILL.md +32 -33
  25. package/skills/headless/steps/07-validate/SKILL.md +8 -2
  26. package/skills/headless/steps/08-deploy/SKILL.md +32 -17
  27. package/skills/headless/steps/09-done/SKILL.md +20 -3
  28. package/skills/headless/wait.mjs +19 -9
  29. package/src/core/runtime.js +1 -1
  30. package/src/core/runtime.ts +1 -1
  31. package/src/core/skills.js +114 -37
  32. package/src/core/skills.ts +114 -37
  33. package/src/servers/agency-hosting.js +1 -1
  34. package/src/servers/agency-hosting.ts +1 -1
  35. package/src/servers/agent-readiness.js +1 -1
  36. package/src/servers/agent-readiness.ts +1 -1
  37. package/src/servers/all.js +1 -1
  38. package/src/servers/all.ts +1 -1
  39. package/src/servers/billing.js +1 -1
  40. package/src/servers/billing.ts +1 -1
  41. package/src/servers/dns.js +1 -1
  42. package/src/servers/dns.ts +1 -1
  43. package/src/servers/domains.js +1 -1
  44. package/src/servers/domains.ts +1 -1
  45. package/src/servers/ecommerce.js +1 -1
  46. package/src/servers/ecommerce.ts +1 -1
  47. package/src/servers/gpu.js +1 -1
  48. package/src/servers/gpu.ts +1 -1
  49. package/src/servers/horizons.js +1 -1
  50. package/src/servers/horizons.ts +1 -1
  51. package/src/servers/hosting.js +1 -1
  52. package/src/servers/hosting.ts +1 -1
  53. package/src/servers/mail.js +1 -1
  54. package/src/servers/mail.ts +1 -1
  55. package/src/servers/reach.js +1 -1
  56. package/src/servers/reach.ts +1 -1
  57. package/src/servers/vps.js +1 -1
  58. package/src/servers/vps.ts +1 -1
  59. package/src/servers/wordpress.js +1 -1
  60. package/src/servers/wordpress.ts +1 -1
  61. package/skills/headless/steps/03-provision/webapp/SKILL.md +0 -164
package/CHANGELOG.md CHANGED
@@ -4,6 +4,19 @@ Generated at release time from the diff between the previous and current
4
4
  build. Tool changes are listed individually; everything else is summarised
5
5
  by area.
6
6
 
7
+ ## v4.4.0 — 2026-11-17
8
+
9
+ ### Also in this release
10
+
11
+ - Bundled agent skills: 25 files
12
+ - Other files: `src/core/skills.js`, `src/core/skills.ts`
13
+
14
+ ## v4.3.0 — 2026-11-16
15
+
16
+ ### Also in this release
17
+
18
+ - Request handling and authentication: `src/core/runtime.js`, `src/core/runtime.ts`
19
+
7
20
  ## v4.2.1 — 2026-11-16
8
21
 
9
22
  ### Also in this release
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hostinger-api-mcp",
3
- "version": "4.2.1",
3
+ "version": "4.4.0",
4
4
  "description": "Hostinger API — manage domains, DNS, hosting, VPS, billing and more from Gemini CLI.",
5
5
  "mcpServers": {
6
6
  "hostinger": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hostinger-api-mcp",
3
- "version": "4.2.1",
3
+ "version": "4.4.0",
4
4
  "mcpName": "io.github.hostinger/hostinger-api-mcp",
5
5
  "description": "MCP server for Hostinger API",
6
6
  "repository": {
package/server.json CHANGED
@@ -17,12 +17,12 @@
17
17
  "url": "https://github.com/hostinger/api-mcp-server",
18
18
  "source": "github"
19
19
  },
20
- "version": "4.2.1",
20
+ "version": "4.4.0",
21
21
  "packages": [
22
22
  {
23
23
  "registryType": "npm",
24
24
  "identifier": "@hostinger/mcp",
25
- "version": "4.2.1",
25
+ "version": "4.4.0",
26
26
  "transport": {
27
27
  "type": "stdio"
28
28
  },
@@ -144,7 +144,8 @@ keep the language you were using.
144
144
  ### One instance per headless site (the core invariant)
145
145
 
146
146
  > **A headless site is exactly one website.** The frontend is served at the site root and WordPress
147
- > lives at `/cms` **on the same domain** — one instance, one domain. There is **never** a second
147
+ > lives at `/cms` **on the same domain** (a PocketBase backend at `/api` and `/_/` of the same domain) —
148
+ > one instance, one domain. There is **never** a second
148
149
  > website for the same build and **never** a separate CMS domain: the CMS is always the `/cms` path of
149
150
  > the site's own domain (`https://<domain>/cms`), not `cms.<domain>` or any other host. Provision
150
151
  > therefore **adopts and swaps** an existing headless shell rather than creating another site, and a
@@ -165,13 +166,16 @@ but an instance existing does **not** mean provision is done or can be skipped.
165
166
  which of these cases applies and records it, then provision takes the matching path:
166
167
 
167
168
  1. **An empty headless shell already exists for the domain (the common onboarding case).** Provision
168
- **adopts the shell and swaps it to the chosen backend** (the backend is picked in refine first).
169
- **Never skip provision for a shell, and never create a second site.** See the provision router's
170
- *Onboarding handoff*.
169
+ **adopts the shell and swaps it to the chosen backend** (the backend is picked in refine first):
170
+ WordPress into `/cms`, the shell as the Ecommerce storefront host, or a PocketBase backend created
171
+ on it with `hosting_pocketbase_create-backend` (which turns the `headless_empty` site into
172
+ `headless_pocketbase`). **Never skip provision for a shell, and never create a second site.** See
173
+ the provision router's *Onboarding handoff*.
171
174
  2. **No instance exists at all.** Provision creates a fresh headless instance with
172
- `hosting_websites_create` using the chosen backend's own `type`.
173
- 3. **User wants a webapp.** Provision is a plain Node.js app host, not headless — `webapp` ignores
174
- headless shells entirely and is only reached by experimental actions, never the onboarding flow.
175
+ `hosting_websites_create` using the chosen backend's own `type` (`headless_wordpress`,
176
+ `headless_ecommerce` or `headless_pocketbase`; a PocketBase site gets its backend at the join).
177
+
178
+ Every backend is a headless website: there is no plain Node.js app host in this flow.
175
179
 
176
180
  Either way the create/install is asynchronous and returns `queued` immediately, then it takes a few
177
181
  minutes; the backend's provision step names the `wait.mjs` command to run at the join, not at the fire.
@@ -194,6 +198,7 @@ cd "$HOME" && node <skill>/wait.mjs setup <domain> # a fresh site's
194
198
  cd "$HOME" && node <skill>/wait.mjs cms <domain> <username> # a shell swap's WordPress install at /cms → valid
195
199
  cd "$HOME" && node <skill>/wait.mjs build <domain> <buildUuid> # the deploy build → completed, then the root serves 200 (http:// while SSL is pending)
196
200
  cd "$HOME" && node <skill>/wait.mjs live <domain> # the root serves 200
201
+ cd "$HOME" && node <skill>/wait.mjs pocketbase <domain> # a PocketBase backend's /api/health serves 200
197
202
  ```
198
203
 
199
204
  Run it in the foreground, with a `--timeout` just under your tool's command limit (e.g. `--timeout 9m`
@@ -235,6 +240,8 @@ took from it.
235
240
  | `site.json` | provision | chosen backend, username, install id, all URLs |
236
241
  | `content-model.md` | content model | entities, fields, pages, navigation |
237
242
  | `content.json` | content model (WordPress) | the drafted content `push-content.mjs` pushes |
243
+ | `pocketbase/schema.json` | content model (PocketBase) | collections, access rules, indexes, rate limits, seed records |
244
+ | `.pocketbase/credentials.json` | provision (PocketBase) | the backend's superuser email and one-time password; mode `600`, never deployed, never printed |
238
245
  | `design.md` (+ `brand/` logo files) | design | chosen design direction: tokens, type, logo, components, per-page composition, accessibility |
239
246
  | `src/` | frontend | the website source implementing `design.md`; framework choice is recorded in `state.json → frontend` |
240
247
  | `deploy.json` | deploy | build id, deployed at, live URLs |
@@ -1,3 +1,3 @@
1
- version=4.2.1
2
- commit=b9928dac0c54
3
- built=2026-11-16
1
+ version=4.4.0
2
+ commit=1abaf370163d
3
+ built=2026-11-17
@@ -339,7 +339,7 @@ function buildReport(ws, { outcome, tokens } = {}) {
339
339
  const stillOpen = resolvedOutcome !== 'abandoned' && history.some((h) => !h.ended_at);
340
340
  const endedAt = stillOpen ? now() : lastActivity;
341
341
  const stages = history.map((h) => ({ ...h, minutes: minutesBetween(h.started_at, h.ended_at ?? endedAt) }));
342
- const gaps = [...loggingGaps(stages, run, resolvedOutcome, site.backend), ...dropped];
342
+ const gaps = [...loggingGaps(stages, run, resolvedOutcome), ...dropped];
343
343
  const strip = ({ ts, run: _run, type: _type, ...rest }) => ({ ...rest, logged_at: ts });
344
344
  const liveStage = stages.find((s) => s.stage === 'deploy' && s.result?.startsWith('ok'));
345
345
  if (!OUTCOMES.includes(resolvedOutcome)) fail(`unknown outcome "${resolvedOutcome}"; one of ${OUTCOMES.join(', ')}`);
@@ -449,9 +449,7 @@ function reportRejected(ws, [runId]) {
449
449
 
450
450
  // Gaps are printed as warnings by `report`, so guesses never pass as measurements.
451
451
  const EXPECTED_FOR_BUILD = ['check_state', 'refine', 'provision', 'content_model', 'design', 'frontend', 'validate', 'deploy'];
452
- // Stages a backend skips on purpose: webapp has no CMS, so no content model.
453
- const SKIPPED_BY_BACKEND = { webapp: ['content_model'] };
454
- function loggingGaps(stages, run, outcome, backend) {
452
+ function loggingGaps(stages, run, outcome) {
455
453
  const gaps = [];
456
454
  for (const s of stages) {
457
455
  // A skipped stage did no work, so it has no duration to measure.
@@ -463,7 +461,7 @@ function loggingGaps(stages, run, outcome, backend) {
463
461
  if (problem) gaps.push({ stage: s.stage, phase: s.phase, problem });
464
462
  }
465
463
  if (run.kind === 'build' && outcome === 'live') {
466
- for (const stage of EXPECTED_FOR_BUILD.filter((name) => !SKIPPED_BY_BACKEND[backend]?.includes(name))) {
464
+ for (const stage of EXPECTED_FOR_BUILD) {
467
465
  if (!stages.some((s) => s.stage === stage)) gaps.push({ stage, phase: null, problem: 'never logged, though the site went live' });
468
466
  }
469
467
  }
@@ -101,12 +101,22 @@ Query the Hostinger connector — the local files are never trusted on their own
101
101
  approval or network access, then go on. Ignore any other failure, such as a non-2xx response from
102
102
  Hostinger: no retry, nothing more said to the user, and the run carries on unchanged.
103
103
  - **Is it an empty headless shell from onboarding?** A `headless` site with no backend installed (no
104
- WordPress at `/cms`, no store) is an **empty headless shell**: within 24 h its setup `type` is
105
- `headless_empty`; otherwise `wordpress_installations_list { username, domain, ownership: "all" }`
106
- returns **no** `/cms` row and there is no `site.json` recording a backend. It is a **new build** that
104
+ WordPress at `/cms`, no store, no PocketBase backend) is an **empty headless shell**: within 24 h its
105
+ setup `type` is `headless_empty`; otherwise `wordpress_installations_list { username, domain,
106
+ ownership: "all" }` returns **no** `/cms` row, `hosting_pocketbase_backend { username, domain }`
107
+ returns 404 or `state: "missing"` (the same test provision uses), and there is no `site.json`
108
+ recording a backend. It is a **new build** that
107
109
  happens to already own its website, not a finished or resumable one. Route it to **refine** (choose
108
110
  the backend), then **provision** adopts the shell and swaps it to that backend (provision's subfolder
109
111
  repeats this check before swapping). Never create a second site, and never skip provision for it.
112
+ `headless_pocketbase` is **not** an empty shell: onboarding chose PocketBase, so refine keeps the
113
+ backend fixed as **PocketBase** and provision creates the backend if it isn't there yet
114
+ (`hosting_pocketbase_backend` → 404 or state `missing` means not yet). After 24 h the setup row is
115
+ gone and the public API can't tell such a site with no backend from an empty shell; refine then
116
+ decides the backend as for any empty shell.
117
+ - **A `site.json → backend: "webapp"`** is from an older flow that built a plain Node.js host, which
118
+ this version no longer does. Tell the user in one line and point them at the `deploy-to-hosting`
119
+ skill for that app; don't resume it as a headless build.
110
120
 
111
121
  Reconcile with the local state. **When they disagree, reality wins** and the local `stage` is
112
122
  corrected.
@@ -124,6 +134,7 @@ yet** (`brief.md`, `site.json`, …).
124
134
  |---|---|---|
125
135
  | none (connect only) | free | **new build** — start from refine |
126
136
  | none (connect only) | empty headless shell (onboarding) | **new build on an existing shell** — start from refine; provision adopts the shell and swaps it to the chosen backend. Never create a second site, never skip provision |
137
+ | none (connect only) | onboarding PocketBase site (setup `type` `headless_pocketbase`) | **new build on an existing PocketBase site** — start from refine with the backend fixed as PocketBase; provision creates the backend if it isn't there yet. Not something to resume, even when the backend already exists: nothing has been built on it |
127
138
  | none (connect only) | site exists with a real backend | **adopt / resume** — never create a second site; route to the first unfinished stage |
128
139
  | build artifacts present, incomplete | matches | **resume** at `state.json`'s `stage` |
129
140
  | build artifacts present | disagrees | **reality wins** — recompute the stage from what actually exists |
@@ -138,14 +149,14 @@ artifacts** (`brief.md`, `site.json`, …) or a **live site** for this domain. A
138
149
  connect-only files are *not* something to resume.
139
150
 
140
151
  - **New build** (no build artifacts and either the domain is free **or** it holds only an empty
141
- headless shell from onboarding) → just proceed to refine. **Don't ask resume vs start over** —
152
+ headless shell or a PocketBase site from onboarding) → just proceed to refine. **Don't ask resume vs start over** —
142
153
  there's nothing to resume; both would land in the same place. An empty headless shell is not
143
154
  "something to resume": it has no backend and no content yet, so it's a fresh build that already owns
144
155
  its website — provision will adopt and swap it. Mention it in one line ("Using the headless site
145
156
  onboarding already created for this domain."). If a leftover `.lock` is lying around, silently take
146
157
  it over and continue (optionally mention it in one line).
147
158
  - **Something to resume** (build artifacts exist, or a site exists for the domain **with a real backend
148
- installed** — WordPress at `/cms`, a store, or a deployed app) → tell the user plainly what's there
159
+ installed** — WordPress at `/cms`, a store, a PocketBase backend with build artifacts, or a deployed app) → tell the user plainly what's there
149
160
  and **ask them to choose**, regardless of how old it is (don't guess from timestamps):
150
161
 
151
162
  - **Resume** — pick up at the computed stage. (If a `.lock` is present in this case, also confirm no
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: headless-step-refine
3
- description: "Step 2 (refine) of the Hostinger Headless flow. Turns the user's seed — often just a domain — into a brief through conversation: asks what they want to build (purpose, audience, tone, pages, products, must-haves; images, local files, links all welcome), then *infers* the backend that fits (WordPress, Ecommerce, WordPress + Ecommerce, WordPress + WooCommerce for a one-site content+store, or Webapp for a custom app/SPA) — it never asks the user to pick a backend or a technology; it asks for the site name (suggesting a few when the user has none), the user confirms the plan in plain language, and only after their yes it writes brief.md. Hostinger Ecommerce stays the default for selling; WooCommerce is chosen only when the user explicitly asks for it or wants content and a store on one WordPress site."
3
+ description: "Step 2 (refine) of the Hostinger Headless flow. Turns the user's seed — often just a domain — into a brief through conversation: asks what they want to build (purpose, audience, tone, pages, products, must-haves; images, local files, links all welcome), then *infers* the backend that fits (WordPress, Ecommerce, WordPress + Ecommerce, WordPress + WooCommerce for a one-site content+store, or PocketBase for a custom app/SPA or any site whose visitors create its data: accounts, bookings, comments, votes, order requests) — it never asks the user to pick a backend or a technology; it asks for the site name (suggesting a few when the user has none), the user confirms the plan in plain language, and only after their yes it writes brief.md. Hostinger Ecommerce stays the default for selling; WooCommerce is chosen only when the user explicitly asks for it or wants content and a store on one WordPress site."
4
4
  ---
5
5
 
6
6
  # headless-step-refine
@@ -18,7 +18,7 @@ question tool is not the user passing on a question; see *When you ask the user*
18
18
  `SKILL.md`.
19
19
 
20
20
  > **Never ask the user to choose a backend or a technology.** Don't ask "WordPress or Ecommerce?",
21
- > don't present WordPress/Ecommerce/WooCommerce/Webapp as options, and don't surface the backend in a
21
+ > don't present WordPress/Ecommerce/WooCommerce/PocketBase as options, and don't surface the backend in a
22
22
  > multiple-choice UI. Open with **"What do you want to build?"** and infer the backend yourself in
23
23
  > Step 4 from what they describe (and whether they sell). The backend is a technical decision the flow
24
24
  > makes *for* the user — they confirm the **plan** (what the site is and does), not the plumbing. The
@@ -44,7 +44,12 @@ and add it. Change → edit only what they asked for, then re-confirm (Step 5).
44
44
  not Keep; see *When you ask the user* in the top-level `SKILL.md`.
45
45
 
46
46
  If the site is already provisioned (`site.json` exists), the backend is **fixed** — never change the
47
- Suggested backend on a provisioned site. Explain that switching backends means a new domain.
47
+ Suggested backend on a provisioned site. Explain that switching backends means a new domain. The same
48
+ holds when check-state found an onboarding site of setup type `headless_pocketbase`: onboarding has
49
+ already chosen PocketBase, so the backend is **PocketBase**. Refine still finds out what to build, but
50
+ never picks another backend for that domain. A `brief.md` whose Suggested backend is **Webapp** is
51
+ from an older flow: re-decide it in Step 4 (it becomes **PocketBase**, or the user is pointed at the
52
+ `deploy-to-hosting` skill).
48
53
 
49
54
  ## Step 2 — Gather what you already have
50
55
 
@@ -135,21 +140,29 @@ move, so ask each as a confirm of what you found, naming it, so the user only sa
135
140
  1. **Routes that open directly** — the client-side routes you found (name them, e.g. `/stats`,
136
141
  `/settings`) must open from a typed link and survive a refresh? Ask only when the code routes in
137
142
  the browser (React Router, Vue Router, a history or hash router); a server-routed app has none.
138
- 2. **Data** — the database and environment variable names you found (or "none"): is that all the
139
- app needs? Hostinger gives the app MySQL only: a different database (Postgres, MongoDB, a SQLite
140
- file) goes under **Out of scope** as a migration the user owns, not as `Database: MySQL`.
143
+ 2. **Data** — what the app stores, and where. An app **already written against a database of its
144
+ own** — MySQL, Postgres, MongoDB, Supabase, Firebase: its code imports the client
145
+ (`mysql2`, `pg`, `@supabase/supabase-js`, `firebase`), reads `DB_*`/`DATABASE_URL`, or has a
146
+ `supabase/` folder — is **not a headless build**: say so plainly, point the user at the
147
+ `deploy-to-hosting` skill (it deploys the app with its database), and stop here without writing a
148
+ brief. An app with no backend yet, or that stores nothing, continues: what it stores goes to
149
+ **PocketBase** (Step 4). Placeholder values in `.env.example` alone don't mean the app is wired to
150
+ something; confirm with the user when the code is ambiguous.
141
151
 
142
152
  Record the routes and data in **Existing project**.
143
153
 
144
- If the user asks for something outside the scope (user accounts, member areas, bookings with a
145
- calendar backend, user-generated content), say plainly that the headless flow doesn't support it yet
146
- and record it under **Out of scope** — don't promise it.
154
+ Visitor accounts, member areas, bookings with limited places, comments, votes, leaderboards, live
155
+ chat and order requests without payment make the site a **PocketBase** build (Step 4) — don't record
156
+ them as out of scope. Bookings that sync with an outside calendar and payments outside a store stay
157
+ out of scope either way: say so plainly and record them under **Out of scope** — don't promise them.
147
158
 
148
- > **A contact form *is* supported (WordPress backends).** If the user wants one, keep it in
149
- > **Must-haves** and name it "Contact form": provision installs **Contact Form 7** and the frontend
150
- > wires a contact page that emails the site owner. It's **opt-in**: built only when the brief asks
151
- > for it. (A form that needs accounts, payments or a booking calendar is still out of scope — this is a
152
- > plain name/email/message enquiry form.)
159
+ > **A contact form *is* supported.** If the user wants one, keep it in **Must-haves** and name it
160
+ > "Contact form". On a **WordPress** backend, provision installs **Contact Form 7** and the frontend
161
+ > wires a contact page that emails the site owner. On a **PocketBase** backend it is a `messages`
162
+ > collection the owner reads in the dashboard (the contact-form recipe in
163
+ > `../04-content-model/pocketbase/patterns.md`), not Contact Form 7. It's **opt-in**: built only when
164
+ > the brief asks for it. A plain name/email/message enquiry form never turns a content site into a
165
+ > PocketBase build.
153
166
 
154
167
  ### Build mode — a user choice when the folder holds a project
155
168
 
@@ -194,13 +207,18 @@ a question put back to the user. Pick the backend that fits what the user told y
194
207
  | **Ecommerce** | Selling is the point, and the rest is a few static pages (About, Contact, FAQ, policies). No ongoing blog. | Hostinger Ecommerce store — products, collections, checkout, payments, shipping, orders. |
195
208
  | **WordPress + Ecommerce** | Selling **and** regular editorial content (a blog, guides, lookbooks, recipes) the owner keeps adding to, run as **two** backends (WordPress site + separate Hostinger Ecommerce store). | Both: WordPress for content, the Ecommerce store for products and checkout. |
196
209
  | **WordPress + WooCommerce** | **Only** when the user explicitly names WooCommerce, or explicitly wants content **and** a store on **one** WordPress site (one admin, one domain). The one-site alternative to WordPress + Ecommerce. | A single headless WordPress at `/cms` with the WooCommerce plugin — products, cart, coupons and checkout (Cash on Delivery) over the WooCommerce Store API, plus WP posts/pages on the same site. |
197
- | **Webapp** | A custom **app, SPA or web application** that brings its own code and data — a dashboard, tool, calculator, booking app, a project the user is deploying — **not** a content site or a store. No CMS and no store engine. | A plain Node.js app host (an empty website, no `/cms`), with a MySQL database when the app needs one. The app owns all its routes and data. |
210
+ | **PocketBase** | A custom **app, SPA or web application** — a dashboard, tool, calculator, booking app, a project the user is deploying — **not** a content site or a store. Also any site whose **visitors create the data** it keeps and shows: accounts or a member area, bookings with limited places, comments, likes or votes, a leaderboard, live chat, order requests without payment. No CMS and no store engine. | A headless website with a **PocketBase** backend on the same domain: database, visitor sign-in, file storage and realtime at `/api`, the owner's dashboard at `/_/`. The app owns every other route. |
198
211
 
199
212
  Rules of thumb:
200
213
 
201
- - **Is it an app, or a site?** A custom application the user builds/brings (its own logic, its own data,
202
- maybe a database) → **Webapp**. A content site or a shop → one of the three above. When the user says
203
- "my app / SPA / dashboard / tool", or hands you an existing app project to deploy, that's **Webapp**.
214
+ - **Is it an app, or a site?** A custom application the user builds/brings (its own logic, its own
215
+ data) → **PocketBase**. So is a site whose **visitors** write the data and the site shows it back
216
+ (bookings, comments, votes, scores, messages, accounts): the owner writing pages, posts or products
217
+ is a content site or a store; visitors writing records is an app. A plain contact form doesn't make
218
+ it an app. A content site or a shop → one of the three above. When the user says "my app / SPA /
219
+ dashboard / tool", or hands you an existing app project to deploy, that's **PocketBase** — even an
220
+ app that stores nothing yet (a calculator, a static tool): it gets the backend with an empty schema,
221
+ so there is one app path. An app already on its own database is not a headless build (Step 3).
204
222
  - **Selling decides first (for sites).** No selling → WordPress. Selling → Ecommerce or
205
223
  WordPress + Ecommerce.
206
224
  - **Then the content.** Selling plus only a few fixed pages → Ecommerce. Selling plus content the
@@ -215,16 +233,24 @@ Rules of thumb:
215
233
  combination only when the user described ongoing content.
216
234
  - Selling a single service by enquiry (no checkout, no cart) is **not** commerce → WordPress with a
217
235
  contact page.
218
- - **Webapp never uses WordPress or a store.** If the user wants a custom app *and* a CMS/shop, that's two
219
- different sites — build the app as a Webapp and tell them the content/commerce backend is a separate
220
- domain.
236
+ - **PocketBase never sits beside WordPress or a store.** Hostinger runs one backend per headless site
237
+ and refuses PocketBase on a headless WordPress site. A site that is mainly content the owner
238
+ publishes stays WordPress (a blog's comments are WordPress comments). If the user wants a custom app
239
+ *and* a CMS/shop, that's two different sites — build the app on PocketBase and tell them the
240
+ content/commerce backend is a separate domain.
241
+ - **PocketBase never takes payments.** Selling with checkout is Ecommerce; a PocketBase app stores
242
+ order requests the owner handles by hand.
243
+ - **"Supabase" or "Firebase" with nothing wired yet** → PocketBase. Say once: *"Your Hostinger site
244
+ comes with its own backend on the same domain, so you don't need a separate Supabase account. I'll
245
+ use that."* Switch only if they insist, and then it is not a headless build (Step 3).
221
246
 
222
247
  **Then set rendering** (write it in the brief's **Rendering** section): **Ecommerce → SSR required**
223
248
  (carts/search need per-request rendering — any SSR framework works; Next.js is the default, not a
224
249
  requirement); **WordPress + WooCommerce → SSR required** (same reason — cart/checkout need per-request
225
250
  rendering); **WordPress → SSG (Astro)** if the site is mostly static and the owner is fine rebuilding
226
- to publish, otherwise **SSR**; **Webapp → whatever the app is** (SSR for a server app, SPA for a
227
- client-only app) — it deploys as a Node.js app either way. When unsure, default to **Next.js SSR**.
251
+ to publish, otherwise **SSR**; **PocketBase → whatever the app is** (SSR for a server app, SPA for a
252
+ client-only app) — it deploys as a Node.js app either way, and it never serves its own routes under
253
+ `/api` or `/_` (they belong to PocketBase). When unsure, default to **Next.js SSR**.
228
254
 
229
255
  ## Step 5 — Confirm the plan in one message
230
256
 
@@ -236,10 +262,11 @@ build** — the plan, not the plumbing. Lead with the site, not the backend:
236
262
  - **The plan** — what it is, audience, pages, products (if any), tone. Mark anything you defaulted
237
263
  (*"assumed: warm, minimal look"*) so the user sees what they skipped.
238
264
  - **Your app** *(when Step 2 found a project in the folder)* — one line: keeps its look or gets a new
239
- one, the routes that must open directly, and whether a database is created.
265
+ one, the routes that must open directly, and what it will store on the site.
240
266
  - **How it's built** — state the backend as a *consequence* in one plain line, focused on what it
241
267
  means for them day to day ("I'll build this on WordPress, so you edit pages and posts in a normal
242
- WordPress admin"), **not** as a choice you're asking them to make. Don't ask "is WordPress OK?" or
268
+ WordPress admin"; for PocketBase: "Bookings and accounts are saved on your site, and you see and
269
+ manage them in your site's dashboard"), **not** as a choice you're asking them to make. Don't ask "is WordPress OK?" or
243
270
  offer alternatives unless it was a genuine close call *and* the difference matters to the user.
244
271
 
245
272
  End with *"Good to go, or anything to change?"* and end your turn there: nothing after refine
@@ -259,7 +286,7 @@ can. Then update `state.json`:
259
286
 
260
287
  The **Suggested backend** section is the contract with `03-provision/SKILL.md`, which routes on it.
261
288
  Its first line must be exactly one of `**WordPress**`, `**Ecommerce**`, `**WordPress + Ecommerce**`,
262
- `**WordPress + WooCommerce**` or `**Webapp**`, followed by an em dash and the one-line reason.
289
+ `**WordPress + WooCommerce**` or `**PocketBase**`, followed by an em dash and the one-line reason.
263
290
 
264
291
  ## `brief.md` template
265
292
 
@@ -310,11 +337,11 @@ on both.>
310
337
 
311
338
  ## Existing project
312
339
  <only when Step 2 found a project in the folder: its path; the framework; the client-side
313
- routes that must open directly and on refresh (or "None"); Database: none | MySQL; the env var names
314
- the app reads — names only, never values>
340
+ routes that must open directly and on refresh (or "None"); what the app stores (or "Nothing"); the env
341
+ var names the app reads — names only, never values>
315
342
 
316
343
  ## Suggested backend
317
- **<WordPress | Ecommerce | WordPress + Ecommerce | WordPress + WooCommerce | Webapp>** — <one-line reason>.
344
+ **<WordPress | Ecommerce | WordPress + Ecommerce | WordPress + WooCommerce | PocketBase>** — <one-line reason>.
318
345
  <"Confirmed by the user." or "User chose this over the recommended <X> because <reason>.">
319
346
 
320
347
  ## Build mode
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: headless-step-provision
3
- description: "Step 3 (provision) of the Hostinger Headless flow. Chooses the backend from brief.md (wordpress | ecommerce | webapp), then routes to the matching subfolder to provision it; writes site.json. WordPress + WooCommerce routes to the wordpress subfolder with the WooCommerce store turned on — it is not a separate backend."
3
+ description: "Step 3 (provision) of the Hostinger Headless flow. Chooses the backend from brief.md (wordpress | ecommerce | pocketbase), then routes to the matching subfolder to provision it; writes site.json. WordPress + WooCommerce routes to the wordpress subfolder with the WooCommerce store turned on — it is not a separate backend."
4
4
  ---
5
5
 
6
6
  # headless-step-provision
@@ -19,16 +19,17 @@ Read the brief's **Suggested backend** section:
19
19
  | WordPress | `wordpress/SKILL.md` |
20
20
  | WordPress + WooCommerce | `wordpress/SKILL.md` **with the WooCommerce store on** (its Steps 4–5; `site.json → backend` stays `"wordpress"`) |
21
21
  | Ecommerce | `ecommerce/SKILL.md` |
22
- | Webapp | `webapp/SKILL.md` |
22
+ | PocketBase | `pocketbase/SKILL.md` |
23
23
 
24
24
  If the section is missing or names something else, go back to **refine** — don't pick one here.
25
25
  Tell the user the backend and its one-line reason before provisioning.
26
26
 
27
- > **Supported backends: `wordpress` (optionally with a WooCommerce store), `ecommerce` and `webapp`.**
28
- > `webapp` is a plain Node.js app host (an empty website — no CMS, no store, no `/cms`) for any app/SPA
29
- > that brings its own code and data; it never installs WordPress. PocketBase is not available in this
30
- > version — refine never proposes it, and there is no `pocketbase/` subfolder; if a brief somehow names
31
- > it, stop and tell the user rather than improvising it. A **WordPress + Ecommerce** brief (two separate
27
+ > **Supported backends: `wordpress` (optionally with a WooCommerce store), `ecommerce` and `pocketbase`.**
28
+ > `pocketbase` is a headless website whose backend is PocketBase at `/api` and `/_/` of the same
29
+ > domain (database, visitor sign-in, file storage, realtime), for any app or site whose visitors create
30
+ > its data; it never installs WordPress. Every backend is a headless website: there is no plain
31
+ > Node.js app host in this flow. A brief that names **Webapp** is from an older flow: go back to
32
+ > refine. A **WordPress + Ecommerce** brief (two separate
32
33
  > backends — a WordPress site **and** a Hostinger Ecommerce store) has no single combined `hosting_websites_create`
33
34
  > type yet: stop, tell the user it isn't supported as one site, and offer either to continue with just
34
35
  > WordPress or just Ecommerce (route to that one subfolder), **or**, if they want content and a store on
@@ -39,19 +40,9 @@ Tell the user the backend and its one-line reason before provisioning.
39
40
 
40
41
  Onboarding can create the website **before** you ever run, as an **empty headless shell**
41
42
  (`hosting_websites_create { type: "headless_empty" }`: `website_type` is `headless`, but **nothing
42
- is installed**). The single-instance gate in Step 2 is the checklist.
43
-
44
- > **Webapp is not part of this handoff at all.** `webapp` is **not** reached on the usual onboarding
45
- > flow — it is only triggered by experimental actions — so it **ignores headless instances entirely**:
46
- > it never detects, adopts or swaps an empty headless shell, and provisions its own **Node.js app host**
47
- > exactly as `webapp/SKILL.md` defines today. The swap below is **WordPress and Ecommerce only**.
48
- >
49
- > **But webapp must still never create a second instance for this build.** Only route here when the
50
- > brief's backend is `webapp` — a `wordpress` or `ecommerce` brief is never provisioned as a webapp. And
51
- > if this build's domain already has a headless shell/site (an onboarding `headless_empty`, or any row
52
- > from the single-instance gate below), **do not** spin up a separate Node.js host on another domain:
53
- > stop and tell the user the domain already has a headless instance, rather than leaving the build split
54
- > across two sites.
43
+ is installed**), or, when onboarding already chose PocketBase, as a `headless_pocketbase` site whose
44
+ backend may not exist yet. The single-instance gate in Step 2 is the checklist. Every backend goes
45
+ through it: none of them ever creates a second website for a domain that already has a headless one.
55
46
 
56
47
  ## Step 2 — Fire (don't block)
57
48
 
@@ -59,17 +50,20 @@ is installed**). The single-instance gate in Step 2 is the checklist.
59
50
  > 1. **Exact-match the domain** in `hosting_websites_list` (substring filter — match the exact `domain`).
60
51
  > 2. **A `headless` row already exists → adopt + swap it, never create.** Install the backend into that
61
52
  > same site (WordPress → `wordpress_installations_install { type: "headless" }` into `/cms`; Ecommerce
62
- > → adopt as the storefront host). **Do not call `hosting_websites_create` again** — that makes a second site.
53
+ > → adopt as the storefront host; PocketBase → `hosting_pocketbase_create-backend` on it, which turns a
54
+ > `headless_empty` site into `headless_pocketbase`). **Do not
55
+ > call `hosting_websites_create` again** — that makes a second site.
63
56
  > 3. **No row at all → create one fresh** with the backend's own `hosting_websites_create` type. Create it for **this
64
57
  > build's domain only** — never provision the backend on a different domain than the frontend (the CMS
65
58
  > is the `/cms` path of the same site, never a separate `cms.<domain>`).
66
59
  > 4. **A row of a different kind** (`website_type` not `headless`) → **stop and tell the user**; never
67
60
  > overwrite it.
68
61
  >
69
- > `wordpress/SKILL.md` Step 1 and `ecommerce/SKILL.md` Step 1 say how to tell an empty shell from an
70
- > already-provisioned backend.
62
+ > `wordpress/SKILL.md` Step 1, `ecommerce/SKILL.md` Step 1 and `pocketbase/SKILL.md` Step 1 say how to
63
+ > tell an empty shell from an already-provisioned backend.
71
64
 
72
- Follow the chosen subfolder's `SKILL.md` through **detect + create** (its `hosting_websites_create` call). The
65
+ Follow the chosen subfolder's `SKILL.md` through **detect + create** (its `hosting_websites_create` call,
66
+ or for a PocketBase shell swap its `hosting_pocketbase_create-backend` call). The
73
67
  moment the create is accepted and queued, record it in `state.json` and **return** — do not wait for
74
68
  it yet:
75
69
 
@@ -84,7 +78,8 @@ shell). The subfolder's readiness poll, verification and `site.json` are the **j
84
78
  ## Step 3 — Join (at the instance barrier)
85
79
 
86
80
  When an instance-barrier step is about to run (content-model push, frontend data wiring, deploy) — or
87
- right away, if the agent can't interleave — finish the subfolder's `SKILL.md`: run its `wait.mjs` (it
81
+ right away, if the agent can't interleave — finish the subfolder's `SKILL.md`: run its `wait.mjs`
82
+ (`setup`, `cms` or `pocketbase`; it
88
83
  returns at once if the job is already done), run its verification, and write `site.json` (which
89
84
  records the chosen `backend`). Then set `provision.status` to `"completed"` in `state.json` with a
90
85
  fresh `updated_at`.