@wix/agent-skills 1.16.0 → 1.16.1
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.
- package/package.json +1 -1
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +18 -3
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +12 -7
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +60 -0
- package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +6 -6
- package/skills/wix-app/references/editor-react-component/SITE-CONTEXT-HOOKS.md +187 -0
- package/skills/wix-app/scripts/scan-a11y-code.cjs +777 -0
- package/skills/wix-app/scripts/scan-a11y-eslint.cjs +201 -0
- package/skills/wix-headless/references/CAPABILITIES.md +16 -3
- package/skills/wix-headless/references/SDK_HANDOFF.md +1 -1
- package/skills/wix-headless/references/SEED.md +1 -1
- package/skills/wix-headless/references/inline-recipes/how-to-code-forms.md +560 -102
- package/skills/wix-headless/references/inline-recipes/setup-forms.md +210 -143
- package/skills/wix-manage/SKILL.md +8 -1
- package/skills/wix-manage/references/accessibility/scan-site-accessibility.md +98 -0
- package/skills/wix-manage/references/analytics/analytics-dashboard-navigation.md +1 -2
- package/skills/wix-manage/references/sites/site-import.md +67 -15
- package/skills/wix-replatform/resources/rp-target-wix/lib/wix-writers.js +1 -1
- package/skills/wix-vibe-headless/SKILL.md +2 -1
- package/skills/wix-vibe-headless/install/deploy.cjs +64 -3
- package/skills/wix-vibe-headless/platforms/base44.md +12 -37
- package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +7 -11
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +7 -11
- package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +1 -2
- package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +7 -12
- package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +7 -11
- package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +7 -11
- package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +7 -11
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +7 -11
- package/skills/wix-vibe-headless/references/shared/app/components/WixManageBanner.jsx +1 -1
- package/skills/wix-vibe-headless/references/shared/app/rest/wix-config.js +5 -3
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +7 -11
- package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +44 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "Site Import"
|
|
3
|
-
description: Drive the Wix Site Import agent to migrate an existing store or site from another platform (Shopify, WooCommerce, Magento, or any URL) into Wix. Use this skill whenever the user wants to import, migrate, or clone a store/site into Wix, mentions moving off Shopify/WooCommerce/Magento, or gives a source store URL and asks to bring it into Wix. Covers starting the import, polling progress, answering the agent's mid-import questions, handling deploy/failure/auth-expiry states, and sending post-deploy follow-up changes.
|
|
3
|
+
description: Drive the Wix Site Import agent to migrate an existing store or site from another platform (Shopify, WooCommerce, Magento, or any URL) into Wix, or to import from CSV/TSV export files with no source site. Use this skill whenever the user wants to import, migrate, or clone a store/site into Wix, mentions moving off Shopify/WooCommerce/Magento, or gives a source store URL and asks to bring it into Wix. Covers starting the import, polling progress, answering the agent's mid-import questions, handling deploy/failure/auth-expiry states, and sending post-deploy follow-up changes.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Site Import
|
|
@@ -54,7 +54,20 @@ Example — Start:
|
|
|
54
54
|
|
|
55
55
|
```
|
|
56
56
|
POST https://www.wixapis.com/site-import/v1/imports
|
|
57
|
-
Body: {
|
|
57
|
+
Body: {
|
|
58
|
+
"request": "Import https://example-store.com into a new Wix site",
|
|
59
|
+
"source_url": "https://example-store.com"
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Example — Start from exported files (no source site, FILE run):
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
POST https://www.wixapis.com/site-import/v1/imports
|
|
67
|
+
Body: {
|
|
68
|
+
"request": "Import these product export files into a new Wix site",
|
|
69
|
+
"fileUrls": ["https://example.com/exports/products.csv"]
|
|
70
|
+
}
|
|
58
71
|
```
|
|
59
72
|
|
|
60
73
|
Example — Poll:
|
|
@@ -96,7 +109,8 @@ and act only on the user's explicit yes.
|
|
|
96
109
|
|
|
97
110
|
This creates real infrastructure and writes to the user's Wix account. Before
|
|
98
111
|
calling **Start**, confirm:
|
|
99
|
-
- The source URL and platform are correct
|
|
112
|
+
- The source URL and platform are correct — or, for a file-only import, the
|
|
113
|
+
export file URL(s) are correct
|
|
100
114
|
- The user understands it runs for up to ~60 minutes and may ask questions mid-way
|
|
101
115
|
|
|
102
116
|
Also confirm before calling **Cancel** — it's irreversible.
|
|
@@ -107,7 +121,7 @@ You are the user experience; the API is plumbing. Keep the protocol invisible:
|
|
|
107
121
|
|
|
108
122
|
- **Show the `importId` once, right after Start succeeds** — e.g. "Your import
|
|
109
123
|
ID is `abc123` — keep it handy." Never show raw JSON, HTTP codes, artifact
|
|
110
|
-
ids, or `sourcePlatform`/`sourceConfidence` values.
|
|
124
|
+
ids, or `sourcePlatform`/`sourceConfidence`/`destinationSiteId` values.
|
|
111
125
|
- **Write for a non-technical audience.** No jargon: no "endpoint", "API",
|
|
112
126
|
"poll", "HTTP", "rate limit", "JSON". Translate events into plain outcomes —
|
|
113
127
|
"the source store limits how fast it can be read" not "hit rate limit (429)".
|
|
@@ -148,12 +162,37 @@ You are the user experience; the API is plumbing. Keep the protocol invisible:
|
|
|
148
162
|
**Single `importId` for the whole import — assigned at Start, never changes.**
|
|
149
163
|
|
|
150
164
|
1. **Start** — `POST /v1/imports`
|
|
151
|
-
Body: `{"request": "<natural language; MUST include the source store URL>"}`
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
165
|
+
Body: `{"request": "<natural language; MUST include the source store URL when crawling a live site>", "source_url": "<the source store URL>", "fileUrls": ["<CSV/TSV export URL>", ...]}`
|
|
166
|
+
`request` is required (1–20000 chars). `source_url` and `fileUrls` are both
|
|
167
|
+
optional, but send whichever applies — never leave both out with no way to
|
|
168
|
+
identify what to import:
|
|
169
|
+
- **`source_url`** — send it whenever the user names a site to crawl. It's
|
|
170
|
+
the identity the service uses to select which migration the request joins,
|
|
171
|
+
not just an extra hint.
|
|
172
|
+
- **`fileUrls`** — send it when the user has CSV/TSV export file(s) to import
|
|
173
|
+
instead of crawling a live site. Setting it makes this a **FILE run**: no
|
|
174
|
+
source site is probed and no source credentials are requested, even if
|
|
175
|
+
`source_url` is also present — `source_url` only changes what the
|
|
176
|
+
migration is keyed on (see below), it does not add a crawl on top of the
|
|
177
|
+
file import. Up to 20 URLs, http/https only (ports 80/443), each ≤2048
|
|
178
|
+
chars. If `source_url` is absent, the file set itself is the migration
|
|
179
|
+
identity — re-sending the same URLs continues the same migration; a
|
|
180
|
+
different set starts a new one. If a URL isn't reachable, the whole call
|
|
181
|
+
is rejected with `INVALID_FILE_URL` (nothing is silently dropped).
|
|
182
|
+
- A request with neither `source_url` nor a URL/site identifiable in
|
|
183
|
+
`request`, and no `fileUrls`, is rejected with `SITE_UNIDENTIFIED`.
|
|
184
|
+
Returns: `importId`, `sourcePlatform`, `sourceConfidence`, `destinationSiteId`.
|
|
185
|
+
`sourcePlatform` comes back as `CSV` for a FILE run (no site was probed, so
|
|
186
|
+
`sourceConfidence` is meaningless there). `destinationSiteId` is the id of
|
|
187
|
+
the Wix site being imported into — returned as soon as Start succeeds,
|
|
188
|
+
even before a source is confirmed.
|
|
189
|
+
**One import per store at a time, keyed on `source_url`** (or the file set
|
|
190
|
+
when there's no `source_url`): re-starting with the same identity continues
|
|
191
|
+
the SAME migration (server returns the existing `importId`, no new import
|
|
192
|
+
created). A different identity always starts an independent migration, even
|
|
193
|
+
for the same user. If a different user on the account already owns an
|
|
194
|
+
import for that identity, Start returns
|
|
195
|
+
`409 { "code": "IMPORT_IN_PROGRESS" }` — tell the user and stop.
|
|
157
196
|
|
|
158
197
|
2. **Poll** — `GET /v1/imports/{importId}?includeRecentActivity=true`
|
|
159
198
|
Returns: `status`, `deployUrl`, `message`, `options[]` (only when
|
|
@@ -230,13 +269,26 @@ the user has no way to open a file.
|
|
|
230
269
|
- Never invent a `deployUrl` — only report the one returned with `DEPLOYED`.
|
|
231
270
|
- Treat `NEEDS_INPUT` and `AUTH_EXPIRED` as normal conversation turns, not
|
|
232
271
|
errors.
|
|
233
|
-
- **Site Import is in limited rollout
|
|
234
|
-
`"code": "NOT_ENABLED"`, tell the user
|
|
235
|
-
|
|
236
|
-
Do not
|
|
272
|
+
- **Site Import is in limited rollout, with no self-service enablement path.**
|
|
273
|
+
If Start returns `404` or `403` with `"code": "NOT_ENABLED"`, tell the user
|
|
274
|
+
plainly that site import isn't available on their account yet — then stop.
|
|
275
|
+
**Do not tell them to "contact Wix support"**: this API is unlisted and
|
|
276
|
+
ALPHA, Wix Support has no visibility into it or way to grant access, and the
|
|
277
|
+
public "importing a site created outside of Wix" help-center article is an
|
|
278
|
+
unrelated, long-stalled feature-request page — sending a user to either is a
|
|
279
|
+
dead end. If a Wix feedback tool is available in your environment, you may
|
|
280
|
+
offer to send feedback noting their interest; that is the only channel that
|
|
281
|
+
reaches the team. Do not retry or fall back to another site-creation tool.
|
|
237
282
|
- Any other `403` on Start means the caller is not authorized — tell the user
|
|
238
283
|
and stop. Do not probe other endpoints to diagnose this. A `400` means a
|
|
239
|
-
required field is missing (`request`/`message` must be 1–20000 chars)
|
|
284
|
+
required field is missing (`request`/`message` must be 1–20000 chars),
|
|
285
|
+
`source_url` exceeds 2048 chars, or `fileUrls` has more than 20 entries or
|
|
286
|
+
one over 2048 chars. A request with no identifiable site (no `source_url`
|
|
287
|
+
and no URL in `request`) and no `fileUrls` is rejected with
|
|
288
|
+
`SITE_UNIDENTIFIED` — ask the user for the store URL or export file(s) and
|
|
289
|
+
retry. A `fileUrls` entry that isn't a reachable http/https URL rejects the
|
|
290
|
+
whole call with `INVALID_FILE_URL` — tell the user which link failed and ask
|
|
291
|
+
for a working one.
|
|
240
292
|
- Requesting an unknown id in `artifactIds` is silently ignored — not an error.
|
|
241
293
|
A document simply may not exist yet on an earlier turn.
|
|
242
294
|
- **The user cannot open files.** If a message mentions a document by filename,
|
|
@@ -324,7 +324,7 @@ function applySafeModeToRequestBody(body, safeModeOptions) {
|
|
|
324
324
|
// media import, Contacts manage/schema, and Members manage.
|
|
325
325
|
//
|
|
326
326
|
// Auth scheme normalization: Wix API keys (`IST.…`) are sent RAW in the Authorization
|
|
327
|
-
// header; OAuth access tokens (e.g. a Wix CLI token from `npx @wix/cli token --site …`)
|
|
327
|
+
// header; OAuth access tokens (e.g. a Wix CLI token from `npx @wix/cli@latest token --site …`)
|
|
328
328
|
// must be sent as `Bearer <token>`. Detect and prefix so both credential kinds work.
|
|
329
329
|
function authHeaderValue(token) {
|
|
330
330
|
const t = String(token).trim();
|
|
@@ -149,7 +149,8 @@ installed, not what the business is about. Never default to store/bookings on si
|
|
|
149
149
|
`INSTRUCTIONS.md`.
|
|
150
150
|
3. **Ensure the vertical's files are in place** — copy `references/<vertical>/app/` and
|
|
151
151
|
`references/shared/app/` into the app's `src/`, and set `WIX_CLIENT_ID` in `wix-config.js`. (Where
|
|
152
|
-
and how they get there is your platform's call — see its instructions.
|
|
152
|
+
and how they get there is your platform's call — see its instructions. On base44 the install step
|
|
153
|
+
writes and verifies `wix-config.js` for you, so there's nothing to set by hand.)
|
|
153
154
|
4. **Wire the shipped client** following the vertical's INSTRUCTIONS: the components are themed by
|
|
154
155
|
base44's design tokens (`src/index.css` — shadcn palette, already set by the design phase), so
|
|
155
156
|
there's no re-skin step; just wire routes + header/footer through the Layout. The UI ships as
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// Post-install deploy — run by base44.md STEP 1 with the vertical(s) the app needs:
|
|
2
|
-
// node deploy.cjs <vertical> [<vertical> …]
|
|
2
|
+
// node deploy.cjs <vertical> [<vertical> …] --client-id <id> --metasite-id <id>
|
|
3
3
|
// (storefront | bookings | blog | cms | portfolio | pricing-plans | events | members)
|
|
4
|
+
// Pass the two ids from the prompt and this writes src/rest/wix-config.js for you — see WRITE below.
|
|
5
|
+
// Retyping those ids into the file by hand is how a storefront ships with a dead client id.
|
|
4
6
|
// ONE mechanism: recursively copy `app/` -> /app/src. The shared transport (app/rest/wix-client.js,
|
|
5
7
|
// wix-config.js) is copied always; then each named vertical's app/ (its UI + app/rest/ helpers).
|
|
6
8
|
// Deploy every vertical the app actually uses, in one call or across several — an app that needs both
|
|
@@ -13,9 +15,10 @@
|
|
|
13
15
|
// No vertical arg -> deploys just the shared transport; re-run with the vertical(s) once known.
|
|
14
16
|
// NOTE: .cjs on purpose — the app is an ESM package ("type":"module"); a .js here would load as ESM
|
|
15
17
|
// and require()/module.exports would throw.
|
|
16
|
-
const { existsSync, cpSync, readFileSync } = require('fs');
|
|
18
|
+
const { existsSync, cpSync, readFileSync, writeFileSync } = require('fs');
|
|
17
19
|
|
|
18
20
|
const REF = '/app/.agents/skills/wix-vibe-headless/references';
|
|
21
|
+
const WIX_CONFIG = '/app/src/rest/wix-config.js';
|
|
19
22
|
const VERTICALS = ['storefront', 'bookings', 'blog', 'cms', 'portfolio', 'pricing-plans', 'events', 'members', 'restaurants'];
|
|
20
23
|
|
|
21
24
|
// force:false + errorOnExist:false — fill in only files that AREN'T there yet; never overwrite.
|
|
@@ -66,11 +69,55 @@ function replaceMembersAuthLeftovers() {
|
|
|
66
69
|
return result;
|
|
67
70
|
}
|
|
68
71
|
|
|
72
|
+
// --- WRITE the credentials ----------------------------------------------------------------------
|
|
73
|
+
//
|
|
74
|
+
// The two ids arrive as flags so this script writes them once, character-for-character, instead of a
|
|
75
|
+
// later hand-edit of the placeholder file.
|
|
76
|
+
//
|
|
77
|
+
// An id already in the file wins; the flags only fill what is unset. A host that writes this file
|
|
78
|
+
// at app creation (Base44) has each id as an exact value rather than a copy read out of a prompt.
|
|
79
|
+
// Per id, so a host that resolved one but not the other still gets the gap filled.
|
|
80
|
+
//
|
|
81
|
+
// This briefly worked the other way round for WIX_METASITE_ID, while Base44 could write a different
|
|
82
|
+
// site than the business: it shared one field between the launch and a metasite it provisions per
|
|
83
|
+
// app, and the launch's id lost. Fixed on that side, and the ids it stores now verify against the
|
|
84
|
+
// site each launch came from, so the file is trusted again.
|
|
85
|
+
function readWixConfig() {
|
|
86
|
+
if (!existsSync(WIX_CONFIG)) return {};
|
|
87
|
+
const src = readFileSync(WIX_CONFIG, 'utf8');
|
|
88
|
+
const pick = (name) => {
|
|
89
|
+
const v = (src.match(new RegExp(`${name}\\s*=\\s*["']([^"']*)["']`)) || [])[1] || '';
|
|
90
|
+
return v.startsWith('<') ? '' : v; // the shipped file's `<YOUR-…>` placeholders count as unset
|
|
91
|
+
};
|
|
92
|
+
return { clientId: pick('WIX_CLIENT_ID'), metaSiteId: pick('WIX_METASITE_ID') };
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function writeWixConfig(clientId, metaSiteId) {
|
|
96
|
+
const body = [
|
|
97
|
+
'// Wix credentials — written by the skill\'s deploy step from the ids in your prompt.',
|
|
98
|
+
'// Safe to commit: WIX_CLIENT_ID is a public, buyer-facing id (it only mints anonymous visitor',
|
|
99
|
+
'// tokens); WIX_METASITE_ID just identifies the site.',
|
|
100
|
+
`export const WIX_CLIENT_ID = "${clientId}";`,
|
|
101
|
+
`export const WIX_METASITE_ID = "${metaSiteId}";`,
|
|
102
|
+
'',
|
|
103
|
+
].join('\n');
|
|
104
|
+
writeFileSync(WIX_CONFIG, body);
|
|
105
|
+
}
|
|
106
|
+
|
|
69
107
|
// --- main ---------------------------------------------------------------------------------------
|
|
70
108
|
|
|
71
109
|
// Accept one or many: `deploy.cjs members cms`. Duplicates collapse; order is preserved so the
|
|
72
110
|
// first vertical listed wins any same-path file (the copy never overwrites).
|
|
73
|
-
const
|
|
111
|
+
const argv = process.argv.slice(2);
|
|
112
|
+
const flag = (name) => {
|
|
113
|
+
const i = argv.indexOf(`--${name}`);
|
|
114
|
+
return i !== -1 && argv[i + 1] && !argv[i + 1].startsWith('--') ? argv[i + 1] : null;
|
|
115
|
+
};
|
|
116
|
+
const clientId = flag('client-id');
|
|
117
|
+
const metaSiteId = flag('metasite-id');
|
|
118
|
+
// Verticals are the positional args — drop the flags and their values.
|
|
119
|
+
const flagArgs = new Set(['--client-id', '--metasite-id', clientId, metaSiteId].filter(Boolean));
|
|
120
|
+
const requested = [...new Set(argv.filter((a) => !flagArgs.has(a)))];
|
|
74
121
|
const deployed = { verticals: [] };
|
|
75
122
|
|
|
76
123
|
// Shared transport — always (app/rest/wix-client.js, wix-config.js -> src/rest/).
|
|
@@ -92,4 +139,18 @@ if (!requested.length) {
|
|
|
92
139
|
deployed.note = 'no vertical given — deployed the shared transport only; re-run: node deploy.cjs <vertical> [<vertical> …]';
|
|
93
140
|
}
|
|
94
141
|
|
|
142
|
+
const onDisk = readWixConfig();
|
|
143
|
+
const finalClientId = onDisk.clientId || clientId;
|
|
144
|
+
const finalMetaSiteId = onDisk.metaSiteId || metaSiteId;
|
|
145
|
+
|
|
146
|
+
if (!finalClientId || !finalMetaSiteId) {
|
|
147
|
+
deployed.wixConfig = 'missing_ids — src/rest/wix-config.js is not configured; re-run with '
|
|
148
|
+
+ '--client-id and --metasite-id rather than editing the file by hand';
|
|
149
|
+
} else if (finalClientId === onDisk.clientId && finalMetaSiteId === onDisk.metaSiteId) {
|
|
150
|
+
deployed.wixConfig = 'already_set';
|
|
151
|
+
} else {
|
|
152
|
+
writeWixConfig(finalClientId, finalMetaSiteId);
|
|
153
|
+
deployed.wixConfig = 'written';
|
|
154
|
+
}
|
|
155
|
+
|
|
95
156
|
console.log(JSON.stringify(deployed));
|
|
@@ -18,10 +18,7 @@ Install two skills — they land under `.agents/skills/`:
|
|
|
18
18
|
- **`wix-docs`** — a **fallback**: search + read the Wix API docs for anything `wix-vibe-headless`
|
|
19
19
|
doesn't cover.
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
skills, then runs `deploy.cjs <vertical…>` (lays the shared transport + **each** listed vertical's
|
|
23
|
-
REST scaffolds and UI client into `src/`) and `pin-agents-md.cjs` (pins the project's AGENTS.md
|
|
24
|
-
note so later turns keep the rules).
|
|
21
|
+
Run this through exec_tool, exactly as written — installs both skills, deploys REST scaffolds + UI into `src/`, writes `wix-config.js`, and pins the AGENTS.md note.
|
|
25
22
|
|
|
26
23
|
**Set `VERTICALS`** to what the prompt asks for (too vague to tell? do STEP 2 first, then set it):
|
|
27
24
|
|
|
@@ -37,19 +34,20 @@ note so later turns keep the rules).
|
|
|
37
34
|
| `members` | let visitors sign in — this is **auth** |
|
|
38
35
|
| `cms` | keep its own structured content — user submissions, galleries, listings, anything the rows above don't already cover |
|
|
39
36
|
|
|
40
|
-
**List every vertical the app
|
|
41
|
-
spans them, so all their scaffolds come from the skill rather than being written by hand. Anything the
|
|
42
|
-
app stores itself needs `cms`, and anything where visitors sign in needs `members`, so those two often
|
|
43
|
-
join whichever vertical is the main one. Adding one later is fine too: re-run with the extra name (the
|
|
44
|
-
copy only fills in missing files).
|
|
37
|
+
**List every vertical the app uses.** `cms` for app-stored content, `members` for visitor sign-in — these often join the main vertical. Adding one later: re-run with the extra name.
|
|
45
38
|
|
|
46
39
|
```js
|
|
47
40
|
const { execSync } = require('child_process');
|
|
48
|
-
const { readdirSync } = require('fs');
|
|
41
|
+
const { existsSync, readdirSync } = require('fs');
|
|
49
42
|
const VERTICALS = ['storefront']; // ← set from the prompt; list every vertical the app uses
|
|
50
43
|
// const VERTICALS = ['members', 'cms']; // ← e.g. visitors sign in AND the app stores what they submit
|
|
44
|
+
// COPY these two straight from the prompt — deploy writes them into src/rest/wix-config.js, so never
|
|
45
|
+
// retype either one into a file by hand afterwards.
|
|
46
|
+
const WIX_CLIENT_ID = '<client id from the prompt>';
|
|
47
|
+
const WIX_METASITE_ID = '<site id from the prompt>';
|
|
51
48
|
const results = {};
|
|
52
49
|
for (const skill of ['wix-vibe-headless', 'wix-docs']) {
|
|
50
|
+
if (existsSync(`/app/.agents/skills/${skill}/SKILL.md`)) { results[skill] = 'already_installed'; continue; }
|
|
53
51
|
try {
|
|
54
52
|
const out = execSync(`CI=1 npx -y skills add wix/skills/skills/${skill} --yes 2>&1`,
|
|
55
53
|
{ cwd: '/app', timeout: 60000, shell: '/bin/bash' }).toString().replace(/\x1b\[[0-9;]*m/g, '');
|
|
@@ -57,18 +55,12 @@ for (const skill of ['wix-vibe-headless', 'wix-docs']) {
|
|
|
57
55
|
: out.includes('No valid skills') ? 'not_found' : 'unknown';
|
|
58
56
|
} catch (e) { results[skill] = 'error: ' + e.message; }
|
|
59
57
|
}
|
|
60
|
-
|
|
61
|
-
const deploy = execSync(`node /app/.agents/skills/wix-vibe-headless/install/deploy.cjs ${VERTICALS.join(' ')}`, { cwd: '/app' }).toString();
|
|
62
|
-
// Pin the project's AGENTS.md note (idempotent) so the rules survive after this doc leaves context.
|
|
58
|
+
const deploy = execSync(`node /app/.agents/skills/wix-vibe-headless/install/deploy.cjs ${VERTICALS.join(' ')} --client-id ${WIX_CLIENT_ID} --metasite-id ${WIX_METASITE_ID}`, { cwd: '/app' }).toString();
|
|
63
59
|
const agentsMd = execSync(`node /app/.agents/skills/wix-vibe-headless/install/pin-agents-md.cjs`, { cwd: '/app' }).toString();
|
|
64
60
|
return { results, installed: readdirSync('/app/.agents/skills'), deploy: JSON.parse(deploy), agentsMd: JSON.parse(agentsMd) };
|
|
65
61
|
```
|
|
66
62
|
|
|
67
|
-
Read
|
|
68
|
-
`.agents/skills/wix-vibe-headless/SKILL.md`; absolute `/app/...` fails — exec_tool/shell wants
|
|
69
|
-
absolute). Prefer it over `cat`/exec_tool and web-fetch, which cap output (~5000 chars) and
|
|
70
|
-
truncate. Always read from **`.agents/skills/` exactly**, on later turns too — don't guess; ignore
|
|
71
|
-
stray copies like `agent/skills/`.
|
|
63
|
+
Read skills with **`read_file`** using workspace-relative paths (e.g. `.agents/skills/wix-vibe-headless/SKILL.md`) — absolute `/app/...` fails. Always read from `.agents/skills/` exactly on every turn; ignore stray copies like `agent/skills/`.
|
|
72
64
|
|
|
73
65
|
## STEP 2 (optional) — Brief doesn't say what to build? Read the site
|
|
74
66
|
|
|
@@ -96,13 +88,7 @@ fails or shows nothing relevant, ask the user what they offer.
|
|
|
96
88
|
Read `.agents/skills/wix-vibe-headless/SKILL.md` and follow it **EXACTLY** — the single source of
|
|
97
89
|
truth for how the client is built.
|
|
98
90
|
|
|
99
|
-
**REST scaffolds are already in `src/rest/`** (STEP 1).
|
|
100
|
-
`WIX_CLIENT_ID` and `WIX_METASITE_ID` from the prompt — the one place both ids live (a single write,
|
|
101
|
-
nothing to read). Some
|
|
102
|
-
verticals also ship a **ready UI client** under `src/` (STEP 1 deployed it) — theme + wire it per
|
|
103
|
-
`INSTRUCTIONS.md`, don't rebuild. STEP 1 already deployed these files — **don't `read_file` the
|
|
104
|
-
deployed component/page source to inspect them**; every field shape is in `INSTRUCTIONS.md`. Read a
|
|
105
|
-
deployed file only on a real fallback (an error, or a field the snippets don't cover).
|
|
91
|
+
**REST scaffolds + `wix-config.js` are already in `src/rest/`** (STEP 1 wrote them). Some verticals also ship a ready UI client in `src/` — theme + wire it per `INSTRUCTIONS.md`, don't rebuild. **Don't `read_file` deployed files** — every field shape is in `INSTRUCTIONS.md`; read one only on a real error or gap.
|
|
106
92
|
|
|
107
93
|
**`src/App.jsx`: edit surgically, never rewrite.** It carries required platform auth scaffolding
|
|
108
94
|
(`AuthProvider`/`useAuth` from `@/lib/AuthContext`); a full rewrite drops them → the validator
|
|
@@ -147,11 +133,6 @@ build the client, so the urls are ready by the time you seed.
|
|
|
147
133
|
The connector + seeding are **admin-only** (STEP 4) — **not** part of the client, which is built
|
|
148
134
|
solely per the `wix-vibe-headless` skill.
|
|
149
135
|
|
|
150
|
-
## Parallelism
|
|
151
|
-
|
|
152
|
-
Run STEP 3 and STEP 4 in parallel — building and seeding are independent. Within each, also
|
|
153
|
-
parallelize independent work (API calls, multiple entities).
|
|
154
|
-
|
|
155
136
|
## STEP 5 — Wrap up
|
|
156
137
|
|
|
157
138
|
Once the site is built and seeded:
|
|
@@ -163,13 +144,7 @@ Once the site is built and seeded:
|
|
|
163
144
|
metasite id) to complete setup in Wix (required), and mention that the preview shows a dismissible
|
|
164
145
|
top banner linking to this same dashboard.
|
|
165
146
|
|
|
166
|
-
**Preview briefly, don't chase images.**
|
|
167
|
-
alt-text/broken in this preview because `generate_image` returns a `/__generating__/…` placeholder —
|
|
168
|
-
the platform swaps every placeholder for the final url **automatically at the end of the turn**
|
|
169
|
-
(failed ones get a stock fallback), in your own components and the seeded data alike. So a broken
|
|
170
|
-
image in the preview is expected and already handled: **do NOT swap, re-seed, re-attach, or debug
|
|
171
|
-
image urls.** Hand-editing a placeholder `src` is wasted work and just risks find_replace errors on
|
|
172
|
-
urls that are about to be replaced anyway. Leave them and finish.
|
|
147
|
+
**Preview briefly, don't chase images.** Broken images are expected — `generate_image` returns a `/__generating__/…` placeholder that the platform swaps for the final url automatically at turn end (failures get a stock fallback). **Do NOT edit, re-seed, or debug image urls.** Leave them and finish.
|
|
173
148
|
|
|
174
149
|
## Later admin requests
|
|
175
150
|
|
|
@@ -25,11 +25,11 @@ don't need to open them:**
|
|
|
25
25
|
| `hooks/usePostDetail.js` | post-detail data — load by slug, not-found state, resolved category/tag chips, body paragraphs |
|
|
26
26
|
| `components/PostCard.jsx`, `PostGrid.jsx` | post listing UI (grid + card, with cover image + empty state) |
|
|
27
27
|
| `components/PostChips.jsx` | category/tag chips for a post (resolves ids via the taxonomy, routes by slug) |
|
|
28
|
-
| `components/WixManageBanner.jsx` | preview-only manage banner — drop it into your Layout (STEP
|
|
28
|
+
| `components/WixManageBanner.jsx` | preview-only manage banner — drop it into your Layout (STEP 3) |
|
|
29
29
|
| `pages/Blog.jsx` | the feed route (`/blog`) — lists posts, paginates, empty state |
|
|
30
30
|
| `pages/PostDetail.jsx` | the post route (`/blog/:slug`) |
|
|
31
31
|
| `pages/CategoryPage.jsx`, `TagPage.jsx` | the taxonomy landing routes (`/blog/category/:slug`, `/blog/tag/:slug`) |
|
|
32
|
-
| `rest/wix-config.js` |
|
|
32
|
+
| `rest/wix-config.js` | the two ids, written by the install step |
|
|
33
33
|
| `rest/wix-client.js` + `rest/wix-blog.js` | REST transport + blog helpers (posts/categories/tags) |
|
|
34
34
|
|
|
35
35
|
They're already in place — go **straight to theming + wiring**, nothing to verify first. **Don't
|
|
@@ -39,11 +39,8 @@ real fallback — a runtime error, or a field the snippets don't cover (see "Fal
|
|
|
39
39
|
end). (Files missing? the install's `deploy` result lists what it wrote; re-run install, or copy
|
|
40
40
|
`references/blog/app/` → `src/`.)
|
|
41
41
|
|
|
42
|
-
## STEP 2 — Credentials
|
|
43
|
-
Write `src/rest/wix-config.js` with your `WIX_CLIENT_ID` and `WIX_METASITE_ID` from the prompt — the
|
|
44
|
-
one place both ids live.
|
|
45
42
|
|
|
46
|
-
## STEP
|
|
43
|
+
## STEP 2 — Theme (nothing to style on the shipped components)
|
|
47
44
|
The shipped components carry **no palette of their own** — they render from base44's design tokens in
|
|
48
45
|
`src/index.css` (`:root`/`.dark`: `--background`, `--foreground`, `--card`, `--primary`, `--muted`,
|
|
49
46
|
`--border`, `--radius`, `--font-*`) via shadcn Tailwind classes (`bg-card`, `text-foreground`,
|
|
@@ -51,10 +48,10 @@ The shipped components carry **no palette of their own** — they render from ba
|
|
|
51
48
|
are **already set to the brand by the design phase**, so the shipped pages are themed with zero work
|
|
52
49
|
here. To adjust the palette, edit `index.css` (`:root` **and** `.dark`) — the base44 way; **never add
|
|
53
50
|
a parallel theme file (e.g. a `theme.css`) or restyle the shipped JSX.** Build the Home/Header you add
|
|
54
|
-
(STEP
|
|
51
|
+
(STEP 3) from the **same** base44 tokens/classes so it matches automatically. A dark brand is just
|
|
55
52
|
base44's dark palette in `index.css` — no per-component work.
|
|
56
53
|
|
|
57
|
-
## STEP
|
|
54
|
+
## STEP 3 — Wire routes + provider (surgical `find_replace` on `src/App.jsx`, never a rewrite)
|
|
58
55
|
**No file reads needed to wire this.** Every shipped page and `WixManageBanner` is a default export that takes **no props** — wire them exactly as the snippet shows; nothing in those files needs looking up.
|
|
59
56
|
`App.jsx` carries required platform auth scaffolding (`AuthProvider`/`useAuth`) — edit it in, don't
|
|
60
57
|
replace it.
|
|
@@ -120,7 +117,7 @@ function Layout() {
|
|
|
120
117
|
|
|
121
118
|
## What you build (not shipped)
|
|
122
119
|
The **home / landing page**, the **`Header`** and a **`Footer`** — the two you drop into the `Layout`
|
|
123
|
-
(STEP
|
|
120
|
+
(STEP 3) so they wrap every route — plus the overall brand story, styled with the same base44
|
|
124
121
|
tokens/classes. **Compose the shipped pieces** — a "latest posts" strip is just `queryPosts` + the shipped
|
|
125
122
|
`PostGrid`; a category nav is `useTaxonomy()` + links to `/blog/category/:slug`:
|
|
126
123
|
|
|
@@ -212,9 +209,8 @@ Fallback only — when you hit an error or need something not shown here: read t
|
|
|
212
209
|
under `src/`, or look it up via the **`wix-docs`** skill.
|
|
213
210
|
|
|
214
211
|
## Hard rules
|
|
215
|
-
- Set `WIX_CLIENT_ID` (STEP 2) — not the placeholder.
|
|
216
212
|
- Style via base44 design tokens (`index.css` / shadcn Tailwind classes), never by rewriting the shipped components or adding a parallel theme file.
|
|
217
|
-
- Header/footer live in a `Layout` around `<Outlet/>` (STEP
|
|
213
|
+
- Header/footer live in a `Layout` around `<Outlet/>` (STEP 3) — never edit the shipped `Blog`/`PostDetail`/category/tag pages to add chrome.
|
|
218
214
|
- The Layout's fixed top region owns positioning: `<WixManageBanner/>` above `<Header/>`; your `Header` is plain in-flow markup (not `position:fixed`).
|
|
219
215
|
- Route by `slug` through the shipped helpers — never hand-build a post/category/tag URL. Display categories/tags by `.label` (not `.name`).
|
|
220
216
|
- Render live Wix data or the shipped empty state — never mock posts, authors, comments, likes, or view counts; never use a stock/placeholder cover image.
|
|
@@ -36,9 +36,9 @@ so you don't need to open them:**
|
|
|
36
36
|
| `components/ServiceCard.jsx`, `ServiceGrid.jsx` | service listing UI (grid + card, with empty state); the card shows price, tagline and a `60 min · 1-to-1` meta row |
|
|
37
37
|
| `components/SlotPicker.jsx` | bookable-slot chips + paging (pure UI, driven by `useServiceDetail`) |
|
|
38
38
|
| `components/BookingForm.jsx` | contact + participant form (pure UI, driven by `useServiceDetail`) |
|
|
39
|
-
| `components/WixManageBanner.jsx` | preview-only manage banner — drop it into your Layout (STEP
|
|
39
|
+
| `components/WixManageBanner.jsx` | preview-only manage banner — drop it into your Layout (STEP 3) |
|
|
40
40
|
| `pages/Services.jsx`, `pages/ServiceDetail.jsx` | the two shipped routes (`/services`, `/service/:serviceId`); the detail page is two-column — service + a duration/price/where strip on the left, the sticky booking panel on the right |
|
|
41
|
-
| `rest/wix-config.js` |
|
|
41
|
+
| `rest/wix-config.js` | the two ids, written by the install step |
|
|
42
42
|
| `rest/wix-client.js` | REST transport — mints/persists the anonymous visitor token |
|
|
43
43
|
| `rest/wix-bookings-services.js` | services + availability: `queryServices`, `queryServicesByCategory`, `categoriesOf`, `getService`, `countServices`, `listSlotsForService`, `listAvailableSlots`, `listEventTimeSlots`, `getAvailableSlot`, `mediaUrl` |
|
|
44
44
|
| `rest/wix-bookings-checkout.js` | booking + checkout: `createBooking`, `checkoutBooking`, `bookAndCheckout` |
|
|
@@ -50,11 +50,8 @@ on a real fallback — a runtime error, or a field the snippets don't cover (see
|
|
|
50
50
|
the end). (Files missing? the install's `deploy` result lists what it wrote; re-run install, or copy
|
|
51
51
|
`references/bookings/app/` → `src/`.)
|
|
52
52
|
|
|
53
|
-
## STEP 2 — Credentials
|
|
54
|
-
Write `src/rest/wix-config.js` with your `WIX_CLIENT_ID` and `WIX_METASITE_ID` from the prompt — the
|
|
55
|
-
one place both ids live.
|
|
56
53
|
|
|
57
|
-
## STEP
|
|
54
|
+
## STEP 2 — Theme (nothing to style on the shipped components)
|
|
58
55
|
The shipped components carry **no palette of their own** — they render from base44's design tokens
|
|
59
56
|
in `src/index.css` (`:root`/`.dark`: `--background`, `--foreground`, `--card`, `--primary`,
|
|
60
57
|
`--muted`, `--border`, `--radius`, `--font-*`) via shadcn Tailwind classes (`bg-card`,
|
|
@@ -62,10 +59,10 @@ in `src/index.css` (`:root`/`.dark`: `--background`, `--foreground`, `--card`, `
|
|
|
62
59
|
`font-display`). Those tokens are **already set to the brand by the design phase**, so the shipped
|
|
63
60
|
pages are themed with zero work here. To adjust the palette, edit `index.css` (`:root` **and**
|
|
64
61
|
`.dark`) — the base44 way; **never add a parallel theme file (e.g. a `theme.css`) or restyle the
|
|
65
|
-
shipped JSX.** Build the Home/Header you add (STEP
|
|
62
|
+
shipped JSX.** Build the Home/Header you add (STEP 3) from the **same** base44 tokens/classes so it
|
|
66
63
|
matches automatically. A dark brand is just base44's dark palette in `index.css` — no per-component work.
|
|
67
64
|
|
|
68
|
-
## STEP
|
|
65
|
+
## STEP 3 — Wire routes (surgical `find_replace` on `src/App.jsx`, never a rewrite)
|
|
69
66
|
**No file reads needed to wire this.** Every shipped page and `WixManageBanner` is a default export that takes **no props** — wire them exactly as the snippet shows; nothing in those files needs looking up.
|
|
70
67
|
`App.jsx` carries required platform auth scaffolding (`AuthProvider`/`useAuth`) — edit it in, don't
|
|
71
68
|
replace it. Bookings needs **no cross-page provider** (there's no cart — each booking completes on
|
|
@@ -123,7 +120,7 @@ function Layout() {
|
|
|
123
120
|
|
|
124
121
|
## What you build (not shipped)
|
|
125
122
|
The **home / landing page**, the **`Header`** and a **`Footer`** — the two you drop into the
|
|
126
|
-
`Layout` (STEP
|
|
123
|
+
`Layout` (STEP 3) so they wrap every route — plus the overall brand story, styled with the same
|
|
127
124
|
base44 tokens/classes. **Compose the shipped pieces** — a "featured services" strip is just
|
|
128
125
|
`queryServices` + the shipped `ServiceGrid`; the nav is a link to `/services`:
|
|
129
126
|
|
|
@@ -227,9 +224,8 @@ the areas they sit in:
|
|
|
227
224
|
- Headless redirect session (hosted checkout): https://dev.wix.com/docs/api-reference/business-management/headless/redirects.md
|
|
228
225
|
|
|
229
226
|
## Hard rules
|
|
230
|
-
- Set `WIX_CLIENT_ID` (STEP 2) — not the placeholder.
|
|
231
227
|
- Style via base44 design tokens (`index.css` / shadcn Tailwind classes), never by rewriting the shipped components or adding a parallel theme file.
|
|
232
|
-
- Header/footer live in a `Layout` around `<Outlet/>` (STEP
|
|
228
|
+
- Header/footer live in a `Layout` around `<Outlet/>` (STEP 3) — never edit the shipped
|
|
233
229
|
`Services`/`ServiceDetail` to add chrome.
|
|
234
230
|
- The Layout's fixed top region owns positioning: `<WixManageBanner/>` above `<Header/>`; your
|
|
235
231
|
`Header` is plain in-flow markup (not `position:fixed`).
|
|
@@ -13,7 +13,7 @@ using the official Wix Data endpoints — never hand-build a Wix Data URL, never
|
|
|
13
13
|
| `rest/wix-cms.js` | Wix Data helpers over the official endpoints: `queryDataItems`, `getDataItem`, `getDataItemBy`, `countDataItems`, `insertDataItem`, `updateDataItem`, `removeDataItem`. |
|
|
14
14
|
| `lib/wixImage.js` | `wixImage(uri)` — converts a `wix:image://…` media field into a renderable URL (passes `https://` / `//` through). |
|
|
15
15
|
| `collection.config.js` | Optional one-file mapping: `COLLECTION_ID` (your collection's **name**, not a GUID) + `FIELDS` (map `title`/`image`/`summary`/`body`/`date`/`slug` to your field keys). Keeps field mapping in one place; skip it and pass field keys inline if you prefer. |
|
|
16
|
-
| `wix-config.js` *(shared)* |
|
|
16
|
+
| `wix-config.js` *(shared)* | the two ids, written by the install step. |
|
|
17
17
|
| `WixManageBanner` *(shared)* | Dev-only manage banner — mount it in your Layout (see the platform doc's "Done" step). |
|
|
18
18
|
|
|
19
19
|
## Prerequisites
|
|
@@ -131,7 +131,6 @@ Validate the mime type and the size there as well.
|
|
|
131
131
|
- Import File: https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/import-file.md
|
|
132
132
|
|
|
133
133
|
## Hard rules
|
|
134
|
-
- Set `WIX_CLIENT_ID` (in `wix-config`) — not the placeholder.
|
|
135
134
|
- Read/write **only** through the `wix-cms.js` helpers (official Wix Data endpoints) — never hand-build a URL.
|
|
136
135
|
- `queryDataItems` → `{ items, nextCursor }` (destructure, iterate `.items`); `sort` is `[{ fieldName, order }]`; date comparands wrap as `{ "$date": ISO }`.
|
|
137
136
|
- Read date fields through the wrapper — `new Date(v?.$date ?? v)`. Dates arrive as `{ "$date": ISO }` (including `_createdDate` / `_updatedDate`), and `new Date(object)` puts the text "Invalid Date" on the page. See RETRIEVAL SHAPES in `rest/wix-cms.js` for the field types that need a converter.
|
|
@@ -32,9 +32,9 @@ don't need to open them:**
|
|
|
32
32
|
| `components/EventRegistration.jsx` | branches on `registration.type` (RSVP / TICKETING / EXTERNAL / NONE) |
|
|
33
33
|
| `components/RsvpForm.jsx` | RSVP form UI over `useRsvpForm` |
|
|
34
34
|
| `components/TicketPicker.jsx` | ticket list + quantity + checkout UI over `useTicketing` |
|
|
35
|
-
| `components/WixManageBanner.jsx` | preview-only manage banner — drop it into your Layout (STEP
|
|
35
|
+
| `components/WixManageBanner.jsx` | preview-only manage banner — drop it into your Layout (STEP 3) |
|
|
36
36
|
| `pages/Events.jsx`, `pages/EventDetail.jsx` | the two shipped routes (`/events`, `/events/:slug`) |
|
|
37
|
-
| `rest/wix-config.js` |
|
|
37
|
+
| `rest/wix-config.js` | the two ids, written by the install step |
|
|
38
38
|
| `rest/wix-client.js` | visitor-token mint/refresh + REST transport (reads `wix-config.js`) |
|
|
39
39
|
| `rest/wix-events-browse.js` | browse/discovery helpers (`queryEvents`, `getEventBySlug`, categories, count) |
|
|
40
40
|
| `rest/wix-events-registration.js` | RSVP + ticketing helpers (`createRsvp`, `reserveTickets`, `getTicketCheckoutUrl`, `checkoutTickets`) |
|
|
@@ -46,12 +46,8 @@ real fallback — a runtime error, or a field the snippets don't cover (see "Fal
|
|
|
46
46
|
end). (Files missing? the install's `deploy` result lists what it wrote; re-run install, or copy
|
|
47
47
|
`references/events/app/` → `src/`.)
|
|
48
48
|
|
|
49
|
-
## STEP 2 — Credentials
|
|
50
|
-
Write `src/rest/wix-config.js` with your `WIX_CLIENT_ID` and `WIX_METASITE_ID` from the prompt — the
|
|
51
|
-
one place both ids live. The visitor refresh token minted from this id is persisted to localStorage
|
|
52
|
-
and **is** the identity of the visitor's ticket reservation — don't re-mint anonymously per load.
|
|
53
49
|
|
|
54
|
-
## STEP
|
|
50
|
+
## STEP 2 — Theme (nothing to style on the shipped components)
|
|
55
51
|
The shipped components carry **no palette of their own** — they render from base44's design tokens in
|
|
56
52
|
`src/index.css` (`:root`/`.dark`: `--background`, `--foreground`, `--card`, `--primary`, `--muted`,
|
|
57
53
|
`--border`, `--radius`, `--font-*`) via shadcn Tailwind classes (`bg-card`, `text-foreground`,
|
|
@@ -59,10 +55,10 @@ The shipped components carry **no palette of their own** — they render from ba
|
|
|
59
55
|
are **already set to the brand by the design phase**, so the shipped pages are themed with zero work
|
|
60
56
|
here. To adjust the palette, edit `index.css` (`:root` **and** `.dark`) — the base44 way; **never add
|
|
61
57
|
a parallel theme file (e.g. a `theme.css`) or restyle the shipped JSX.** Build the Home/Header you add
|
|
62
|
-
(STEP
|
|
58
|
+
(STEP 3) from the **same** base44 tokens/classes so it matches automatically. A dark brand is just
|
|
63
59
|
base44's dark palette in `index.css` — no per-component work.
|
|
64
60
|
|
|
65
|
-
## STEP
|
|
61
|
+
## STEP 3 — Wire routes + provider (surgical `find_replace` on `src/App.jsx`, never a rewrite)
|
|
66
62
|
**No file reads needed to wire this.** Every shipped page and `WixManageBanner` is a default export that takes **no props** — wire them exactly as the snippet shows; nothing in those files needs looking up.
|
|
67
63
|
`App.jsx` carries required platform auth scaffolding (`AuthProvider`/`useAuth`) — edit it in, don't
|
|
68
64
|
replace it. (Events needs no cross-page provider — there's no cart; the RSVP/ticketing state is local
|
|
@@ -120,7 +116,7 @@ function Layout() {
|
|
|
120
116
|
|
|
121
117
|
## What you build (not shipped)
|
|
122
118
|
The **home / landing page**, the **`Header`** and a **`Footer`** — the two you drop into the `Layout`
|
|
123
|
-
(STEP
|
|
119
|
+
(STEP 3) so they wrap every route — plus the overall brand story, styled with the same base44
|
|
124
120
|
tokens/classes. **Compose the shipped pieces** — a "featured events" strip is just `queryEvents` + the
|
|
125
121
|
shipped `EventGrid`; the nav is a link to `/events`:
|
|
126
122
|
|
|
@@ -213,9 +209,8 @@ Fallback only — when you hit an error or need something not shown here: read t
|
|
|
213
209
|
under `src/`, or look it up via the **`wix-docs`** skill.
|
|
214
210
|
|
|
215
211
|
## Hard rules
|
|
216
|
-
- Set `WIX_CLIENT_ID` (STEP 2) — not the placeholder.
|
|
217
212
|
- Style via base44 design tokens (`index.css` / shadcn Tailwind classes), never by rewriting the shipped components or adding a parallel theme file.
|
|
218
|
-
- Header/footer live in a `Layout` around `<Outlet/>` (STEP
|
|
213
|
+
- Header/footer live in a `Layout` around `<Outlet/>` (STEP 3) — never edit the shipped `Events`/`EventDetail` to add chrome.
|
|
219
214
|
- The Layout's fixed top region owns positioning: `<WixManageBanner/>` above `<Header/>`; your `Header` is plain in-flow markup (not `position:fixed`).
|
|
220
215
|
- Paid ticket checkout goes through the shipped reserve → `getTicketCheckoutUrl` redirect (the Wix-hosted ticket form) — never a hand-built registration/ticket/payment URL.
|
|
221
216
|
- Render live Wix data or the shipped empty/closed/not-found state — never mock events, tickets, guest counts, or "X spots left".
|
|
@@ -52,10 +52,10 @@ so you don't need to open them:**
|
|
|
52
52
|
| `components/SocialButtons.jsx` | "Continue with Google/Facebook" buttons (kick off the redirect) |
|
|
53
53
|
| `components/MemberMenu.jsx` | header account control — "Log in" vs. member name + log-out (like a cart button) |
|
|
54
54
|
| `components/RequireAuth.jsx` | route gate: renders children for a member, else redirects to `/login` |
|
|
55
|
-
| `components/WixManageBanner.jsx` | preview-only manage banner — drop it into your Layout (STEP
|
|
55
|
+
| `components/WixManageBanner.jsx` | preview-only manage banner — drop it into your Layout (STEP 3) |
|
|
56
56
|
| `pages/Login.jsx`, `pages/Account.jsx` | the shipped login + account routes (`/login`, `/account`) |
|
|
57
57
|
| `pages/Callback.jsx` | social/SSO return route — mount at **exactly** `/callback` |
|
|
58
|
-
| `rest/wix-config.js` |
|
|
58
|
+
| `rest/wix-config.js` | the two ids, written by the install step |
|
|
59
59
|
| `rest/wix-client.js` + `rest/wix-members-auth.js` | REST transport + the auth helper (copy verbatim) |
|
|
60
60
|
|
|
61
61
|
They're already in place — go **straight to theming + wiring**, nothing to verify first. **Don't
|
|
@@ -71,11 +71,8 @@ fallback — a runtime error, or a field the snippets don't cover (see "Fallback
|
|
|
71
71
|
> *calling* the exports, never by editing them. Its full JSDoc (state machine, `profile`, errors) is at
|
|
72
72
|
> the top of the file — read that, not the whole body, if you need the contract.
|
|
73
73
|
|
|
74
|
-
## STEP 2 — Credentials
|
|
75
|
-
Write `src/rest/wix-config.js` with your `WIX_CLIENT_ID` and `WIX_METASITE_ID` from the prompt — the
|
|
76
|
-
one place both ids live.
|
|
77
74
|
|
|
78
|
-
## STEP
|
|
75
|
+
## STEP 2 — Theme (nothing to style on the shipped components)
|
|
79
76
|
The shipped components carry **no palette of their own** — they render from base44's design tokens
|
|
80
77
|
in `src/index.css` (`:root`/`.dark`: `--background`, `--foreground`, `--card`, `--primary`, `--muted`,
|
|
81
78
|
`--border`, `--radius`, `--font-*`) via shadcn Tailwind classes (`bg-card`, `text-foreground`,
|
|
@@ -83,10 +80,10 @@ in `src/index.css` (`:root`/`.dark`: `--background`, `--foreground`, `--card`, `
|
|
|
83
80
|
are **already set to the brand by the design phase**, so the shipped auth surfaces are themed with
|
|
84
81
|
zero work here. To adjust the palette, edit `index.css` (`:root` **and** `.dark`) — the base44 way;
|
|
85
82
|
**never add a parallel theme file (e.g. a `theme.css`) or restyle the shipped JSX.** Build the
|
|
86
|
-
Home/Header you add (STEP
|
|
83
|
+
Home/Header you add (STEP 3) from the **same** base44 tokens/classes so it matches automatically. A
|
|
87
84
|
dark brand is just base44's dark palette in `index.css` — no per-component work.
|
|
88
85
|
|
|
89
|
-
## STEP
|
|
86
|
+
## STEP 3 — Wire routes + provider (surgical `find_replace` on `src/App.jsx`, never a rewrite)
|
|
90
87
|
**No file reads needed to wire this.** Every shipped page and `WixManageBanner` is a default export that takes **no props** — wire them exactly as the snippet shows; nothing in those files needs looking up.
|
|
91
88
|
`App.jsx` carries required platform auth scaffolding (`AuthProvider`/`useAuth`, the **Base44 builder
|
|
92
89
|
account**) — edit it in, don't replace it. The Wix member session is separate and ships under its own
|
|
@@ -152,7 +149,7 @@ function Layout() {
|
|
|
152
149
|
|
|
153
150
|
## What you build (not shipped)
|
|
154
151
|
The **home / landing page**, the **`Header`** (mount `<MemberMenu/>` in it) and a **`Footer`** — the
|
|
155
|
-
two you drop into the `Layout` (STEP
|
|
152
|
+
two you drop into the `Layout` (STEP 3) so they wrap every route — plus the overall brand story,
|
|
156
153
|
styled from the same base44 tokens/classes. The nav's account control is a `<MemberMenu/>` (shows
|
|
157
154
|
"Log in" for a visitor, the member's name + log-out once signed in — render it as-is, don't wrap it in
|
|
158
155
|
your own auth text button):
|
|
@@ -260,13 +257,12 @@ connection ids, a profile field these snippets don't have): read the relevant sh
|
|
|
260
257
|
`src/rest/`, or look it up via the **`wix-docs`** skill.
|
|
261
258
|
|
|
262
259
|
## Hard rules
|
|
263
|
-
- Set `WIX_CLIENT_ID` (STEP 2) — not the placeholder.
|
|
264
260
|
- Style via base44 design tokens (`index.css` / shadcn Tailwind classes), never by rewriting the shipped components or adding a parallel theme file.
|
|
265
261
|
- **Custom login only** — the member logs in on **your** UI; never redirect them to a Wix-hosted login page.
|
|
266
262
|
- **One shared client** — login swaps the token set on `wix-client.js`; reuse it for everything so the
|
|
267
263
|
member identity carries across the app. Never mint a second client or re-mint anonymously after login.
|
|
268
264
|
- Copy `wix-members-auth.js` verbatim; extend by *calling* its exports, never by editing them.
|
|
269
|
-
- Header/footer live in a `Layout` around `<Outlet/>` (STEP
|
|
265
|
+
- Header/footer live in a `Layout` around `<Outlet/>` (STEP 3) — never edit the shipped `Login`/`Account`/`Callback` to add chrome; the fixed top region owns positioning (`<WixManageBanner/>` above a plain in-flow `<Header/>`).
|
|
270
266
|
- **Never fake a member** — no mock logged-in state, invented profile, or roles. Render the real member or the real logged-out state.
|
|
271
267
|
- **Fail loudly** — the helper throws `MemberAuthError`; surface `.message`, don't swallow it.
|
|
272
268
|
- No `elevate` / admin scope, and no headless MFA/TOTP — those security layers are dashboard-governed.
|