@wix/agent-skills 1.16.0 → 1.16.2
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/SKILL.md +72 -8
- package/skills/wix-app/references/CODE_QUALITY.md +0 -1
- package/skills/wix-app/references/DASHBOARD_MODAL.md +21 -14
- package/skills/wix-app/references/DASHBOARD_PAGE.md +30 -184
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +19 -3
- package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +172 -0
- package/skills/wix-app/references/dashboard-page/WDS_LAYOUT.md +187 -0
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +12 -7
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +31 -2
- package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +6 -1
- 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/FUNCTION-HANDLERS.md +167 -0
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +2 -2
- 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-base44-connector/SKILL.md +185 -0
- package/skills/wix-base44-connector/scripts/utils.js +212 -0
- package/skills/wix-design-system/SKILL.md +19 -15
- package/skills/wix-docs/SKILL.md +75 -1
- 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 +20 -17
- 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/domains/domain-search-purchase-and-connect.md +2603 -0
- package/skills/wix-manage/references/events/create-wix-event.md +112 -90
- package/skills/wix-manage/references/events/manage-wix-events.md +33 -94
- package/skills/wix-manage/references/sites/create-headless-site.md +1 -0
- package/skills/wix-manage/references/sites/manage-oauth-apps.md +154 -0
- package/skills/wix-manage/references/sites/read-site-context.md +125 -0
- package/skills/wix-manage/references/sites/site-import.md +67 -15
- package/skills/wix-manage/references/stores/create-product-catalog-v3.md +273 -0
- 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 +63 -3
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +104 -0
- package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +74 -0
- package/skills/wix-vibe-headless/platforms/base44.md +15 -40
- package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +7 -11
- package/skills/wix-vibe-headless/references/blog/seed/SEED.md +1 -1
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +7 -11
- package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +1 -1
- 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/events/seed/SEED.md +1 -1
- 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/portfolio/seed/SEED.md +1 -1
- package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +7 -11
- package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +1 -1
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +7 -11
- package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +1 -1
- 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 +75 -13
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +29 -86
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +3 -8
- package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +78 -105
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductCard.js +92 -0
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useVariantOptions.js +76 -0
- package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +1 -1
- package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +44 -5
- package/skills/wix-app/references/AUTO_PATTERNS_DASHBOARD.md +0 -326
- package/skills/wix-app/references/auto-patterns-dashboard/action-cell.md +0 -115
- package/skills/wix-app/references/auto-patterns-dashboard/app-config-structure.md +0 -264
- package/skills/wix-app/references/auto-patterns-dashboard/app-context.md +0 -37
- package/skills/wix-app/references/auto-patterns-dashboard/bulk-actions.md +0 -86
- package/skills/wix-app/references/auto-patterns-dashboard/collection-page-actions.md +0 -119
- package/skills/wix-app/references/auto-patterns-dashboard/collection-page.md +0 -103
- package/skills/wix-app/references/auto-patterns-dashboard/custom-actions-override.md +0 -76
- package/skills/wix-app/references/auto-patterns-dashboard/custom-columns-override.md +0 -82
- package/skills/wix-app/references/auto-patterns-dashboard/custom-components-override.md +0 -89
- package/skills/wix-app/references/auto-patterns-dashboard/custom-header-override.md +0 -124
- package/skills/wix-app/references/auto-patterns-dashboard/custom-sections-override.md +0 -91
- package/skills/wix-app/references/auto-patterns-dashboard/custom-slots-override.md +0 -71
- package/skills/wix-app/references/auto-patterns-dashboard/entity-page-actions.md +0 -70
- package/skills/wix-app/references/auto-patterns-dashboard/entity-page-view-actions.md +0 -73
- package/skills/wix-app/references/auto-patterns-dashboard/entity-page.md +0 -98
- package/skills/wix-app/references/auto-patterns-dashboard/example-patterns.json +0 -278
- package/skills/wix-app/references/auto-patterns-dashboard/pages-configuration.md +0 -94
- package/skills/wix-app/references/auto-patterns-dashboard/resolved-action.md +0 -43
- package/skills/wix-app/references/auto-patterns-dashboard/sdk-utilities.md +0 -66
- package/skills/wix-app/references/auto-patterns-dashboard/views.md +0 -76
- package/skills/wix-app/scripts/generate-auto-patterns.js +0 -510
- package/skills/wix-manage/references/domains/domain-search-and-purchase.md +0 -437
- package/skills/wix-manage/references/stores/create-product-from-image.md +0 -1031
- package/skills/wix-manage/references/stores/create-product-with-options-catalog-v3.md +0 -623
- package/skills/wix-manage/references/stores/setup-online-store-catalog-v3.md +0 -106
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Wix Managed Headless — Base44 storefront client + seed
|
|
2
|
+
|
|
3
|
+
You are building a **Wix Managed** headless storefront inside Base44 — the business is described in your
|
|
4
|
+
initial prompt, and the Wix connector is already configured.
|
|
5
|
+
|
|
6
|
+
Your Wix client id is in your prompt — a public, buyer-facing credential (anonymous visitor tokens
|
|
7
|
+
only), safe in the frontend; use it directly for the Wix client setup.
|
|
8
|
+
|
|
9
|
+
> **`wix-vibe-headless` and `wix-docs` are the complete build and seed path for this app.** **Do NOT use the Base44 commerce kit (or any Base44 solution kit).**
|
|
10
|
+
|
|
11
|
+
Follow STEPs 1–4 below exactly (run STEP 3 in parallel with STEP 2).
|
|
12
|
+
|
|
13
|
+
## STEP 1 — Install the Wix skills and deploy the storefront vertical to the app
|
|
14
|
+
|
|
15
|
+
Install two skills — they land under `.agents/skills/`:
|
|
16
|
+
- **`wix-vibe-headless`** — the storefront build + seed guide (STEPs 2–3): your main source of truth.
|
|
17
|
+
- **`wix-docs`** — a **fallback**: search + read the Wix API docs for anything `wix-vibe-headless`
|
|
18
|
+
doesn't cover.
|
|
19
|
+
|
|
20
|
+
Run this through exec_tool, exactly as written — installs both skills, deploys the `storefront` REST scaffolds + UI into `src/`, and pins the AGENTS.md note.
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
const { execSync } = require('child_process');
|
|
24
|
+
const { existsSync, readdirSync } = require('fs');
|
|
25
|
+
const results = {};
|
|
26
|
+
for (const skill of ['wix-vibe-headless', 'wix-docs']) {
|
|
27
|
+
if (existsSync(`/app/.agents/skills/${skill}/SKILL.md`)) { results[skill] = 'already_installed'; continue; }
|
|
28
|
+
try {
|
|
29
|
+
const out = execSync(`CI=1 npx -y skills add wix/skills/skills/${skill} --yes 2>&1`,
|
|
30
|
+
{ cwd: '/app', timeout: 60000, shell: '/bin/bash' }).toString().replace(/\x1b\[[0-9;]*m/g, '');
|
|
31
|
+
results[skill] = /installed 1 skill|found 1 skill/i.test(out) ? 'success'
|
|
32
|
+
: out.includes('No valid skills') ? 'not_found' : 'unknown';
|
|
33
|
+
} catch (e) { results[skill] = 'error: ' + e.message; }
|
|
34
|
+
}
|
|
35
|
+
const deploy = execSync(`node /app/.agents/skills/wix-vibe-headless/install/deploy.cjs storefront`, { cwd: '/app' }).toString();
|
|
36
|
+
const agentsMd = execSync(`node /app/.agents/skills/wix-vibe-headless/install/pin-agents-md.cjs`, { cwd: '/app' }).toString();
|
|
37
|
+
return { results, installed: readdirSync('/app/.agents/skills'), deploy: JSON.parse(deploy), agentsMd: JSON.parse(agentsMd) };
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
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/`.
|
|
41
|
+
|
|
42
|
+
## STEP 2 — Build the client
|
|
43
|
+
|
|
44
|
+
Read `.agents/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md` and follow it **EXACTLY** — the single source of truth for how the storefront client is built.
|
|
45
|
+
|
|
46
|
+
**REST scaffolds are already in `src/rest/`** (STEP 1 deployed them). The storefront also ships 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.
|
|
47
|
+
|
|
48
|
+
**`src/App.jsx`: edit surgically, never rewrite.** It carries required platform auth scaffolding
|
|
49
|
+
(`AuthProvider`/`useAuth` from `@/lib/AuthContext`); a full rewrite drops them → the validator
|
|
50
|
+
rejects the write. Wire routes/imports in with `find_replace`, leave the rest as-is.
|
|
51
|
+
|
|
52
|
+
## STEP 3 — Seed the storefront
|
|
53
|
+
|
|
54
|
+
**Never delete or clean up anything on the user's site — seeding is additive only.** It's a live
|
|
55
|
+
user-owned business, so never delete or overwrite existing content, even apparent sample data. If a
|
|
56
|
+
cleanup truly seems needed, ask the user first.
|
|
57
|
+
|
|
58
|
+
Seed by calling the storefront's ready-made seed module — read
|
|
59
|
+
`.agents/skills/wix-vibe-headless/references/storefront/seed/SEED.md` and load its `seed-*.js` via
|
|
60
|
+
its loader snippet (build-time exec_tool); call its functions with your data. Gaps or an unexpected
|
|
61
|
+
shape → the **`wix-docs`** skill.
|
|
62
|
+
|
|
63
|
+
**Auth for these admin calls is the already-configured Wix headless connector — nothing else.** Get its
|
|
64
|
+
access token and send it as a bearer token:
|
|
65
|
+
|
|
66
|
+
```js
|
|
67
|
+
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
|
|
68
|
+
// then: fetch(url, { headers: { Authorization: `Bearer ${accessToken}`, "Content-Type": "application/json" }, ... })
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Inline via exec_tool, `base44` is already declared — use it directly; do **not** import
|
|
72
|
+
`@base44/sdk`, re-declare it, or call `createClient()` (that's for standalone `.js` files only;
|
|
73
|
+
inline it throws *"Identifier 'base44' has already been declared."*).
|
|
74
|
+
|
|
75
|
+
**Product images.** Generate with **Base44's built-in image generation**, then attach via the
|
|
76
|
+
storefront seed module's image-attach step — `wix-docs` if the module doesn't cover it.
|
|
77
|
+
|
|
78
|
+
**Seed images with the FINAL url, in one call.** Use the real `https://media.base44.com/...` url
|
|
79
|
+
from the **completed** `generate_image` result and pass it straight into your single `setupStore`
|
|
80
|
+
call (images included). A still-generating `/__generating__/<id>.png` placeholder is not a real url
|
|
81
|
+
— Wix can't fetch it. `generate_image` runs in the background while you build the client, so the
|
|
82
|
+
urls are ready by the time you seed.
|
|
83
|
+
|
|
84
|
+
## STEP 4 — Wrap up
|
|
85
|
+
|
|
86
|
+
**Do NOT add the `<WixManageBanner/>` component** and do not send the user Wix dashboard links — this flow does not include the manage banner or back-office handoff.
|
|
87
|
+
|
|
88
|
+
**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 or debug image urls.** Leave them and finish.
|
|
89
|
+
|
|
90
|
+
## Later admin requests
|
|
91
|
+
|
|
92
|
+
When the user asks for follow-up changes (next iterations), use the already-connected Wix headless connector — get an access token and call the Wix API directly:
|
|
93
|
+
|
|
94
|
+
```js
|
|
95
|
+
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
|
|
96
|
+
const res = await fetch("https://www.wixapis.com/<api-path>", {
|
|
97
|
+
method: "POST",
|
|
98
|
+
headers: { Authorization: `Bearer ${accessToken}`, "Content-Type": "application/json" },
|
|
99
|
+
body: JSON.stringify({ /* request body */ }),
|
|
100
|
+
});
|
|
101
|
+
return await res.json();
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`base44` is already declared inline in exec_tool — use it directly; do **not** import `@base44/sdk` or call `createClient()`. For what to call, check the storefront seed module (`.agents/skills/wix-vibe-headless/references/storefront/seed/SEED.md`) or look up the endpoint via `wix-docs`.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Wix Managed Headless — Base44 storefront client
|
|
2
|
+
|
|
3
|
+
You are building a **Wix Managed** headless storefront inside Base44 — the business is described in your
|
|
4
|
+
initial prompt, and the Wix connector is already configured.
|
|
5
|
+
|
|
6
|
+
Your Wix client id is in your prompt — a public, buyer-facing credential (anonymous visitor tokens
|
|
7
|
+
only), safe in the frontend; use it directly for the Wix client setup.
|
|
8
|
+
|
|
9
|
+
> **`wix-vibe-headless` and `wix-docs` are the complete build path for this app.** **Do NOT use the Base44 commerce kit (or any Base44 solution kit).** **This flow builds the client only — there is no seeding step.**
|
|
10
|
+
|
|
11
|
+
Follow STEPs 1–3 below exactly.
|
|
12
|
+
|
|
13
|
+
## STEP 1 — Install the Wix skills and deploy the storefront vertical to the app
|
|
14
|
+
|
|
15
|
+
Install two skills — they land under `.agents/skills/`:
|
|
16
|
+
- **`wix-vibe-headless`** — the storefront build guide (STEP 2): your main source of truth.
|
|
17
|
+
- **`wix-docs`** — a **fallback**: search + read the Wix API docs for anything `wix-vibe-headless`
|
|
18
|
+
doesn't cover.
|
|
19
|
+
|
|
20
|
+
Run this through exec_tool, exactly as written — installs both skills, deploys the `storefront` REST scaffolds + UI into `src/`, and pins the AGENTS.md note.
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
const { execSync } = require('child_process');
|
|
24
|
+
const { existsSync, readdirSync } = require('fs');
|
|
25
|
+
const results = {};
|
|
26
|
+
for (const skill of ['wix-vibe-headless', 'wix-docs']) {
|
|
27
|
+
if (existsSync(`/app/.agents/skills/${skill}/SKILL.md`)) { results[skill] = 'already_installed'; continue; }
|
|
28
|
+
try {
|
|
29
|
+
const out = execSync(`CI=1 npx -y skills add wix/skills/skills/${skill} --yes 2>&1`,
|
|
30
|
+
{ cwd: '/app', timeout: 60000, shell: '/bin/bash' }).toString().replace(/\x1b\[[0-9;]*m/g, '');
|
|
31
|
+
results[skill] = /installed 1 skill|found 1 skill/i.test(out) ? 'success'
|
|
32
|
+
: out.includes('No valid skills') ? 'not_found' : 'unknown';
|
|
33
|
+
} catch (e) { results[skill] = 'error: ' + e.message; }
|
|
34
|
+
}
|
|
35
|
+
const deploy = execSync(`node /app/.agents/skills/wix-vibe-headless/install/deploy.cjs storefront`, { cwd: '/app' }).toString();
|
|
36
|
+
const agentsMd = execSync(`node /app/.agents/skills/wix-vibe-headless/install/pin-agents-md.cjs`, { cwd: '/app' }).toString();
|
|
37
|
+
return { results, installed: readdirSync('/app/.agents/skills'), deploy: JSON.parse(deploy), agentsMd: JSON.parse(agentsMd) };
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
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/`.
|
|
41
|
+
|
|
42
|
+
## STEP 2 — Build the client
|
|
43
|
+
|
|
44
|
+
Read `.agents/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md` and follow it **EXACTLY** — the single source of truth for how the storefront client is built.
|
|
45
|
+
|
|
46
|
+
**REST scaffolds are already in `src/rest/`** (STEP 1 deployed them). The storefront also ships 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.
|
|
47
|
+
|
|
48
|
+
**`src/App.jsx`: edit surgically, never rewrite.** It carries required platform auth scaffolding
|
|
49
|
+
(`AuthProvider`/`useAuth` from `@/lib/AuthContext`); a full rewrite drops them → the validator
|
|
50
|
+
rejects the write. Wire routes/imports in with `find_replace`, leave the rest as-is.
|
|
51
|
+
|
|
52
|
+
## STEP 3 — Wrap up
|
|
53
|
+
|
|
54
|
+
**No seeding in this flow** — the client is the only deliverable. Do not seed, populate, or write data to Wix.
|
|
55
|
+
|
|
56
|
+
**Do NOT add the `<WixManageBanner/>` component** and do not send the user Wix dashboard links — this flow does not include the manage banner or back-office handoff.
|
|
57
|
+
|
|
58
|
+
**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 or debug image urls.** Leave them and finish.
|
|
59
|
+
|
|
60
|
+
## Later admin requests
|
|
61
|
+
|
|
62
|
+
When the user asks for follow-up changes (next iterations), use the already-connected Wix headless connector — get an access token and call the Wix API directly:
|
|
63
|
+
|
|
64
|
+
```js
|
|
65
|
+
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
|
|
66
|
+
const res = await fetch("https://www.wixapis.com/<api-path>", {
|
|
67
|
+
method: "POST",
|
|
68
|
+
headers: { Authorization: `Bearer ${accessToken}`, "Content-Type": "application/json" },
|
|
69
|
+
body: JSON.stringify({ /* request body */ }),
|
|
70
|
+
});
|
|
71
|
+
return await res.json();
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
`base44` is already declared inline in exec_tool — use it directly; do **not** import `@base44/sdk` or call `createClient()`. For what to call, check the storefront seed module (`.agents/skills/wix-vibe-headless/references/storefront/seed/SEED.md`) or look up the endpoint via `wix-docs`.
|
|
@@ -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
|
|
@@ -120,9 +106,7 @@ its loader snippet (build-time exec_tool); call its functions with your data. Ga
|
|
|
120
106
|
shape → the **`wix-docs`** skill.
|
|
121
107
|
|
|
122
108
|
**Auth for these admin calls is the already-configured Wix connector — nothing else.** Get its
|
|
123
|
-
access token and send it as a bearer token
|
|
124
|
-
`getAdminToken()`), install/run the Wix CLI (`@wix/cli`), or device-login (no managed-project auth
|
|
125
|
-
flow applies to Base44):
|
|
109
|
+
access token and send it as a bearer token:
|
|
126
110
|
|
|
127
111
|
```js
|
|
128
112
|
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
|
|
@@ -147,11 +131,6 @@ build the client, so the urls are ready by the time you seed.
|
|
|
147
131
|
The connector + seeding are **admin-only** (STEP 4) — **not** part of the client, which is built
|
|
148
132
|
solely per the `wix-vibe-headless` skill.
|
|
149
133
|
|
|
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
134
|
## STEP 5 — Wrap up
|
|
156
135
|
|
|
157
136
|
Once the site is built and seeded:
|
|
@@ -163,15 +142,11 @@ Once the site is built and seeded:
|
|
|
163
142
|
metasite id) to complete setup in Wix (required), and mention that the preview shows a dismissible
|
|
164
143
|
top banner linking to this same dashboard.
|
|
165
144
|
|
|
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.
|
|
145
|
+
**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
146
|
|
|
174
147
|
## Later admin requests
|
|
175
148
|
|
|
176
149
|
For any later admin/management request, work as in STEP 4: your vertical's seed module first, else
|
|
177
150
|
`wix-docs` — all over the connector.
|
|
151
|
+
|
|
152
|
+
version: v1338
|
|
@@ -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.
|
|
@@ -14,7 +14,7 @@ for you (Blog binds the cover by the Wix Media file id, not a url).
|
|
|
14
14
|
|
|
15
15
|
```js
|
|
16
16
|
// build-time exec_tool
|
|
17
|
-
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
|
|
17
|
+
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
|
|
18
18
|
const fs = require("fs");
|
|
19
19
|
// exec_tool's require can return EMPTY exports for these build-time modules — load the file itself:
|
|
20
20
|
const seed = (() => { const m = { exports: {} };
|
|
@@ -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`).
|
|
@@ -8,7 +8,7 @@ Bookings seed operation. Load it and call **`setupBookings` — the one-call pat
|
|
|
8
8
|
|
|
9
9
|
```js
|
|
10
10
|
// build-time exec_tool
|
|
11
|
-
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
|
|
11
|
+
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
|
|
12
12
|
const fs = require("fs");
|
|
13
13
|
// exec_tool's require can return EMPTY exports for these build-time modules — load the file itself:
|
|
14
14
|
const seed = (() => { const m = { exports: {} };
|
|
@@ -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".
|
|
@@ -13,7 +13,7 @@ after create, and **publishing is one-way**. So per event: create DRAFT → (tic
|
|
|
13
13
|
|
|
14
14
|
```js
|
|
15
15
|
// build-time exec_tool
|
|
16
|
-
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
|
|
16
|
+
const { accessToken } = await base44.asServiceRole.connectors.getConnection("wix");
|
|
17
17
|
const fs = require("fs");
|
|
18
18
|
// exec_tool's require can return EMPTY exports for these build-time modules — load the file itself:
|
|
19
19
|
const seed = (() => { const m = { exports: {} };
|
|
@@ -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.
|