@wix/agent-skills 1.20.1 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/wix-app/SKILL.md +71 -113
- package/skills/wix-app/references/APP_TOOLS.md +2 -1
- package/skills/wix-app/references/BACKEND_EVENT.md +3 -3
- package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +41 -152
- package/skills/wix-app/references/DASHBOARD_MODAL.md +4 -4
- package/skills/wix-app/references/DASHBOARD_PAGE.md +11 -25
- package/skills/wix-app/references/DATA_COLLECTION.md +16 -219
- package/skills/wix-app/references/SDK_MODULE_MAP.md +44 -0
- package/skills/wix-app/references/SITE_PLUGIN.md +36 -190
- package/skills/wix-app/references/app-tools/TOOLS.md +3 -1
- package/skills/wix-app/references/custom-element-widget/SETTINGS_PANEL.md +21 -0
- package/skills/wix-app/references/dashboard-page/DATA_SOURCES.md +182 -0
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE.md +97 -0
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_COLLECTION.md +184 -0
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_ROUTER.md +203 -0
- package/skills/wix-app/references/dashboard-page/DRAFT_TEMPLATE_SETTINGS.md +44 -0
- package/skills/wix-app/references/dashboard-page/ECOM_NAVIGATION.md +17 -0
- package/skills/wix-app/references/dashboard-page/QUERY_AND_PAGING.md +182 -0
- package/skills/wix-app/references/dashboard-page/TABLE_STATE.md +133 -0
- package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +10 -5
- package/skills/wix-app/references/dashboard-plugin/SLOTS.md +4 -18
- package/skills/wix-app/references/data-collection/LIFECYCLE.md +68 -0
- package/skills/wix-app/references/data-collection/PERMISSIONS.md +47 -0
- package/skills/wix-app/references/data-collection/SCHEMA.md +181 -0
- package/skills/wix-app/references/data-collection/WIX_DATA.md +38 -66
- package/skills/wix-app/references/site-plugin/EXAMPLES.md +1 -1
- package/skills/wix-headless-fast/SKILL.md +144 -221
- package/skills/wix-headless-fast/cold-start/bootstrap.mjs +156 -0
- package/skills/wix-headless-fast/{entry/skill.md → cold-start/cold-start.md} +15 -15
- package/skills/wix-headless-fast/guides/existing-site.md +76 -0
- package/skills/wix-headless-fast/guides/reference-mode.md +97 -0
- package/skills/wix-headless-fast/install/AGENTS.md +35 -0
- package/skills/wix-headless-fast/install/agents-md.mjs +39 -0
- package/skills/wix-headless-fast/install/attach.mjs +161 -86
- package/skills/wix-headless-fast/install/deploy.mjs +21 -60
- package/skills/wix-headless-fast/install/lock.mjs +55 -0
- package/skills/wix-headless-fast/install/setup.mjs +259 -0
- package/skills/wix-headless-fast/install/templates.mjs +168 -0
- package/skills/wix-manage/references/ecommerce/pricing-promotions/ecom-pricing-create-coupon.md +10 -19
- package/skills/wix-manage/references/events/create-wix-event.md +5 -1
- package/skills/wix-manage/references/google-ads/google-ads-dashboard-navigation.md +27 -0
- package/skills/wix-manage/references/google-ads/manage-campaign-success-guide.md +83 -37
- package/skills/wix-headless-fast/install/fast-path.mjs +0 -181
- package/skills/wix-headless-fast/references/blog/INSTRUCTIONS.md +0 -301
- package/skills/wix-headless-fast/references/blog/app/components/blog/BlogFeedView.tsx +0 -136
- package/skills/wix-headless-fast/references/blog/app/components/blog/PostView.tsx +0 -112
- package/skills/wix-headless-fast/references/blog/app/components/blog/RichContent.tsx +0 -42
- package/skills/wix-headless-fast/references/blog/app/hooks/blog/useBlogFeed.ts +0 -31
- package/skills/wix-headless-fast/references/blog/app/hooks/blog/usePost.ts +0 -22
- package/skills/wix-headless-fast/references/blog/app/wix/blog/blog-feed-store.ts +0 -137
- package/skills/wix-headless-fast/references/blog/app/wix/blog/post-store.ts +0 -78
- package/skills/wix-headless-fast/references/blog/app/wix/blog/posts-core.ts +0 -117
- package/skills/wix-headless-fast/references/blog/app/wix/blog/posts.ts +0 -52
- package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy-core.ts +0 -47
- package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy.ts +0 -58
- package/skills/wix-headless-fast/references/blog/app/wix/blog/types.ts +0 -62
- package/skills/wix-headless-fast/references/blog/app-astro/layouts/SiteLayout.astro +0 -40
- package/skills/wix-headless-fast/references/blog/app-astro/pages/blog/[...slug].astro +0 -97
- package/skills/wix-headless-fast/references/blog/app-astro/pages/blog.astro +0 -24
- package/skills/wix-headless-fast/references/blog/lock/astro/package-lock.json +0 -16156
- package/skills/wix-headless-fast/references/blog/rest/posts.ts +0 -42
- package/skills/wix-headless-fast/references/blog/rest/taxonomy.ts +0 -62
- package/skills/wix-headless-fast/references/blog/seed/SEED.md +0 -81
- package/skills/wix-headless-fast/references/blog/seed/seed-blog.mjs +0 -287
- package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +0 -275
- package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServiceBookingView.tsx +0 -144
- package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServicesView.tsx +0 -119
- package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useBookingFlow.ts +0 -32
- package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useServices.ts +0 -23
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-core.ts +0 -218
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking-flow-store.ts +0 -169
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking.ts +0 -121
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-core.ts +0 -92
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services-store.ts +0 -90
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services.ts +0 -57
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/types.ts +0 -72
- package/skills/wix-headless-fast/references/bookings/app-astro/layouts/SiteLayout.astro +0 -40
- package/skills/wix-headless-fast/references/bookings/app-astro/pages/services/[slug].astro +0 -76
- package/skills/wix-headless-fast/references/bookings/app-astro/pages/services.astro +0 -22
- package/skills/wix-headless-fast/references/bookings/lock/astro/package-lock.json +0 -11962
- package/skills/wix-headless-fast/references/bookings/rest/booking.ts +0 -113
- package/skills/wix-headless-fast/references/bookings/rest/services.ts +0 -55
- package/skills/wix-headless-fast/references/bookings/seed/SEED.md +0 -71
- package/skills/wix-headless-fast/references/bookings/seed/seed-bookings.mjs +0 -302
- package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +0 -353
- package/skills/wix-headless-fast/references/cms/app/hooks/cms/useCollection.ts +0 -50
- package/skills/wix-headless-fast/references/cms/app/hooks/cms/useItem.ts +0 -37
- package/skills/wix-headless-fast/references/cms/app/wix/cms/collection-store.ts +0 -158
- package/skills/wix-headless-fast/references/cms/app/wix/cms/item-store.ts +0 -93
- package/skills/wix-headless-fast/references/cms/app/wix/cms/items-core.ts +0 -177
- package/skills/wix-headless-fast/references/cms/app/wix/cms/items.ts +0 -123
- package/skills/wix-headless-fast/references/cms/app/wix/cms/types.ts +0 -75
- package/skills/wix-headless-fast/references/cms/app-astro/layouts/SiteLayout.astro +0 -41
- package/skills/wix-headless-fast/references/cms/lock/astro/package-lock.json +0 -11262
- package/skills/wix-headless-fast/references/cms/rest/items.ts +0 -125
- package/skills/wix-headless-fast/references/cms/seed/SEED.md +0 -112
- package/skills/wix-headless-fast/references/cms/seed/seed-cms.mjs +0 -324
- package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +0 -305
- package/skills/wix-headless-fast/references/events/app/components/events/EventConfirmationView.tsx +0 -66
- package/skills/wix-headless-fast/references/events/app/components/events/EventRegistrationView.tsx +0 -178
- package/skills/wix-headless-fast/references/events/app/components/events/EventsView.tsx +0 -118
- package/skills/wix-headless-fast/references/events/app/hooks/events/useEventRegistration.ts +0 -35
- package/skills/wix-headless-fast/references/events/app/hooks/events/useEvents.ts +0 -24
- package/skills/wix-headless-fast/references/events/app/wix/events/events-core.ts +0 -130
- package/skills/wix-headless-fast/references/events/app/wix/events/events-store.ts +0 -97
- package/skills/wix-headless-fast/references/events/app/wix/events/events.ts +0 -55
- package/skills/wix-headless-fast/references/events/app/wix/events/registration-core.ts +0 -113
- package/skills/wix-headless-fast/references/events/app/wix/events/registration-store.ts +0 -156
- package/skills/wix-headless-fast/references/events/app/wix/events/registration.ts +0 -97
- package/skills/wix-headless-fast/references/events/app/wix/events/types.ts +0 -61
- package/skills/wix-headless-fast/references/events/app-astro/layouts/SiteLayout.astro +0 -40
- package/skills/wix-headless-fast/references/events/app-astro/pages/event-confirmation.astro +0 -12
- package/skills/wix-headless-fast/references/events/app-astro/pages/events/[slug].astro +0 -80
- package/skills/wix-headless-fast/references/events/app-astro/pages/events.astro +0 -21
- package/skills/wix-headless-fast/references/events/lock/astro/package-lock.json +0 -11884
- package/skills/wix-headless-fast/references/events/rest/events.ts +0 -57
- package/skills/wix-headless-fast/references/events/rest/registration.ts +0 -83
- package/skills/wix-headless-fast/references/events/seed/SEED.md +0 -95
- package/skills/wix-headless-fast/references/events/seed/seed-events.mjs +0 -276
- package/skills/wix-headless-fast/references/forms/INSTRUCTIONS.md +0 -338
- package/skills/wix-headless-fast/references/forms/app/hooks/forms/useWixForm.ts +0 -85
- package/skills/wix-headless-fast/references/forms/app/wix/forms/form-store.ts +0 -332
- package/skills/wix-headless-fast/references/forms/app/wix/forms/forms-core.ts +0 -238
- package/skills/wix-headless-fast/references/forms/app/wix/forms/forms.ts +0 -54
- package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions-core.ts +0 -216
- package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions.ts +0 -59
- package/skills/wix-headless-fast/references/forms/app/wix/forms/types.ts +0 -135
- package/skills/wix-headless-fast/references/forms/lock/astro/package-lock.json +0 -10593
- package/skills/wix-headless-fast/references/forms/rest/forms.ts +0 -34
- package/skills/wix-headless-fast/references/forms/rest/submissions.ts +0 -56
- package/skills/wix-headless-fast/references/forms/seed/SEED.md +0 -116
- package/skills/wix-headless-fast/references/forms/seed/seed-forms.mjs +0 -327
- package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +0 -314
- package/skills/wix-headless-fast/references/members/app/components/members/AccountView.tsx +0 -60
- package/skills/wix-headless-fast/references/members/app/components/members/LoginForm.tsx +0 -155
- package/skills/wix-headless-fast/references/members/app/components/members/MemberMenu.tsx +0 -78
- package/skills/wix-headless-fast/references/members/app/components/members/RequireAuth.tsx +0 -47
- package/skills/wix-headless-fast/references/members/app/hooks/members/useMember.ts +0 -66
- package/skills/wix-headless-fast/references/members/app/wix/members/auth-core.ts +0 -105
- package/skills/wix-headless-fast/references/members/app/wix/members/auth.ts +0 -59
- package/skills/wix-headless-fast/references/members/app/wix/members/client.ts +0 -53
- package/skills/wix-headless-fast/references/members/app/wix/members/member-store.ts +0 -122
- package/skills/wix-headless-fast/references/members/app/wix/members/members-core.ts +0 -43
- package/skills/wix-headless-fast/references/members/app/wix/members/members.ts +0 -29
- package/skills/wix-headless-fast/references/members/app/wix/members/types.ts +0 -21
- package/skills/wix-headless-fast/references/members/app-astro/layouts/SiteLayout.astro +0 -42
- package/skills/wix-headless-fast/references/members/app-astro/pages/account.astro +0 -10
- package/skills/wix-headless-fast/references/members/app-astro/pages/login.astro +0 -11
- package/skills/wix-headless-fast/references/members/lock/astro/package-lock.json +0 -10329
- package/skills/wix-headless-fast/references/members/rest/auth.ts +0 -215
- package/skills/wix-headless-fast/references/members/rest/members.ts +0 -26
- package/skills/wix-headless-fast/references/members/seed/SEED.md +0 -39
- package/skills/wix-headless-fast/references/members/seed/seed-members.mjs +0 -94
- package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +0 -313
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionProjectsView.tsx +0 -110
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionsView.tsx +0 -90
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/GalleryMedia.tsx +0 -35
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/ProjectDetailView.tsx +0 -85
- package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollectionProjects.ts +0 -32
- package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollections.ts +0 -21
- package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useProjectDetail.ts +0 -31
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collection-projects-store.ts +0 -82
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/collections-store.ts +0 -58
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio-core.ts +0 -177
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio.ts +0 -78
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/project-detail-store.ts +0 -81
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/types.ts +0 -55
- package/skills/wix-headless-fast/references/portfolio/app-astro/layouts/SiteLayout.astro +0 -40
- package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio/[slug].astro +0 -30
- package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio.astro +0 -21
- package/skills/wix-headless-fast/references/portfolio/app-astro/pages/projects/[slug].astro +0 -29
- package/skills/wix-headless-fast/references/portfolio/lock/astro/package-lock.json +0 -10197
- package/skills/wix-headless-fast/references/portfolio/rest/portfolio.ts +0 -75
- package/skills/wix-headless-fast/references/portfolio/seed/SEED.md +0 -86
- package/skills/wix-headless-fast/references/portfolio/seed/seed-portfolio.mjs +0 -258
- package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +0 -294
- package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +0 -47
- package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlansView.tsx +0 -101
- package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/SubscribeButton.tsx +0 -41
- package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +0 -16
- package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlans.ts +0 -22
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plan-purchase-store.ts +0 -54
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-core.ts +0 -106
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans-store.ts +0 -64
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans.ts +0 -27
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase-core.ts +0 -43
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase.ts +0 -22
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/types.ts +0 -30
- package/skills/wix-headless-fast/references/pricing-plans/app-astro/layouts/SiteLayout.astro +0 -41
- package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans/[slug].astro +0 -40
- package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans.astro +0 -21
- package/skills/wix-headless-fast/references/pricing-plans/lock/astro/package-lock.json +0 -11226
- package/skills/wix-headless-fast/references/pricing-plans/rest/plans.ts +0 -31
- package/skills/wix-headless-fast/references/pricing-plans/rest/purchase.ts +0 -20
- package/skills/wix-headless-fast/references/pricing-plans/seed/SEED.md +0 -79
- package/skills/wix-headless-fast/references/pricing-plans/seed/seed-pricing-plans.mjs +0 -279
- package/skills/wix-headless-fast/references/restaurants/INSTRUCTIONS.md +0 -358
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/MenuView.tsx +0 -142
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartButton.tsx +0 -26
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartDrawer.tsx +0 -121
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/ReservationView.tsx +0 -155
- package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useMenus.ts +0 -34
- package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useOrderCart.ts +0 -43
- package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useReservation.ts +0 -34
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-core.ts +0 -155
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu-store.ts +0 -89
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu.ts +0 -71
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/order-store.ts +0 -103
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering-core.ts +0 -124
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering.ts +0 -185
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservation-store.ts +0 -193
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations-core.ts +0 -94
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations.ts +0 -74
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/types.ts +0 -168
- package/skills/wix-headless-fast/references/restaurants/app-astro/layouts/SiteLayout.astro +0 -47
- package/skills/wix-headless-fast/references/restaurants/app-astro/pages/menu.astro +0 -22
- package/skills/wix-headless-fast/references/restaurants/app-astro/pages/reservations.astro +0 -12
- package/skills/wix-headless-fast/references/restaurants/lock/astro/package-lock.json +0 -12560
- package/skills/wix-headless-fast/references/restaurants/rest/menu.ts +0 -60
- package/skills/wix-headless-fast/references/restaurants/rest/ordering.ts +0 -169
- package/skills/wix-headless-fast/references/restaurants/rest/reservations.ts +0 -68
- package/skills/wix-headless-fast/references/restaurants/seed/SEED.md +0 -89
- package/skills/wix-headless-fast/references/restaurants/seed/seed-restaurants.mjs +0 -479
- package/skills/wix-headless-fast/references/shared/CONTENT.md +0 -22
- package/skills/wix-headless-fast/references/shared/CUSTOM_OPERATIONS.md +0 -73
- package/skills/wix-headless-fast/references/shared/DESIGN.md +0 -26
- package/skills/wix-headless-fast/references/shared/SUPPLIED-CONTENT.md +0 -23
- package/skills/wix-headless-fast/references/shared/app/styles/global.css +0 -52
- package/skills/wix-headless-fast/references/shared/app/wix/config.ts +0 -15
- package/skills/wix-headless-fast/references/shared/app/wix/media.ts +0 -81
- package/skills/wix-headless-fast/references/shared/app/wix/money.ts +0 -24
- package/skills/wix-headless-fast/references/shared/app/wix/sdk.ts +0 -89
- package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app/wix/media-upload/client.ts +0 -46
- package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +0 -46
- package/skills/wix-headless-fast/references/shared/rest/client.ts +0 -155
- package/skills/wix-headless-fast/references/shared/rest/config.ts +0 -3
- package/skills/wix-headless-fast/references/shared/rest/media.ts +0 -65
- package/skills/wix-headless-fast/references/shared/seed/images.mjs +0 -145
- package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +0 -608
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartButton.tsx +0 -26
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartDrawer.tsx +0 -155
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/FilterPanel.tsx +0 -266
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/OptionPicker.tsx +0 -95
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/QuickAdd.tsx +0 -136
- package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useCart.ts +0 -48
- package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useProductDetail.ts +0 -39
- package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +0 -34
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-core.ts +0 -121
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-store.ts +0 -107
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart.ts +0 -138
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog-core.ts +0 -309
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +0 -133
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/product-detail-store.ts +0 -147
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/shop-store.ts +0 -289
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/types.ts +0 -167
- package/skills/wix-headless-fast/references/storefront/app-astro/layouts/SiteLayout.astro +0 -65
- package/skills/wix-headless-fast/references/storefront/lock/astro/package-lock.json +0 -12247
- package/skills/wix-headless-fast/references/storefront/rest/cart.ts +0 -132
- package/skills/wix-headless-fast/references/storefront/rest/catalog.ts +0 -123
- package/skills/wix-headless-fast/references/storefront/seed/SEED.md +0 -124
- package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +0 -525
|
@@ -21,7 +21,12 @@ doesn't express — or once the site exists and the work turns to managing or ex
|
|
|
21
21
|
|
|
22
22
|
## The model
|
|
23
23
|
|
|
24
|
-
- **Shipped code is the implementation.** Every vertical ships under `
|
|
24
|
+
- **Shipped code is the implementation.** Every vertical ships under `templates/<vertical>/` in
|
|
25
|
+
the skill's repository, not in the skill folder: `node <SKILL_ROOT>/install/templates.mjs`
|
|
26
|
+
fetches all of it once into `<SKILL_ROOT>/templates/` (a second) and prints the path; every
|
|
27
|
+
script below fetches it itself when the folder is missing. The folder stays with the project
|
|
28
|
+
(only the composed `project/` scaffolds are left out of its repository), so a later session
|
|
29
|
+
reads the version the project was built from. Each vertical holds:
|
|
25
30
|
- `app/` — the framework-agnostic core (TypeScript): a data layer that returns **plain,
|
|
26
31
|
serializable DTOs** (images resolved to https URLs, prices pre-formatted), React hooks, and
|
|
27
32
|
routing-free headless components. Works in Astro islands, Vite SPAs, and Next.
|
|
@@ -30,6 +35,9 @@ doesn't express — or once the site exists and the work turns to managing or ex
|
|
|
30
35
|
- `seed/` — a build-time REST seed script (plain-data plan in, created content out) plus its
|
|
31
36
|
`SEED.md` contract.
|
|
32
37
|
- `INSTRUCTIONS.md` — the vertical's playbook: file map, what you build, hard rules.
|
|
38
|
+
- `project/` — the vertical composed into the Wix CLI's blank Astro scaffold, with its
|
|
39
|
+
lockfile: what `wix create` copies for a new site, so the first vertical installs without
|
|
40
|
+
resolving.
|
|
33
41
|
- **One auth seam.** All shipped code calls Wix through `src/wix/sdk.ts`: on Wix-managed Astro
|
|
34
42
|
auth is ambient (no client, no id); on any other React setup the same file runs a manual
|
|
35
43
|
visitor client off the public client id in `src/wix/config.ts`. The deploy step configures
|
|
@@ -40,63 +48,134 @@ doesn't express — or once the site exists and the work turns to managing or ex
|
|
|
40
48
|
owns it and confirm the contract with `wix-docs`; never infer one from generated SDK types,
|
|
41
49
|
package files, or `node_modules`. A normal caller-permitted operation belongs in a new
|
|
42
50
|
data-layer function. A privileged operation belongs in a validated server endpoint — see
|
|
43
|
-
`
|
|
51
|
+
`templates/shared/CUSTOM_OPERATIONS.md`. The presentation **doesn't ship**: the vertical's
|
|
44
52
|
INSTRUCTIONS names the surfaces you design and implement yourself on the shipped hooks,
|
|
45
53
|
with a skeleton carrying each surface's contract (for storefront: the shop and PDP pages
|
|
46
54
|
with their islands, and home).
|
|
47
55
|
- **NEVER work from training data or memory about the Wix APIs.** Not a URL, a path, a version,
|
|
48
56
|
a header, a field name, a filter key, or a body. Every Wix call you make or write — in the
|
|
49
|
-
frontend, in a seed, in a build-time read of a site — comes from
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
frontend, in a seed, in a build-time read of a site — comes from the official Wix skills
|
|
58
|
+
installed here, the code they deployed first, or, when they do not cover the call, from the
|
|
59
|
+
official Wix documentation through `wix-docs`. Read it there first, then write the call.
|
|
60
|
+
**The test, before every request:** the exact path and body appear in the output of a file
|
|
61
|
+
read or a docs search you ran in this session, and you copy them from that output. Anything
|
|
62
|
+
else is memory: a file whose output was cut short before the call, a source you remember
|
|
63
|
+
reading earlier, a call built by changing part of one you did find. A guessed call that
|
|
64
|
+
returns 400 or nothing is not a step toward the
|
|
65
|
+
answer; it is the failure this rule exists to prevent, trying the next variant is still
|
|
66
|
+
guessing, and an empty or error reply to a call that failed the test tells you about the
|
|
67
|
+
call, never about the site. Keep errors visible while a call is unconfirmed: no `2>/dev/null`,
|
|
68
|
+
no `| echo`. The shipped code is tested against live sites; a body that looks similar is the
|
|
69
|
+
one that returns nothing, and the API rarely says why.
|
|
55
70
|
- **Never mock, fail loudly, purchases via Wix.** Live data or an honest empty state; surfaced
|
|
56
71
|
errors, not swallowed ones; checkout/purchase always through the Wix redirect session.
|
|
57
72
|
- **Optional capabilities are deployed from the plan.** A vertical can opt into a shared
|
|
58
73
|
capability without copying sensitive code. For a normal file upload, add a named
|
|
59
74
|
`capabilities.mediaUpload.policies` entry to the plan; Fast ships its client helper, Astro
|
|
60
75
|
endpoint, dependencies, and generated policy module once. Read
|
|
61
|
-
`
|
|
76
|
+
`templates/shared/CUSTOM_OPERATIONS.md` before choosing it. The agent wires the helper to
|
|
62
77
|
the product UI; it never authors or widens the endpoint.
|
|
63
78
|
|
|
64
79
|
## The run
|
|
65
80
|
|
|
81
|
+
Needed throughout: Node ≥ 20.11, git, a logged-in Wix CLI (`npx @wix/cli@latest whoami`;
|
|
82
|
+
`npx @wix/cli@latest login` is a device-code flow: surface the URL and code to the user, never
|
|
83
|
+
read tokens into context), and the two companion skills beside this one, `wix-docs` and
|
|
84
|
+
`wix-manage` (if `.agents/skills/` lacks them:
|
|
85
|
+
`CI=1 npx skills@latest add wix/skills --skill wix-docs --skill wix-manage --yes`). The cold-start
|
|
86
|
+
page, `cold-start/cold-start.md`, gets a machine with none of this to that point. Then fetch the shipped
|
|
87
|
+
code once: `node <SKILL_ROOT>/install/templates.mjs`. It prints the folder;
|
|
88
|
+
the `templates/…` paths below are relative to `<SKILL_ROOT>`, where it lands.
|
|
89
|
+
|
|
66
90
|
1. **Resolve the stack.** Default is **Wix-managed Astro** — take it unless the user names
|
|
67
91
|
another framework or the directory already holds one. Then, by what the shipped code can run
|
|
68
92
|
there:
|
|
69
93
|
- **React** (Vite, Next, …) runs everything shipped — data layer, hooks, components:
|
|
70
|
-
`--stack react`. The agent's own files may be JS
|
|
94
|
+
`--stack react`. The agent's own files may be JS; the shipped files are TypeScript and
|
|
95
|
+
build untouched inside a JS project — never strip them by hand; if the brief wants no
|
|
96
|
+
TypeScript anywhere, say the shipped code cannot meet that and ask before going on.
|
|
97
|
+
A named framework is scaffolded with its own command
|
|
98
|
+
first (`npm create vite@latest`, …), then step 3 runs in that folder.
|
|
71
99
|
- **Another bundled JS framework** (Vue, Svelte, Solid, plain Vite): the data layer and the
|
|
72
100
|
framework-free stores run (`src/wix/` has no React in it), the React hooks and components
|
|
73
101
|
don't apply: `--stack lib`. The agent binds the stores and writes its framework's components
|
|
74
102
|
against the same contracts.
|
|
75
103
|
- **No bundler, or another language** — a static site (plain HTML/CSS/JS), a server-rendered
|
|
76
|
-
app (Flask, Laravel, Rails, …): **reference mode** (
|
|
77
|
-
|
|
104
|
+
app (Flask, Laravel, Rails, …): **reference mode** (its section below, and
|
|
105
|
+
`<SKILL_ROOT>/guides/reference-mode.md`). Nothing from `app/` deploys; the REST layer
|
|
106
|
+
deploys for the browser side, and the server side ports it for its reads.
|
|
107
|
+
|
|
108
|
+
**What Wix hosting takes, and what each stack needs to be released there.** `wix release`
|
|
109
|
+
uploads the folder named in `wix.config.json` (`site.outputDirectory`) and serves it as
|
|
110
|
+
files — no SPA fallback, no directory index, no rewrites: `/` and real files resolve, a clean
|
|
111
|
+
client-side route answers 404 when loaded directly or shared. Server code runs only as a
|
|
112
|
+
Cloudflare Workers build, declared as `outputDirectory: { client, server }`.
|
|
113
|
+
- **Managed Astro** is the stack the Wix CLI scaffolds: the Wix Astro integration
|
|
114
|
+
(`@wix/astro`, ambient auth), the hosting adapter (`@wix/astro-wix-hosting-adapter`, the
|
|
115
|
+
Workers build), `@astrojs/react` with React 18 for the shipped components, and in
|
|
116
|
+
`astro.config.mjs` `integrations: [wix(), react()]`, `adapter: wixHostingAdapter()`,
|
|
117
|
+
`output: "server"`, `security: { checkOrigin: false }`, `image.domains` with
|
|
118
|
+
`static.wixstatic.com`. An Astro project made without the CLI has none of that; add it
|
|
119
|
+
before deploying, and the site serves every route. The integration supports **Astro 5**: a
|
|
120
|
+
project on another major is pinned to 5 first, or connected as a React host.
|
|
121
|
+
- **React and other bundlers** release their own build as files. So routes are hash routes,
|
|
122
|
+
or one emitted HTML file per route linked by its file name — decided before the first route
|
|
123
|
+
is written; any URL handed to Wix as a return target must be one the host serves. Verify by
|
|
124
|
+
loading a deep URL directly, not by navigating from `/`.
|
|
125
|
+
- **A framework whose build is a server** (Next, Nuxt, Remix, SvelteKit, …) releases only as a
|
|
126
|
+
static export (files, the rule above applies), or as a Workers build through
|
|
127
|
+
`outputDirectory: { client, server }`; otherwise it is self-hosted, with its domain added to
|
|
128
|
+
the OAuth app's allowed domains before checkout can return to it.
|
|
129
|
+
- **Static** (no build): `outputDirectory` points at the folder the pages live in; a route is a
|
|
130
|
+
page plus a query-string slug (reference mode).
|
|
78
131
|
2. **The seed plan.** When the brief supplies the content in any form — a CSV, JSON or
|
|
79
132
|
spreadsheet, a list in the prompt, a PDF price list, a folder of photos and a text file, a
|
|
80
133
|
link to their current catalog, anything else that names the content — that IS the plan: map
|
|
81
|
-
it into `plan.json` per `
|
|
134
|
+
it into `plan.json` per `templates/shared/SUPPLIED-CONTENT.md` and the vertical's `SEED.md`
|
|
82
135
|
("Supplied content"), every entry, names and prices verbatim, their images and no others.
|
|
83
136
|
Draft a plan from the brief only when nothing was supplied (read only the vertical's
|
|
84
137
|
`SEED.md` for this — it depends only on the brief; save the vertical's `INSTRUCTIONS.md` for
|
|
85
138
|
step 4, where it's needed). **An existing site has no plan**: when the brief names a site by
|
|
86
139
|
its id, the site holds the content already — nothing is seeded, and the frontend reads what
|
|
87
|
-
is there (step 3's attach path).
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
3. **Create runs (empty directory): run the fast path** — one deterministic call:
|
|
140
|
+
is there (step 3's attach path).
|
|
141
|
+
3. **Set up the project, in its folder** — one deterministic call, the same for an empty folder
|
|
142
|
+
and for a project already on disk; **the folder decides** what it does:
|
|
91
143
|
|
|
92
144
|
```bash
|
|
93
|
-
node <SKILL_ROOT>/install/
|
|
145
|
+
node <SKILL_ROOT>/install/setup.mjs --vertical <vertical> [--plan plan.json] [--business-name "<Brand>"]
|
|
94
146
|
```
|
|
95
147
|
|
|
148
|
+
- **Empty** (or only loose files: a CSV, a brief) → **create**: `wix create` with the
|
|
149
|
+
vertical's composed template, here; `--business-name` names the site.
|
|
150
|
+
- **A project without `wix.config.json`** (a `package.json`, or an `index.html` at the root:
|
|
151
|
+
someone's Astro, Vite, Next, plain HTML) → **connect**: `init` in place links the folder
|
|
152
|
+
to a new site (the site is named after the folder), then the shipped code deploys into
|
|
153
|
+
the project as it is. Pass `--stack` for the stack you resolved in step 1, and make the
|
|
154
|
+
project what that stack needs on Wix hosting (step 1) before or right after the call.
|
|
155
|
+
With `--stack static` setup also makes `site/` the folder `wix release` uploads and deploys
|
|
156
|
+
the REST layer into `site/js/wix/`; you move the pages, styles and assets in (`guides/reference-mode.md`).
|
|
157
|
+
- **`wix.config.json` and a project** → refuses: the folder is already a Wix project with a
|
|
158
|
+
frontend, whether the CLI made it, a hand wrote it, or this skill built it. Three commands
|
|
159
|
+
from the project root do everything setup would: `deploy.mjs <vertical…> --stack <stack>`
|
|
160
|
+
adds this skill's code or a solution (the client id is read from the config), then ONE
|
|
161
|
+
`npm install`, then the seed module if there is content to create. A project this skill
|
|
162
|
+
built needs only the first, for a new solution; a change to what is built is file edits
|
|
163
|
+
and a release.
|
|
164
|
+
- **`wix.config.json` and no project** (what `init` leaves in an empty folder) → the site
|
|
165
|
+
exists and has no frontend yet: `attach.mjs` (below), which takes the site from the config,
|
|
166
|
+
reuses its hosting, scaffolds and deploys. No seed: the site owns its content.
|
|
167
|
+
- The brief names a site by id → not this call: read `<SKILL_ROOT>/guides/existing-site.md`
|
|
168
|
+
and follow it (read the site, then `attach.mjs`, which does what setup does against the
|
|
169
|
+
site given; self-hosting and a project already on disk are in there too).
|
|
170
|
+
|
|
96
171
|
`--vertical` is required and picks which shipped code deploys AND which seed runs — use
|
|
97
|
-
the vertical you resolved from the Verticals table.
|
|
172
|
+
the vertical you resolved from the Verticals table. **`--plan` decides whether anything is
|
|
173
|
+
seeded**: pass the plan from step 2 when there is one; a site that already holds its content
|
|
174
|
+
gets none. Seeding is **additive**: it never deletes or overwrites what the site holds; if a
|
|
175
|
+
cleanup seems needed, ask. The `ready_for_brand_layer` event says `mode` (create or
|
|
176
|
+
connect), the stack, and the `next` for that stack, including how it releases.
|
|
98
177
|
|
|
99
|
-
|
|
178
|
+
setup scaffolds with `--skip-git`: it composes its own steps and leaves version control to
|
|
100
179
|
you / the enclosing repo, so it does **not** create the scaffold's usual git repo + initial
|
|
101
180
|
commit (which would otherwise become a nested-repo gitlink if the project lands inside a repo).
|
|
102
181
|
|
|
@@ -106,103 +185,54 @@ doesn't express — or once the site exists and the work turns to managing or ex
|
|
|
106
185
|
write. `--subfolder` creates it in a new folder named after the business instead, for a current
|
|
107
186
|
folder that must stay as it is; the skills then sit one level above the project.
|
|
108
187
|
|
|
109
|
-
It emits one JSON event per line and returns in **~35s**: **scaffolds** the project
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
jobs** — the dependency install (`npm ci --ignore-scripts || npm install --ignore-scripts`)
|
|
188
|
+
It emits one JSON event per line and returns in **~35s**: **scaffolds** the project from the
|
|
189
|
+
vertical's composed template (`wix create` copies it: the code and its lockfile arrive with
|
|
190
|
+
the scaffold), **deploys** whatever the folder still lacks (patching `package.json` with every
|
|
191
|
+
dependency the code imports), then **starts two detached background jobs** — the dependency install (`npm ci --ignore-scripts || npm install --ignore-scripts`)
|
|
113
192
|
and the **seed** — whose logs and completion markers are in the events. The final
|
|
114
193
|
`ready_for_brand_layer` event carries the project dir, siteId, ready-made dashboard links,
|
|
115
194
|
and both markers. Relay notable events. On an `error` event, recover just that step via the
|
|
116
195
|
manual path below, then continue.
|
|
117
196
|
|
|
118
|
-
**
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
The installed apps name the verticals (Wix Stores → storefront, Wix Bookings → bookings, and
|
|
129
|
-
so on per the Verticals table); the brief picks among them. Then one deterministic call, same
|
|
130
|
-
shape as the fast path:
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
node <SKILL_ROOT>/install/attach.mjs --site <siteId> --business-name "<site name>" --vertical <vertical>[,<vertical>]
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
`init`/`wix create` always create a site, so they are not used here. attach does what they do
|
|
137
|
-
after creating one — the site's OAuth app, Wix hosting, `wix.config.json` — against the site
|
|
138
|
-
given, scaffolds the CLI's Astro template, deploys the shipped code, and starts the install
|
|
139
|
-
detached. No seed runs and nothing on the site changes: the content is the site's own, read
|
|
140
|
-
live through the deployed data layer. When the site already has a headless frontend,
|
|
141
|
-
`attached` says so (`hosting: "reused"`) with its URL — `wix release` from this project
|
|
142
|
-
replaces that frontend; say so when you close.
|
|
143
|
-
|
|
144
|
-
**Get the measure of the site before you design.** Enough to know what you are building
|
|
145
|
-
for: what the chosen verticals will render, roughly how much of it, and what it is like — a
|
|
146
|
-
bakery with six products in three categories designs differently from six hundred. Go
|
|
147
|
-
deeper only where the brief points (a flash sale on cakes: is there a Cakes category, do the
|
|
148
|
-
cakes carry a sale price). Everything else the pages read live through the deployed data
|
|
149
|
-
layer; you are sizing the content, not collecting it. These are build-time reads with the
|
|
150
|
-
**site's** token, `npx -y @wix/cli@latest token --site <siteId>`, sent raw as the
|
|
151
|
-
`Authorization` header (the account token from the call above does not scope to a site).
|
|
152
|
-
**The rule above applies in full: not one of these calls comes from memory.** Open the
|
|
153
|
-
source first, then call. Three sources, in this order:
|
|
154
|
-
- **The vertical's shipped `rest/` module**, at
|
|
155
|
-
`.agents/skills/wix-headless-fast/references/<vertical>/rest/` — the same reads the pages
|
|
156
|
-
make, written as literal `fetch` calls: URL, body, `fields`, filter keys. It is not in
|
|
157
|
-
`src/` (the Astro stack deploys the SDK layer, which hides the body behind a method), so
|
|
158
|
-
read it from the skill.
|
|
159
|
-
- **`wix-manage`**, at `.agents/skills/wix-manage/` — REST recipes for managing a site's
|
|
160
|
-
business solutions: exact endpoint, method and payload per operation, curl included. Its
|
|
161
|
-
SKILL.md is the index, by solution; open the recipe for the vertical's solution.
|
|
162
|
-
- **`wix-docs`**, at `.agents/skills/wix-docs/` — the Wix API reference, reached by
|
|
163
|
-
**search, not by browsing files**: the skill folder holds the how-to, not the pages. Open
|
|
164
|
-
its SKILL.md; it gives one `curl` to semantic search (`POST
|
|
165
|
-
/mcp-docs-search/v1/docs/search/markdown`, natural-language `search_term`) that returns
|
|
166
|
-
condensed method docs — endpoint, request example, response shape — and the rule that any
|
|
167
|
-
`dev.wix.com/docs/…` URL plus `.md` is the full page. Progressive: search first, read the
|
|
168
|
-
full page only when the hit lacks what you need.
|
|
169
|
-
If the source you opened does not have the call, go to the next one; do not try a variant.
|
|
170
|
-
|
|
171
|
-
**Connect/iterate runs (a project already on disk): never scaffold — use the manual path:**
|
|
172
|
-
`CI=1 npm create @wix/new@latest init` in place if there is no `wix.config.json` yet; then
|
|
173
|
-
`node <SKILL_ROOT>/install/deploy.mjs <vertical…> --stack astro|react --plan plan.json` from the project root
|
|
174
|
-
(react stack: add `--client-id` if there is no `wix.config.json` to read the public id
|
|
175
|
-
from); then ONE `npm ci --ignore-scripts || npm install --ignore-scripts` (backgroundable —
|
|
176
|
-
but **never run a second npm install concurrently**: two npms in one `node_modules` race and
|
|
177
|
-
redo each other's work); then seed per the vertical's `seed/SEED.md`. Seeding is
|
|
178
|
-
**additive**: never delete or overwrite existing content; if a cleanup seems needed, ask.
|
|
197
|
+
**Recovering one step, or adding a solution later:** the pieces run on their own from the
|
|
198
|
+
project root — `node <SKILL_ROOT>/install/deploy.mjs <vertical…> --stack <stack>` (the client
|
|
199
|
+
id is read from `wix.config.json`), ONE `npm ci --ignore-scripts || npm install
|
|
200
|
+
--ignore-scripts` (**never a second npm install concurrently**: two npms in one
|
|
201
|
+
`node_modules` race and redo each other's work; setup already started one — wait on its
|
|
202
|
+
marker), the vertical's seed module per its `seed/SEED.md`.
|
|
203
|
+
A code change on an existing project is done when it is **released** (step 5) and the live
|
|
204
|
+
URL shows it — not when a dev server or a local build shows it. A management change (a
|
|
205
|
+
recipe against the site) needs no release; the frontend reads it live.
|
|
179
206
|
|
|
180
207
|
4. **Design and build the presentation while the install finishes** — in the project dir from
|
|
181
208
|
the `ready_for_brand_layer` event, per the vertical's `INSTRUCTIONS.md`: set the `@theme`
|
|
182
209
|
tokens, brand the chrome, and implement the vertical's creative surfaces yourself on the
|
|
183
210
|
shipped hooks (for storefront: your product card + grid, shop surface, PDP surface, and the
|
|
184
211
|
home page) — designed to fit the brief, not copied from the reference components. Read the
|
|
185
|
-
INSTRUCTIONS and the shared floors — `
|
|
186
|
-
`
|
|
212
|
+
INSTRUCTIONS and the shared floors — `templates/shared/DESIGN.md` +
|
|
213
|
+
`templates/shared/CONTENT.md` — now (not earlier — their contracts matter only from this
|
|
187
214
|
step on); the hook/DTO
|
|
188
215
|
contracts are inlined there, so don't open the shipped files themselves. **Author your
|
|
189
216
|
surfaces in as few messages as possible** — batch multiple Write calls in one message
|
|
190
217
|
(components are independent files); don't pay a round-trip per file.
|
|
191
218
|
If the brief needs a core operation that shipped code does not cover, read
|
|
192
|
-
`
|
|
219
|
+
`templates/shared/CUSTOM_OPERATIONS.md` before writing it. Use one documented path and
|
|
193
220
|
implement it; do not reverse-engineer SDK internals.
|
|
194
221
|
5. **When both background jobs have completed** — the install's marker
|
|
195
222
|
(`node_modules/.package-lock.json`) and the seed's (`.seed-exit`) both exist — **verify the
|
|
196
223
|
seed succeeded** (`.seed-exit` contains `0`; `seed-result.json` has the created counts for
|
|
197
224
|
your summary — if non-zero, read `seed.log` and re-run the seed module manually). Those two
|
|
198
|
-
seed files exist **only when
|
|
225
|
+
seed files exist **only when setup started the seed** (attach runs none: only the install
|
|
199
226
|
marker is waited on). When you ran `seed-store.mjs`
|
|
200
227
|
yourself (connect/iterate runs, reference mode), there is no marker to wait for: the process's
|
|
201
228
|
exit code is the result and its stdout is the JSON — wait on the process (a foreground run,
|
|
202
229
|
or `wait` on its pid), not on a file. Then
|
|
203
|
-
**build & release once** (managed)
|
|
204
|
-
`npx @wix/cli@latest build` then `npx @wix/cli@latest release
|
|
205
|
-
|
|
230
|
+
**build & release once** (managed), as the `next` of the `ready_for_brand_layer` event says
|
|
231
|
+
for the stack: Astro → `npx @wix/cli@latest build` then `npx @wix/cli@latest release`;
|
|
232
|
+
React or another bundler → the project's own build, then `npx @wix/cli@latest release` of
|
|
233
|
+
the build folder named in `wix.config.json` (deep URLs must answer 200 directly, step 1);
|
|
234
|
+
static → `release` alone. If the install failed, run it once more and then build. Don't
|
|
235
|
+
build+release mid-flow; backend content is fetched at
|
|
206
236
|
runtime, so a re-release never "refreshes" seeded data. The run is complete only when the
|
|
207
237
|
site is released — close with the live URL and the dashboard link
|
|
208
238
|
`https://manage.wix.com/dashboard/<siteId>`. **Copy the live URL verbatim from the
|
|
@@ -211,140 +241,33 @@ doesn't express — or once the site exists and the work turns to managing or ex
|
|
|
211
241
|
|
|
212
242
|
## Reference mode — a static site, or a server-rendered app in another language
|
|
213
243
|
|
|
214
|
-
The data layer
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
OAuth app, `wix.config.json`). The site lives in a **subfolder** — `site/` — holding only the
|
|
223
|
-
pages, styles, and `js/`; set `site.outputDirectory` in the config to `"./site"`. `wix release`
|
|
224
|
-
uploads that directory whole, so the project root (config, `plan.json`, seed output, anything
|
|
225
|
-
else) must not be it. Then `node <SKILL_ROOT>/install/deploy.mjs <vertical> --stack static --out
|
|
226
|
-
site` composes the REST layer and the vertical's framework-free stores flat into `site/js/wix/`
|
|
227
|
-
and strips them to browser ESM (comments kept, the `.ts` kept beside the `.js` to read). Pages
|
|
228
|
-
import the vertical's modules from `./js/wix/` in a `<script type="module">`: the stores hold
|
|
229
|
-
the state machines (subscribe, render from `getState()`, call actions), the page holds the
|
|
230
|
-
rendering. The visitor token lives in `localStorage` and is the
|
|
231
|
-
visitor's identity across Wix — never mint one per page. A route is a page plus a query-string
|
|
232
|
-
slug (`item.html?slug=…`). Wix static hosting serves files, not directories: `/shop` does not
|
|
233
|
-
resolve to `shop/index.html`, and there is no routes configuration — name the file and link
|
|
234
|
-
to it. Seed per the vertical's `SEED.md` (Node + the CLI token, no project dependencies).
|
|
235
|
-
Release with `npx @wix/cli@latest release` — no build. Item-page tags come from the entity's
|
|
236
|
-
`seoData`, set after the fetch (`document.title`, the meta description).
|
|
237
|
-
- **Server-rendered, another language (Flask, Laravel, Rails, …).** The same shape as managed
|
|
238
|
-
Astro — pages rendered on the server, the interactive surfaces in the browser — with hosting and
|
|
239
|
-
SEO plumbing theirs. `init` still runs in the project folder; run `deploy.mjs <vertical> --stack
|
|
240
|
-
static` there too: it only needs `wix.config.json` and writes `js/wix/`. Split by where the call
|
|
241
|
-
runs:
|
|
242
|
-
- **Reads render on the server.** Port the vertical's `rest/` read module and its `*-core.ts` to
|
|
243
|
-
the server language: each function is one HTTP call with a literal URL and JSON body, and the
|
|
244
|
-
core carries the rules. That code is tested and proven against live sites — carry its bodies
|
|
245
|
-
over as they are, `fields` arrays and filter keys included (they are not guessable, and a
|
|
246
|
-
near-miss returns empty or unformatted data with no error), and render what Wix returns
|
|
247
|
-
(`formattedAmount`, never a number you format yourself). The shipped JS runs: when in doubt,
|
|
248
|
-
run the module with Node against the same site and compare one entity with your port. Public
|
|
249
|
-
reads need no visitor identity — one anonymous visitor token per server process, refreshed per
|
|
250
|
-
`client.ts`, is enough for them.
|
|
251
|
-
- **Visitor-specific state runs in the browser.** Whatever the vertical does on the visitor's
|
|
252
|
-
behalf (a store's cart and checkout, a booking, an RSVP, a form submit) loads the vertical's
|
|
253
|
-
`js/wix/` module in the templates and talks to Wix from the page, exactly as a static site
|
|
254
|
-
does: the browser owns the visitor token in `localStorage`, so the server handles no
|
|
255
|
-
per-visitor tokens. If that state must run server-side anyway, `client.ts`'s header applies:
|
|
256
|
-
one token set per visitor in the visitor's session, never one process-wide token (that is one
|
|
257
|
-
identity shared by everyone).
|
|
258
|
-
- **Pre-rendered → Wix-hosted.** If the project builds to static HTML (Frozen-Flask, Pelican,
|
|
259
|
-
Hugo, Eleventy, any static-site generator), Wix can host the output: run `deploy.mjs
|
|
260
|
-
<vertical> --stack static --out <build dir>` so `js/wix/` lands inside the build output (or
|
|
261
|
-
copy it there after each build), make the generator emit a page for **every** entity slug the
|
|
262
|
-
vertical's list read returns (walk it by cursor, never only the first page), point
|
|
263
|
-
`site.outputDirectory` at the build folder, `wix release`. The build's own reads use one
|
|
264
|
-
anonymous visitor token for the duration of the build. What Wix hosts is exactly the contents
|
|
265
|
-
of that folder after your last build, served as files: every asset a page references must be
|
|
266
|
-
in there and current — if the pipeline has more than one build step (templates, then a CSS or
|
|
267
|
-
asset bundle), they all run, in order, on every rebuild, or the release carries a stale piece.
|
|
268
|
-
`/shop` does not resolve to `shop/index.html`; name the file and link to it. Generated pages
|
|
269
|
-
sit at different depths, so reference `js/wix/` through one base path (a template variable,
|
|
270
|
-
or root-relative `/js/wix/…`), never `./js/wix/` — a relative path breaks one level down. **The generated page
|
|
271
|
-
is the first paint, not the whole surface**: the vertical's interactive behaviour (a store's
|
|
272
|
-
sort, filters, and cart; a blog's search; a booking flow) still runs client-side on top of it
|
|
273
|
-
from the same `js/wix/` modules, so the vertical's surface contracts in `INSTRUCTIONS.md`
|
|
274
|
-
apply unchanged. Close with the rebuild + release command and one line for the owner: content
|
|
275
|
-
edits made in the dashboard reach the site when that command runs; the browser-side flows are
|
|
276
|
-
live regardless. A running server (live reads on every request) stays theirs to host.
|
|
277
|
-
Then read the vertical's `INSTRUCTIONS.md` for the surfaces and hard rules, and the shared
|
|
278
|
-
`DESIGN.md`/`CONTENT.md`. **Before writing any surface, read the vertical's shipped hooks and
|
|
279
|
-
components** — its `INSTRUCTIONS.md` lists which files and what to take from each. They don't
|
|
280
|
-
deploy on this stack, and they are working, tested code for exactly the behaviour you are about
|
|
281
|
-
to write in your own; rewriting them from prose is where the bugs come from (the runs that
|
|
282
|
-
skipped them shipped a broken quick-add, the run that read them didn't). Both were written for
|
|
283
|
-
the stacks that receive the code, so they speak that stack's dialect: the Tailwind classes in the
|
|
284
|
-
skeletons and the components are one spelling of layout and behaviour rules that hold everywhere
|
|
285
|
-
(a bounded image band on phones, name and price on separate lines, the buy control pinned to the
|
|
286
|
-
tile's bottom, an overlay that locks scroll and returns focus). Take the rules; write them in the
|
|
287
|
-
CSS your stack uses, on a token set you define — nothing here asks you to add Tailwind. Close with run (or
|
|
288
|
-
rebuild) instructions, the live URL when Wix hosts the output, the dashboard link, and — when
|
|
289
|
-
hosting is theirs — the allowed-domain step (add the public https origin to the OAuth app
|
|
290
|
-
before a Wix-hosted flow such as checkout can return).
|
|
291
|
-
- Both: the calls in `rest/` are the ones a **visitor token** may make from a page — public reads
|
|
292
|
-
and the visitor's own actions. Anything elevated (writes to content, other people's data) runs
|
|
293
|
-
server-side per `references/shared/CUSTOM_OPERATIONS.md`; the seed's CLI token never belongs in
|
|
294
|
-
a page. A static site has no SSR; neither case has owner-editable item-page SEO through
|
|
295
|
-
`@wix/seo` (tags come from the entity's `seoData`) — say so in the closing message; managed
|
|
296
|
-
Astro stays the recommendation for a public site.
|
|
244
|
+
The shipped data layer exists a second time as a **REST layer** over `fetch`, for the stacks that
|
|
245
|
+
cannot run `app/`: a static site with no bundler, or a server-rendered app in another language
|
|
246
|
+
(Flask, Laravel, Rails). The REST layer deploys for the browser side; the server side ports its
|
|
247
|
+
reads. When step 1 resolves to one of these stacks, read `<SKILL_ROOT>/guides/reference-mode.md`
|
|
248
|
+
before step 3: it holds the mechanics (the `site/` layout and setup's part in it, what runs in the
|
|
249
|
+
browser versus the server, the OAuth allow-list for a self-hosted origin, pre-rendered output) and
|
|
250
|
+
how to close such a run. A public site is still better served by managed Astro; say so when you
|
|
251
|
+
close.
|
|
297
252
|
|
|
298
253
|
## Verticals
|
|
299
254
|
|
|
300
255
|
| The user wants… | Vertical | Playbook |
|
|
301
256
|
| -------------------------------------------------------------------------------------------- | ----------------- | ------------------------------------------ |
|
|
302
|
-
| Online store: products, categories, variants, cart, checkout | **storefront** | `
|
|
303
|
-
| Appointments/classes: services, time slots, staff, booking, checkout | **bookings** | `
|
|
304
|
-
| Blog: post feed, categories/tags, rich-content post pages | **blog** | `
|
|
305
|
-
| Structured content collections (directory, recipes, listings) with pages designed per schema | **cms** | `
|
|
306
|
-
| Any visitor-fillable form: contact/enquiry, signup, application, survey — rendered from the live schema | **forms** | `
|
|
307
|
-
| Events: listing, event pages, free RSVP, ticket sales via hosted checkout | **events** | `
|
|
308
|
-
| Member accounts: custom in-app login/sign-up, gated pages, account page | **members** | `
|
|
309
|
-
| Portfolio/showcase: collections of projects, project pages with media galleries | **portfolio** | `
|
|
310
|
-
| Membership/subscription plans: pricing page, plan detail, hosted purchase | **pricing-plans** | `
|
|
311
|
-
| Restaurant: menu with photos, online ordering, table reservations | **restaurants** | `
|
|
257
|
+
| Online store: products, categories, variants, cart, checkout | **storefront** | `templates/storefront/INSTRUCTIONS.md` |
|
|
258
|
+
| Appointments/classes: services, time slots, staff, booking, checkout | **bookings** | `templates/bookings/INSTRUCTIONS.md` |
|
|
259
|
+
| Blog: post feed, categories/tags, rich-content post pages | **blog** | `templates/blog/INSTRUCTIONS.md` |
|
|
260
|
+
| Structured content collections (directory, recipes, listings) with pages designed per schema | **cms** | `templates/cms/INSTRUCTIONS.md` |
|
|
261
|
+
| Any visitor-fillable form: contact/enquiry, signup, application, survey — rendered from the live schema | **forms** | `templates/forms/INSTRUCTIONS.md` |
|
|
262
|
+
| Events: listing, event pages, free RSVP, ticket sales via hosted checkout | **events** | `templates/events/INSTRUCTIONS.md` |
|
|
263
|
+
| Member accounts: custom in-app login/sign-up, gated pages, account page | **members** | `templates/members/INSTRUCTIONS.md` |
|
|
264
|
+
| Portfolio/showcase: collections of projects, project pages with media galleries | **portfolio** | `templates/portfolio/INSTRUCTIONS.md` |
|
|
265
|
+
| Membership/subscription plans: pricing page, plan detail, hosted purchase | **pricing-plans** | `templates/pricing-plans/INSTRUCTIONS.md` |
|
|
266
|
+
| Restaurant: menu with photos, online ordering, table reservations | **restaurants** | `templates/restaurants/INSTRUCTIONS.md` |
|
|
312
267
|
|
|
313
268
|
Verticals compose: a brief that spans several (a restaurant with a blog, a store with member
|
|
314
|
-
accounts) deploys them together —
|
|
269
|
+
accounts) deploys them together — setup takes one vertical; deploy the rest with
|
|
315
270
|
`node <SKILL_ROOT>/install/deploy.mjs <vertical…>` from the project root before the install
|
|
316
|
-
starts, and run each vertical's seed. A request that
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
## Adding a vertical (structure contract)
|
|
321
|
-
|
|
322
|
-
New verticals follow the same layout — the deploy script discovers them automatically (any
|
|
323
|
-
`references/<name>/app/` directory is a vertical):
|
|
324
|
-
|
|
325
|
-
```
|
|
326
|
-
references/<vertical>/
|
|
327
|
-
INSTRUCTIONS.md # playbook: file map, wiring per stack, what you build, hard rules
|
|
328
|
-
app/ # framework-agnostic core — disjoint paths so verticals never collide:
|
|
329
|
-
wix/<vertical>/ # types.ts (DTOs) + data layer (calls via ../sdk, images via ../media)
|
|
330
|
-
# + *-store.ts: the state machines, framework-free (ship on every stack)
|
|
331
|
-
hooks/<vertical>/ # React hooks — thin bindings of the stores (SSR-friendly: accept initial data)
|
|
332
|
-
components/<vertical>/ # routing-free components (plain <a> default + LinkComponent prop)
|
|
333
|
-
styles/global.css # Tailwind v4 + the @theme design tokens (shared token family)
|
|
334
|
-
app-astro/ # Astro overlay importing ONLY from the core:
|
|
335
|
-
pages/… # SSR fetch → DTO props → client:load islands; item pages carry
|
|
336
|
-
# wixMetadata + <SEO.Tags>; chrome islands are client:only
|
|
337
|
-
# (storefront ships no pages — its INSTRUCTIONS carries their skeletons)
|
|
338
|
-
layouts/… # (reuse SiteLayout when it fits)
|
|
339
|
-
seed/ # seed-<vertical>.mjs (REST, mints its own CLI token) + SEED.md
|
|
340
|
-
rest/ # the REST twin of app/wix/<vertical>/: same exports over fetch, importing
|
|
341
|
-
# the same *-core.ts (rules + DTO mappers, type-only imports) and types.ts;
|
|
342
|
-
# flat ./x.js imports — deploy --stack static composes and strips it
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
Core rules the structure encodes: a rule or mapper lives once, in `app/wix/<vertical>/*-core.ts`,
|
|
346
|
-
imported by both transports (a call added to `app/` gets its `rest/` twin in the same PR; `tsc`
|
|
347
|
-
over both is the parity check); raw API entities never leave the data layer (DTOs only);
|
|
348
|
-
client-shared state uses a module-scope store (never React context — it can't span Astro
|
|
349
|
-
islands); every image URL is resolved through `src/wix/media.ts`; every money value is a
|
|
350
|
-
formatted string by the time a component sees it.
|
|
271
|
+
starts, and run each vertical's seed. A request that matches no shipped vertical has no shipped
|
|
272
|
+
code: it is built from the Wix API reference through `wix-docs` (search, then the method page),
|
|
273
|
+
with the same rule as every other call, on the same project and stack.
|