@wix/agent-skills 1.16.3 → 1.18.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 +115 -12
- package/skills/wix-app/references/APP_MARKET_REVIEW.md +1 -1
- package/skills/wix-app/references/BACKEND_API.md +18 -0
- package/skills/wix-app/references/CUSTOM_ELEMENT_WIDGET.md +6 -0
- package/skills/wix-app/references/DASHBOARD_MODAL.md +10 -2
- package/skills/wix-app/references/DASHBOARD_PAGE.md +32 -70
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +145 -127
- package/skills/wix-app/references/SITE_PLUGIN.md +14 -2
- package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +74 -68
- package/skills/wix-app/references/backend-event/COMMON-EVENTS.md +2 -2
- package/skills/wix-app/references/dashboard-page/COLLECTION_TOOLKIT.md +79 -0
- package/skills/wix-app/references/dashboard-page/ENTITY_PAGE_TOOLKIT.md +73 -0
- package/skills/wix-app/references/dashboard-page/PATTERNS_BUNDLE_READING.md +52 -0
- package/skills/wix-app/references/dashboard-page/UX_SUCCESS_MODEL.md +184 -0
- package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +182 -99
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +94 -49
- package/skills/wix-app/references/editor-react-component/BRANDED-COMPONENTS.md +16 -6
- package/skills/wix-app/references/editor-react-component/BROWSER-SUPPORT.md +56 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +275 -0
- package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +35 -40
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +167 -445
- package/skills/wix-app/references/editor-react-component/DESIGN-STATES.md +56 -29
- package/skills/wix-app/references/editor-react-component/DIRECTIONALITY.md +53 -158
- package/skills/wix-app/references/editor-react-component/EDITOR-EXTENSION-CONFIGURATION.md +78 -0
- package/skills/wix-app/references/editor-react-component/FUNCTION-HANDLERS.md +42 -134
- package/skills/wix-app/references/editor-react-component/MANIFEST-ERRORS.md +11 -3
- package/skills/wix-app/references/editor-react-component/PARTS.md +46 -24
- package/skills/wix-app/references/editor-react-component/PROPS-VS-CSS.md +63 -179
- package/skills/wix-app/references/editor-react-component/REACT-GUIDELINES.md +79 -163
- package/skills/wix-app/references/editor-react-component/SITE-CONTEXT-HOOKS.md +36 -21
- package/skills/wix-app/references/editor-react-component/SSR.md +30 -99
- package/skills/wix-base44-connector/SKILL.md +156 -50
- package/skills/wix-base44-connector/references/CAPABILITY_MAP.md +78 -0
- package/skills/wix-base44-connector/scripts/utils.js +239 -45
- package/skills/wix-headless/entry/bootstrap.mjs +9 -2
- package/skills/wix-headless/entry/skill.md +1 -1
- package/skills/wix-headless/references/CAPABILITIES.md +9 -1
- package/skills/wix-headless/references/DESIGN.md +1 -0
- package/skills/wix-headless/references/DISCOVERY.md +2 -1
- package/skills/wix-headless/references/IMAGE_GENERATION.md +1 -0
- package/skills/wix-headless/references/SDK_HANDOFF.md +5 -2
- package/skills/wix-headless/references/SEED.md +2 -1
- package/skills/wix-headless/references/SETUP.md +1 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-blog.md +2 -2
- package/skills/wix-headless/references/inline-recipes/how-to-code-a-store.md +68 -31
- package/skills/wix-headless/references/inline-recipes/how-to-code-forms.md +26 -10
- package/skills/wix-headless/references/inline-recipes/how-to-code-members-astro.md +8 -8
- package/skills/wix-headless/references/inline-recipes/how-to-code-members-custom-login.md +1 -1
- package/skills/wix-headless/references/inline-recipes/how-to-code-members-non-astro.md +1 -1
- package/skills/wix-headless/references/inline-recipes/how-to-code-pricing-plans.md +10 -8
- package/skills/wix-headless/references/inline-recipes/how-to-code-rentals.md +254 -0
- package/skills/wix-headless/references/inline-recipes/how-to-code-restaurant-orders.md +27 -24
- package/skills/wix-headless/references/inline-recipes/setup-online-store.md +13 -0
- package/skills/wix-headless/references/inline-recipes/setup-rentals.md +254 -0
- package/skills/wix-headless/references/managed/AUTHENTICATION.md +5 -0
- package/skills/wix-headless/references/non-astro.md +1 -1
- package/skills/wix-headless-fast/SKILL.md +166 -0
- package/skills/wix-headless-fast/entry/skill.md +99 -0
- package/skills/wix-headless-fast/install/deploy.mjs +433 -0
- package/skills/wix-headless-fast/install/fast-path.mjs +141 -0
- package/skills/wix-headless-fast/references/blog/INSTRUCTIONS.md +137 -0
- package/skills/wix-headless-fast/references/blog/app/components/blog/BlogFeedView.tsx +137 -0
- package/skills/wix-headless-fast/references/blog/app/components/blog/PostView.tsx +113 -0
- package/skills/wix-headless-fast/references/blog/app/components/blog/RichContent.tsx +42 -0
- package/skills/wix-headless-fast/references/blog/app/hooks/blog/useBlogFeed.ts +123 -0
- package/skills/wix-headless-fast/references/blog/app/hooks/blog/usePost.ts +70 -0
- package/skills/wix-headless-fast/references/blog/app/wix/blog/posts.ts +99 -0
- package/skills/wix-headless-fast/references/blog/app/wix/blog/taxonomy.ts +76 -0
- package/skills/wix-headless-fast/references/blog/app/wix/blog/types.ts +62 -0
- package/skills/wix-headless-fast/references/blog/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-fast/references/blog/app-astro/pages/blog/[...slug].astro +99 -0
- package/skills/wix-headless-fast/references/blog/app-astro/pages/blog.astro +24 -0
- package/skills/wix-headless-fast/references/blog/lock/astro/package-lock.json +16156 -0
- package/skills/wix-headless-fast/references/blog/seed/SEED.md +72 -0
- package/skills/wix-headless-fast/references/blog/seed/seed-blog.mjs +287 -0
- package/skills/wix-headless-fast/references/bookings/INSTRUCTIONS.md +129 -0
- package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServiceBookingView.tsx +143 -0
- package/skills/wix-headless-fast/references/bookings/app/components/bookings/ServicesView.tsx +119 -0
- package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useBookingFlow.ts +138 -0
- package/skills/wix-headless-fast/references/bookings/app/hooks/bookings/useServices.ts +54 -0
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/booking.ts +206 -0
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/services.ts +96 -0
- package/skills/wix-headless-fast/references/bookings/app/wix/bookings/types.ts +70 -0
- package/skills/wix-headless-fast/references/bookings/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-fast/references/bookings/app-astro/pages/services/[slug].astro +76 -0
- package/skills/wix-headless-fast/references/bookings/app-astro/pages/services.astro +22 -0
- package/skills/wix-headless-fast/references/bookings/lock/astro/package-lock.json +11962 -0
- package/skills/wix-headless-fast/references/bookings/seed/SEED.md +61 -0
- package/skills/wix-headless-fast/references/bookings/seed/seed-bookings.mjs +302 -0
- package/skills/wix-headless-fast/references/cms/INSTRUCTIONS.md +179 -0
- package/skills/wix-headless-fast/references/cms/app/hooks/cms/useCollection.ts +83 -0
- package/skills/wix-headless-fast/references/cms/app/hooks/cms/useItem.ts +57 -0
- package/skills/wix-headless-fast/references/cms/app/wix/cms/items.ts +151 -0
- package/skills/wix-headless-fast/references/cms/app/wix/cms/types.ts +75 -0
- package/skills/wix-headless-fast/references/cms/app-astro/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-fast/references/cms/lock/astro/package-lock.json +11262 -0
- package/skills/wix-headless-fast/references/cms/seed/SEED.md +103 -0
- package/skills/wix-headless-fast/references/cms/seed/seed-cms.mjs +324 -0
- package/skills/wix-headless-fast/references/events/INSTRUCTIONS.md +149 -0
- package/skills/wix-headless-fast/references/events/app/components/events/EventConfirmationView.tsx +66 -0
- package/skills/wix-headless-fast/references/events/app/components/events/EventRegistrationView.tsx +176 -0
- package/skills/wix-headless-fast/references/events/app/components/events/EventsView.tsx +118 -0
- package/skills/wix-headless-fast/references/events/app/hooks/events/useEventRegistration.ts +117 -0
- package/skills/wix-headless-fast/references/events/app/hooks/events/useEvents.ts +59 -0
- package/skills/wix-headless-fast/references/events/app/wix/events/events.ts +136 -0
- package/skills/wix-headless-fast/references/events/app/wix/events/registration.ts +128 -0
- package/skills/wix-headless-fast/references/events/app/wix/events/types.ts +61 -0
- package/skills/wix-headless-fast/references/events/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-fast/references/events/app-astro/pages/event-confirmation.astro +12 -0
- package/skills/wix-headless-fast/references/events/app-astro/pages/events/[slug].astro +80 -0
- package/skills/wix-headless-fast/references/events/app-astro/pages/events.astro +21 -0
- package/skills/wix-headless-fast/references/events/lock/astro/package-lock.json +11884 -0
- package/skills/wix-headless-fast/references/events/seed/SEED.md +86 -0
- package/skills/wix-headless-fast/references/events/seed/seed-events.mjs +276 -0
- package/skills/wix-headless-fast/references/forms/INSTRUCTIONS.md +150 -0
- package/skills/wix-headless-fast/references/forms/app/hooks/forms/useWixForm.ts +317 -0
- package/skills/wix-headless-fast/references/forms/app/wix/forms/forms.ts +269 -0
- package/skills/wix-headless-fast/references/forms/app/wix/forms/submissions.ts +231 -0
- package/skills/wix-headless-fast/references/forms/app/wix/forms/types.ts +135 -0
- package/skills/wix-headless-fast/references/forms/lock/astro/package-lock.json +10593 -0
- package/skills/wix-headless-fast/references/forms/seed/SEED.md +108 -0
- package/skills/wix-headless-fast/references/forms/seed/seed-forms.mjs +320 -0
- package/skills/wix-headless-fast/references/members/INSTRUCTIONS.md +63 -0
- package/skills/wix-headless-fast/references/members/app/components/members/AccountView.tsx +60 -0
- package/skills/wix-headless-fast/references/members/app/components/members/LoginForm.tsx +155 -0
- package/skills/wix-headless-fast/references/members/app/components/members/MemberMenu.tsx +78 -0
- package/skills/wix-headless-fast/references/members/app/components/members/RequireAuth.tsx +47 -0
- package/skills/wix-headless-fast/references/members/app/hooks/members/useMember.ts +66 -0
- package/skills/wix-headless-fast/references/members/app/wix/members/auth.ts +88 -0
- package/skills/wix-headless-fast/references/members/app/wix/members/client.ts +53 -0
- package/skills/wix-headless-fast/references/members/app/wix/members/member-store.ts +122 -0
- package/skills/wix-headless-fast/references/members/app/wix/members/members.ts +50 -0
- package/skills/wix-headless-fast/references/members/app/wix/members/types.ts +21 -0
- package/skills/wix-headless-fast/references/members/app-astro/layouts/SiteLayout.astro +42 -0
- package/skills/wix-headless-fast/references/members/app-astro/pages/account.astro +10 -0
- package/skills/wix-headless-fast/references/members/app-astro/pages/login.astro +11 -0
- package/skills/wix-headless-fast/references/members/lock/astro/package-lock.json +10329 -0
- package/skills/wix-headless-fast/references/members/seed/SEED.md +39 -0
- package/skills/wix-headless-fast/references/members/seed/seed-members.mjs +94 -0
- package/skills/wix-headless-fast/references/portfolio/INSTRUCTIONS.md +134 -0
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionProjectsView.tsx +110 -0
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/CollectionsView.tsx +90 -0
- package/skills/wix-headless-fast/references/portfolio/app/components/portfolio/ProjectDetailView.tsx +115 -0
- package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollectionProjects.ts +59 -0
- package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useCollections.ts +39 -0
- package/skills/wix-headless-fast/references/portfolio/app/hooks/portfolio/useProjectDetail.ts +58 -0
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/portfolio.ts +165 -0
- package/skills/wix-headless-fast/references/portfolio/app/wix/portfolio/types.ts +55 -0
- package/skills/wix-headless-fast/references/portfolio/app-astro/layouts/SiteLayout.astro +40 -0
- package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio/[slug].astro +30 -0
- package/skills/wix-headless-fast/references/portfolio/app-astro/pages/portfolio.astro +21 -0
- package/skills/wix-headless-fast/references/portfolio/app-astro/pages/projects/[slug].astro +29 -0
- package/skills/wix-headless-fast/references/portfolio/lock/astro/package-lock.json +10197 -0
- package/skills/wix-headless-fast/references/portfolio/seed/SEED.md +78 -0
- package/skills/wix-headless-fast/references/portfolio/seed/seed-portfolio.mjs +258 -0
- package/skills/wix-headless-fast/references/pricing-plans/INSTRUCTIONS.md +133 -0
- package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlanDetailView.tsx +58 -0
- package/skills/wix-headless-fast/references/pricing-plans/app/components/pricing-plans/PlansView.tsx +126 -0
- package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlanPurchase.ts +37 -0
- package/skills/wix-headless-fast/references/pricing-plans/app/hooks/pricing-plans/usePlans.ts +39 -0
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/plans.ts +75 -0
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/purchase.ts +45 -0
- package/skills/wix-headless-fast/references/pricing-plans/app/wix/pricing-plans/types.ts +30 -0
- package/skills/wix-headless-fast/references/pricing-plans/app-astro/layouts/SiteLayout.astro +41 -0
- package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans/[slug].astro +40 -0
- package/skills/wix-headless-fast/references/pricing-plans/app-astro/pages/plans.astro +21 -0
- package/skills/wix-headless-fast/references/pricing-plans/lock/astro/package-lock.json +11226 -0
- package/skills/wix-headless-fast/references/pricing-plans/seed/SEED.md +71 -0
- package/skills/wix-headless-fast/references/pricing-plans/seed/seed-pricing-plans.mjs +279 -0
- package/skills/wix-headless-fast/references/restaurants/INSTRUCTIONS.md +165 -0
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/MenuView.tsx +142 -0
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartButton.tsx +26 -0
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/OrderCartDrawer.tsx +121 -0
- package/skills/wix-headless-fast/references/restaurants/app/components/restaurants/ReservationView.tsx +155 -0
- package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useMenus.ts +55 -0
- package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useOrderCart.ts +43 -0
- package/skills/wix-headless-fast/references/restaurants/app/hooks/restaurants/useReservation.ts +177 -0
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/menu.ts +165 -0
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/order-store.ts +103 -0
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/ordering.ts +254 -0
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/reservations.ts +146 -0
- package/skills/wix-headless-fast/references/restaurants/app/wix/restaurants/types.ts +168 -0
- package/skills/wix-headless-fast/references/restaurants/app-astro/layouts/SiteLayout.astro +47 -0
- package/skills/wix-headless-fast/references/restaurants/app-astro/pages/menu.astro +22 -0
- package/skills/wix-headless-fast/references/restaurants/app-astro/pages/reservations.astro +12 -0
- package/skills/wix-headless-fast/references/restaurants/lock/astro/package-lock.json +12560 -0
- package/skills/wix-headless-fast/references/restaurants/seed/SEED.md +81 -0
- package/skills/wix-headless-fast/references/restaurants/seed/seed-restaurants.mjs +479 -0
- package/skills/wix-headless-fast/references/shared/CONTENT.md +22 -0
- package/skills/wix-headless-fast/references/shared/CUSTOM_OPERATIONS.md +73 -0
- package/skills/wix-headless-fast/references/shared/DESIGN.md +26 -0
- package/skills/wix-headless-fast/references/shared/app/styles/global.css +52 -0
- package/skills/wix-headless-fast/references/shared/app/wix/config.ts +15 -0
- package/skills/wix-headless-fast/references/shared/app/wix/media.ts +27 -0
- package/skills/wix-headless-fast/references/shared/app/wix/money.ts +24 -0
- package/skills/wix-headless-fast/references/shared/app/wix/sdk.ts +76 -0
- package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app/wix/media-upload/client.ts +46 -0
- package/skills/wix-headless-fast/references/shared/capabilities/media-upload/app-astro/pages/api/wix/media-upload.ts +46 -0
- package/skills/wix-headless-fast/references/shared/seed/images.mjs +145 -0
- package/skills/wix-headless-fast/references/storefront/INSTRUCTIONS.md +149 -0
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartButton.tsx +26 -0
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/CartDrawer.tsx +121 -0
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductCard.tsx +100 -0
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductDetailView.tsx +130 -0
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/ProductGrid.tsx +48 -0
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/ShopView.tsx +66 -0
- package/skills/wix-headless-fast/references/storefront/app/components/storefront/VariantPicker.tsx +103 -0
- package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useCart.ts +48 -0
- package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useProductDetail.ts +140 -0
- package/skills/wix-headless-fast/references/storefront/app/hooks/storefront/useShop.ts +80 -0
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart-store.ts +101 -0
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/cart.ts +221 -0
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/catalog.ts +215 -0
- package/skills/wix-headless-fast/references/storefront/app/wix/storefront/types.ts +109 -0
- package/skills/wix-headless-fast/references/storefront/app-astro/layouts/SiteLayout.astro +46 -0
- package/skills/wix-headless-fast/references/storefront/app-astro/pages/products/[slug].astro +56 -0
- package/skills/wix-headless-fast/references/storefront/app-astro/pages/shop.astro +23 -0
- package/skills/wix-headless-fast/references/storefront/lock/astro/package-lock.json +12247 -0
- package/skills/wix-headless-fast/references/storefront/seed/SEED.md +85 -0
- package/skills/wix-headless-fast/references/storefront/seed/seed-store.mjs +415 -0
- package/skills/wix-manage/SKILL.md +28 -2
- package/skills/wix-manage/references/bookings/booking-system-integration-gaps.md +20 -13
- package/skills/wix-manage/references/bookings/end-to-end-booking-flow.md +24 -11
- package/skills/wix-manage/references/cms/cms-ecommerce-catalog-integration.md +5 -5
- package/skills/wix-manage/references/google-ads/manage-campaign-success-guide.md +141 -0
- package/skills/wix-manage/references/google-business-profile/connect-google-business-profile.md +134 -0
- package/skills/wix-manage/references/google-business-profile/manage-google-business-profile-locations.md +182 -0
- package/skills/wix-manage/references/marketing/create-and-publish-social-post.md +3 -0
- package/skills/wix-manage/references/seo/manage-seo-tags.md +315 -0
- package/skills/wix-manage/references/seo/manage-url-redirects.md +250 -0
- package/skills/wix-manage/references/sites/query-sites.md +72 -161
- package/skills/wix-manage/references/stores/create-product-catalog-v3.md +21 -6
- package/skills/wix-manage/references/stores/update-product-with-options.md +83 -0
- package/skills/wix-replatform/resources/rp-mapper/wix-business-solutions-taxonomy.md +5 -6
- package/skills/wix-vibe-headless/SKILL.md +18 -4
- package/skills/wix-vibe-headless/install/deploy.cjs +12 -4
- package/skills/wix-vibe-headless/install/pin-agents-md.cjs +2 -1
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +16 -10
- package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +13 -8
- package/skills/wix-vibe-headless/platforms/base44.md +27 -62
- package/skills/wix-vibe-headless/platforms/generic.md +6 -3
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +45 -0
- package/skills/wix-vibe-headless/references/bookings/app/components/RentalDurationPicker.jsx +67 -0
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useRentalDuration.js +128 -0
- package/skills/wix-vibe-headless/references/bookings/app/hooks/useServiceDetail.js +5 -3
- package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-checkout.js +9 -8
- package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-rentals.js +250 -0
- package/skills/wix-vibe-headless/references/bookings/app/rest/wix-bookings-services.js +12 -5
- package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +41 -0
- package/skills/wix-vibe-headless/references/bookings/seed/seed-rentals.js +267 -0
- package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +6 -3
- package/skills/wix-vibe-headless/references/forms/INSTRUCTIONS.md +470 -0
- package/skills/wix-vibe-headless/references/forms/app/hooks/useWixForm.js +425 -0
- package/skills/wix-vibe-headless/references/forms/app/lib/wix-form-schema-utils.js +187 -0
- package/skills/wix-vibe-headless/references/forms/app/rest/wix-forms-submissions.js +238 -0
- package/skills/wix-vibe-headless/references/forms/app/rest/wix-forms.js +108 -0
- package/skills/wix-vibe-headless/references/forms/seed/SEED.md +1762 -0
- package/skills/wix-vibe-headless/references/rentals/INSTRUCTIONS.md +13 -0
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +4 -1
- package/skills/wix-vibe-headless/references/restaurants/app/components/OrderCartDrawer.jsx +23 -11
- package/skills/wix-vibe-headless/references/restaurants/app/context/OrderCartContext.jsx +1 -1
- package/skills/wix-vibe-headless/references/restaurants/app/rest/wix-restaurants-ordering.js +29 -31
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +152 -92
- package/skills/wix-vibe-headless/references/storefront/app/components/CartDrawer.jsx +37 -38
- package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +2 -2
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +15 -8
- package/skills/wix-vibe-headless/references/storefront/app/lib/storeImage.js +37 -0
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-cart.js +35 -35
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-catalog.js +18 -6
- package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +30 -7
- package/skills/wix-vibe-headless/references/storefront/seed/seed-store.js +46 -10
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW-REFERENCE.md +0 -172
- package/skills/wix-app/references/editor-react-component/A11Y-REVIEW.md +0 -143
- package/skills/wix-app/references/editor-react-component/COMPONENT-API.md +0 -516
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONFIGURATION.md +0 -225
- package/skills/wix-app/references/editor-react-component/EDIT-FLOW.md +0 -6
- package/skills/wix-app/references/editor-react-component/REACT-PATTERNS.md +0 -95
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductCard.jsx +0 -110
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductGallery.jsx +0 -51
- package/skills/wix-vibe-headless/references/storefront/app/components/ProductGrid.jsx +0 -49
- package/skills/wix-vibe-headless/references/storefront/app/components/VariantPicker.jsx +0 -92
- package/skills/wix-vibe-headless/references/storefront/app/pages/ProductDetail.jsx +0 -139
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Setup Rentals"
|
|
3
|
+
description: Initializes a Wix Rentals backend — creates a resource type, the bookable resources (rooms, vehicles, equipment), and the rental services carrying serviceResources plus a duration range so customers pick their own length in hours or days. Rentals has no APIs of its own; it is Services V2 with rentals-specific field values. Specifies the *how* (calls + format); how many resources and services, their ranges and prices come from the request.
|
|
4
|
+
---
|
|
5
|
+
**RECIPE**: Business Recipe – Initial Setup for Wix Rentals (Services V2 + Resources V2)
|
|
6
|
+
|
|
7
|
+
> **Standard call shape (every curl below).** The `<AUTH>` placeholder is shorthand for `Authorization: Bearer <TOKEN>` only. Body-bearing requests also need `Content-Type: application/json`.
|
|
8
|
+
|
|
9
|
+
A concise checklist for turning a freshly provisioned Wix site with the **Wix Rentals** app installed into a populated catalog of rentable resources.
|
|
10
|
+
**Notice** that this recipe is **NOT** meant for coding purposes and is **ONLY** meant for initial Rentals backend setup. (The frontend read/booking contract is the sibling recipe `how-to-code-rentals.md`.)
|
|
11
|
+
|
|
12
|
+
> **This recipe is the *how*, not the *what*.** What to seed — how many resource types and resources, how many services, whether they are hourly or daily, their duration ranges and prices — is determined by the request you're fulfilling. This recipe only specifies the calls and the request format; it does not decide quantities.
|
|
13
|
+
|
|
14
|
+
> **⚠️ Wix Rentals has NO APIs of its own.** It runs on the **Wix Bookings** APIs with rentals-specific field values, so a rental offering is a Bookings *service* and a reservation is a Bookings *booking*. There is no `@wix/rentals` package and no `/rentals/` REST namespace — do not go looking for one, and do not report rentals as "not supported headlessly".
|
|
15
|
+
>
|
|
16
|
+
> **The Wix Rentals doc set is four pages** — this recipe is distilled from them, and they are where to go when a task falls outside the common path:
|
|
17
|
+
> - [About Wix Rentals](https://dev.wix.com/docs/api-reference/business-solutions/rentals/introduction.md) — the model, the app id, and the constraints
|
|
18
|
+
> - [Wix Rentals and the Bookings APIs](https://dev.wix.com/docs/api-reference/business-solutions/rentals/wix-rentals-and-the-bookings-apis.md) — each rentals concept mapped to its Bookings API
|
|
19
|
+
> - [About Wix Rentals Availability](https://dev.wix.com/docs/api-reference/business-solutions/rentals/about-wix-rentals-availability.md) — resource schedules, hourly vs daily, buffer time
|
|
20
|
+
> - [Wix Rentals: Sample Flows](https://dev.wix.com/docs/api-reference/business-solutions/rentals/sample-flows.md) — the call sequences, including [Set up a rental service](https://dev.wix.com/docs/api-reference/business-solutions/rentals/sample-flows.md#set-up-a-rental-service), which is this recipe end to end
|
|
21
|
+
|
|
22
|
+
> ### The invariants (read these before anything else)
|
|
23
|
+
> A service is a rental because of **five field values**, all set at create time in STEP 4:
|
|
24
|
+
> 1. **`appId` = `ff5d6eb1-65e4-4f9a-8b14-64d34c12cc2e`** — and it is **IMMUTABLE after create**. A service created without it is a plain Bookings service *forever*; no update converts it. This is the most expensive mistake in this recipe.
|
|
25
|
+
> 2. **`serviceResources: [{ "resourceType": { "id": "<resourceTypeId>" }, "resourceIds": { "values": ["<resourceId>", …] } }]`** — list the resource type **and** its concrete resource ids. Availability comes from the listed ids: identical services return 48 time-slots with them and 0 without. (Dropping `serviceResources` altogether returns `MISSING_APPOINTMENT_RESOURCES` — see STEP 4.)
|
|
26
|
+
> 3. **`primaryResourceType`** — the resource type GUID, which makes availability come from the rooms/vehicles instead of staff schedules. It must reference **one of the types listed in `serviceResources`**. Omitting it silently falls back to the **staff** resource type.
|
|
27
|
+
> 4. **`form.id` = `3a2ea2ce-91f4-4617-ab24-629933c0c31a`** — the Rentals default booking form, provisioned at install and identical on every site. Omit it and you get the standard Bookings form instead.
|
|
28
|
+
> 5. **`durationRange`** — with a single `unitType` (`HOUR` or `DAY`) and its matching `hourOptions`/`dayOptions`. Mutually exclusive with `sessionDurations`.
|
|
29
|
+
>
|
|
30
|
+
> And one ordering rule: **resources must exist before the service** (STEP 2 before STEP 4), or availability is permanently empty.
|
|
31
|
+
>
|
|
32
|
+
> **Rental services never use a category** — omit the field. The bookings "a category or it's invisible" rule is specific to Wix Bookings and does not apply to rentals. See STEP 3.
|
|
33
|
+
|
|
34
|
+
> **API surfaces:** everything is on the **public** host `https://www.wixapis.com/bookings/...`. Services are **Services V2** (`…/bookings/v2/services`) — the method page's schema header shows an internal `…/_api/bookings/v2/services` form, **do not use that**. Resource types are `…/bookings/v2/resources/resource-types`, resources are `…/bookings/v2/resources`. The Wix Rentals **app id** is `ff5d6eb1-65e4-4f9a-8b14-64d34c12cc2e` (needed here on the service, and by the frontend for filtering + the cart).
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Article: Steps for Setting Up Wix Rentals
|
|
39
|
+
|
|
40
|
+
**YOU MUST** complete the following steps **in the given order** (1-5) without skipping any and **without requiring additional user input**. STEP 5 (attributes) runs only when the request calls for filterable resource properties. The **Attach images** step runs **only when imagery is on** — skip it entirely otherwise.
|
|
41
|
+
|
|
42
|
+
**⚠️ CRITICAL ORDER REQUIREMENT: resource type (STEP 1) → resources (STEP 2) → services (STEP 4).** (STEP 3 is intentionally empty — rental services use no category.) A rental service declares its resource type in `serviceResources` and points at it via `primaryResourceType`, and its availability is derived from the *resources* in that type — so both must exist before the service. A service created against a resource type that holds **no resources has permanently empty availability**: it is created successfully, appears in the catalog, and can never be booked.
|
|
43
|
+
|
|
44
|
+
**Check for pre-existing services first** — same demo-data cleanup as bookings, same rules. List with `POST https://www.wixapis.com/bookings/v2/services/query` (body `{"query": {"paging": {"limit": 100}}}`), and `DELETE https://www.wixapis.com/bookings/v2/services/<serviceId>` the install's own samples. **Do not assume every existing service is a sample** — if it isn't obviously install demo data, **ask the user first**. Full rationale: `setup-bookings.md` § "Check for pre-existing services first".
|
|
45
|
+
|
|
46
|
+
### STEP 1: Create the resource type
|
|
47
|
+
|
|
48
|
+
A **resource type** is the category of thing being rented — "Meeting rooms", "Vans", "Cameras". A service connects to exactly **one** resource type, and Wix derives that service's availability from the resources inside it. Create one resource type per kind of thing the request rents.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
curl -X POST 'https://www.wixapis.com/bookings/v2/resources/resource-types' \
|
|
52
|
+
-H 'Authorization: <AUTH>' \
|
|
53
|
+
-H 'Content-Type: application/json' \
|
|
54
|
+
-d '{ "resourceType": { "name": "Meeting rooms" } }'
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The response is `{ "resourceType": { "id": "<resourceTypeId>", … } }` — **keep each `id`**, STEP 2 and STEP 4 both need it. Full contract: <https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resource-types-v2/create-resource-type.md>
|
|
58
|
+
|
|
59
|
+
- **`name` is required, max 40 characters, and must be unique per site.** A duplicate returns `409 RESOURCE_TYPE_ALREADY_EXISTS_FOR_NAME` — query or rename rather than retrying the same name.
|
|
60
|
+
- Sites have a cap on resource types (`429 MAX_NUMBER_OF_RESOURCE_TYPES_REACHED`). Create one per genuine category, not one per item.
|
|
61
|
+
|
|
62
|
+
### STEP 2: Create the resources
|
|
63
|
+
|
|
64
|
+
A **resource** is an individual bookable thing — "Room A", "Room B", "Van 3". Create one per rentable unit. Two resources of the same type mean two customers can rent in parallel.
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
curl -X POST 'https://www.wixapis.com/bookings/v2/resources' \
|
|
68
|
+
-H 'Authorization: <AUTH>' \
|
|
69
|
+
-H 'Content-Type: application/json' \
|
|
70
|
+
-d '{
|
|
71
|
+
"resource": {
|
|
72
|
+
"name": "Room A",
|
|
73
|
+
"typeId": "<RESOURCE_TYPE_ID_FROM_STEP_1>"
|
|
74
|
+
}
|
|
75
|
+
}'
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Keep each resource's returned **`id`** — it's needed for attributes (STEP 5) and the handoff, **not** by the service.
|
|
79
|
+
|
|
80
|
+
**A resource's `typeId` binds it to its type; the service then binds to those resources by listing their ids.** STEP 4's `serviceResources` names the resource *type* **and** its `resourceIds`, which is where the service's availability comes from. Add a resource later by updating the service's `resourceIds`.
|
|
81
|
+
|
|
82
|
+
- **⚠️ Omit `workingHoursSchedules` — this is the deliberate seed default and it matters downstream.** ([Why, in detail](https://dev.wix.com/docs/api-reference/business-solutions/rentals/about-wix-rentals-availability.md#resource-schedules).) A resource with **no** working-hours schedule is bookable **24/7**. That keeps the seed to a single call per resource, *and* it makes a multi-day daily rental store as **one booking** rather than a linked group of per-day bookings. A resource **with** working hours splits every multi-day rental into one booking per working day, created through Create Multi Service Booking — a materially harder frontend flow (`how-to-code-rentals.md` § "Daily availability"). Seed 24/7 unless the request explicitly needs opening hours; the merchant can add hours from the dashboard later.
|
|
83
|
+
- **Working hours, when the request genuinely needs them,** are a Schedules V3 schedule referenced by `workingHoursSchedules.scheduleId` — created separately, then attached. It is out of scope for a seed; note it in the handoff instead. Reference: <https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/create-resource.md>
|
|
84
|
+
- **Locations** — `locationOptions.specificLocationOptions` binds a resource to business locations. Omit it for a single-location site (the default). When both `workingHoursSchedules` and `locationOptions` are set, **`workingHoursSchedules` takes precedence**.
|
|
85
|
+
|
|
86
|
+
### STEP 3: No category — rental services don't use categories
|
|
87
|
+
|
|
88
|
+
**⚠️ Rental services do not use categories at all. Omit `category` from the service payload entirely** — do not send `"category": {}`, a made-up id, or try to create one. There is no step here; the numbering is kept so STEP 4 keeps its name.
|
|
89
|
+
|
|
90
|
+
This is the one place where the bookings invariant does **not** carry over. `setup-bookings.md` STEP 2 calls `category.id` critical because a Bookings service without one is hidden on the live site. **That rule is specific to Wix Bookings and does not apply to Wix Rentals** — rentals are surfaced through the `appId`-filtered catalog read, not through Bookings categories. Confirmed on a live Rentals site: services created with no category come back from that read with `hidden: false`, and the Rentals install's own demo service ships without one.
|
|
91
|
+
|
|
92
|
+
On a Rentals-only site the categories API isn't reachable anyway — it belongs to the **Wix Bookings app**, so `POST …/bookings/v2/categories` returns **`428 APP_NOT_INSTALLED`**. That is expected: rentals don't use categories, so there is nothing to do here. If the site also runs Wix Bookings for plain services, the categories API works there — assign categories only to those Bookings services, never to rentals.
|
|
93
|
+
|
|
94
|
+
### STEP 4: Create the rental services
|
|
95
|
+
|
|
96
|
+
Create the services **one at a time** with `POST https://www.wixapis.com/bookings/v2/services` — one call per service, each with a top-level `service` object. A rental service is a normal **Services V2 `APPOINTMENT`** carrying the rentals-specific values.
|
|
97
|
+
|
|
98
|
+
**⚠️ Do NOT use the bulk endpoint (`…/bookings/v2/bulk/services/create`) for rentals.** It creates the service correctly but attaches a **schedule tagged with the Wix Bookings app id instead of the Wix Rentals one**, and calendar events inherit their app id from the schedule — so every booking and every event on that service becomes invisible in the Rentals dashboard calendar. The service itself looks perfect, which is what makes this hard to spot. Verified on a live site: bulk-created schedules carry `13d21c63-b5ec-5912-8397-c3a5ddb27a97`; single-created ones carry the rentals app id. Use single create until that is fixed upstream. (Bulk is still fine for plain Wix Bookings services — see `setup-bookings.md`.)
|
|
99
|
+
|
|
100
|
+
**⚠️ CRITICAL: the V2 service payload is FLAT** — name/description/tagLine are top-level, not nested under `info`. Price uses `value` (a **string**), not `amount`. Full field contract: <https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/create-service.md>
|
|
101
|
+
|
|
102
|
+
**One hourly rental service, bookable 1–8 hours at $40/hour:**
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"service": {
|
|
107
|
+
"type": "APPOINTMENT",
|
|
108
|
+
"appId": "ff5d6eb1-65e4-4f9a-8b14-64d34c12cc2e",
|
|
109
|
+
"name": "Meeting Room",
|
|
110
|
+
"description": "A brand-appropriate description of what is being rented.",
|
|
111
|
+
"tagLine": "Short tagline",
|
|
112
|
+
"defaultCapacity": 1,
|
|
113
|
+
"serviceResources": [ {
|
|
114
|
+
"resourceType": { "id": "<RESOURCE_TYPE_ID_FROM_STEP_1>" },
|
|
115
|
+
"resourceIds": { "values": ["<RESOURCE_ID_FROM_STEP_2>"] }
|
|
116
|
+
} ],
|
|
117
|
+
"primaryResourceType": "<RESOURCE_TYPE_ID_FROM_STEP_1>",
|
|
118
|
+
"form": { "id": "3a2ea2ce-91f4-4617-ab24-629933c0c31a" },
|
|
119
|
+
"onlineBooking": { "enabled": true, "requireManualApproval": false, "allowMultipleRequests": false },
|
|
120
|
+
"schedule": {
|
|
121
|
+
"availabilityConstraints": {
|
|
122
|
+
"durationRange": {
|
|
123
|
+
"unitType": "HOUR",
|
|
124
|
+
"hourOptions": { "minDurationInMinutes": 60, "maxDurationInMinutes": 480 }
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"payment": {
|
|
129
|
+
"rateType": "FIXED",
|
|
130
|
+
"fixed": { "price": { "value": "40.00", "currency": "USD" } },
|
|
131
|
+
"options": { "online": true, "inPerson": false }
|
|
132
|
+
},
|
|
133
|
+
"locations": [ { "type": "BUSINESS" } ]
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**`serviceResources` carries both levels.** `resourceType.id` is the type from STEP 1; `resourceIds.values` lists the individual resources from STEP 2 that this service can book (max **100** ids, max **8** `serviceResources` entries).
|
|
139
|
+
|
|
140
|
+
**List the concrete `resourceIds`** — the service's availability comes from them. Verified on a live site: identical services returned **48** time-slots with `resourceIds` and **0** without. Add resources later by updating the service's `resourceIds`.
|
|
141
|
+
|
|
142
|
+
**⚠️ Price decides how many services you create.** The rate lives on the **service**, not the resource, so resources that rent at **different rates must be separate services**, each pinning its own resource in `resourceIds`. Three meeting rooms at ₪60, ₪120 and ₪250 per hour are **three services** sharing one resource type — not one service with three resources. Resources that rent at the **same** rate can share a single service.
|
|
143
|
+
|
|
144
|
+
**For a daily rental**, swap the duration range (everything else is identical):
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
"durationRange": {
|
|
148
|
+
"unitType": "DAY",
|
|
149
|
+
"dayOptions": { "minDurationInDays": 1, "maxDurationInDays": 5 }
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**⚠️ CRITICAL FORMAT REQUIREMENTS:**
|
|
154
|
+
|
|
155
|
+
- **`appId` must be the Wix Rentals app id** `ff5d6eb1-65e4-4f9a-8b14-64d34c12cc2e`, and it is **immutable after create** — a service created without it is a plain Bookings service forever, and no update can convert it. Getting this wrong is the single most expensive mistake in this recipe.
|
|
156
|
+
- **`appId` also means the service does NOT appear in the Wix Bookings dashboard** — it appears in the Rentals dashboard. That is correct and expected; don't "fix" it.
|
|
157
|
+
- **⚠️ `serviceResources` is REQUIRED and is the real cause of `MISSING_APPOINTMENT_RESOURCES` — do not trust the error text.** The message reads *"service of type appointment requires at least one staff member or service resource"*, which invites you to go check whether your resource type has resources in it. **That is a dead end** — the create fails even when the type is fully populated. What the service actually needs is the resource type declared **on the service**:
|
|
158
|
+
```json
|
|
159
|
+
"serviceResources": [ {
|
|
160
|
+
"resourceType": { "id": "<resourceTypeId>" },
|
|
161
|
+
"resourceIds": { "values": ["<resourceId>"] }
|
|
162
|
+
} ]
|
|
163
|
+
```
|
|
164
|
+
Verified on a live site: adding this field is what makes the create succeed. `resourceType.id` is the type from STEP 1; `resourceIds.values` lists the resources from STEP 2 this service can book. Max **8** `serviceResources` entries, max **100** ids each. **`resourceIds` supplies the service's availability** — list them (48 slots with, 0 without, otherwise identical). Add resources later by updating `resourceIds`.
|
|
165
|
+
- **`primaryResourceType`** is the resource type **GUID** from STEP 1, and **must be one of the types listed in `serviceResources`**. It is what makes availability come from the rooms/vehicles rather than from staff schedules. Omitting it silently falls back to the **staff** resource type, which produces a normal staff-driven appointment service.
|
|
166
|
+
- **`form.id` selects the booking form. Set it to the Wix Rentals default booking form — `3a2ea2ce-91f4-4617-ab24-629933c0c31a`.** Installing the Rentals app provisions that form, and because it is cloned from the template with the template's own id, **the GUID is the same on every site** — treat it as a constant, like the `appId`. Omit the field and the service uses the standard Wix Bookings form instead, so the rentals form's own fields won't be there. It's the Rentals app's own choice too: `RentalsProvisioner` sets it on every service it creates.
|
|
167
|
+
- **`durationRange` and `sessionDurations` are mutually exclusive** — send one or the other, never both. `durationRange` also **can't be combined with `workingHours`** on the service.
|
|
168
|
+
- **`unitType` selects which config object is read:** `HOUR` → `hourOptions`, `DAY` → `dayOptions`. Sending `dayOptions` with `unitType: "HOUR"` leaves the range unset.
|
|
169
|
+
- **Ranges:** hourly `minDurationInMinutes`/`maxDurationInMinutes` are **30–1440**; daily `minDurationInDays`/`maxDurationInDays` are **1–8** for rentals. Min must be **≤** max. (The underlying Services V2 schema permits days up to 60; Wix Rentals documents 1–8 — stay inside 1–8.)
|
|
170
|
+
- **One unit type per service.** A service is hourly *or* daily, never both. If the request wants a room by the hour **and** by the day, that is **two services**, each with its own price.
|
|
171
|
+
- **Omit `staffMemberIds`.** Rentals are resource-driven, not staff-driven — `serviceResources` above is what satisfies the appointment-resource requirement. Never add a staff resource to get past `MISSING_APPOINTMENT_RESOURCES`; that reintroduces staff-based availability and produces a service that is no longer a rental in behaviour.
|
|
172
|
+
- **Omit `category`.** Rental services don't use categories at all (STEP 3).
|
|
173
|
+
- **`onlineBooking: { "enabled": true }` is required** — V2 rejects the create without it even though it reads as optional.
|
|
174
|
+
- **`defaultCapacity`** is required; use `1` (one customer rents a given resource at a time; parallel capacity comes from having more *resources*, not higher capacity).
|
|
175
|
+
- **`payment.options` — at least one of `online`/`inPerson` must be `true`**, even for free services. `NO_FEE` must pair with `online: false, inPerson: true`.
|
|
176
|
+
- **Price is per unit** — per hour for `HOUR`, per day for `DAY`. Wix multiplies it out at booking time (hourly is prorated per minute: `minutes × price ÷ 60`). Do **not** pre-multiply into a whole-rental price.
|
|
177
|
+
- **`locations[].type`** — use **`"BUSINESS"`**, never `"OWNER_BUSINESS"` (that enum belongs to `createBooking`'s slot location).
|
|
178
|
+
- **Currency** — the site's business currency wins; a EUR-locale site stores `EUR` even if you send `USD`. Not an error.
|
|
179
|
+
- **Imagery is opt-in** (`SEED.md` § "Entity images") — seed text-only, attach images in the pass-2 step below.
|
|
180
|
+
|
|
181
|
+
**Reading the response.** A single create returns the created service under a top-level `service`:
|
|
182
|
+
|
|
183
|
+
```json
|
|
184
|
+
{ "service": { "id": "<serviceId>", "name": "…", "type": "APPOINTMENT",
|
|
185
|
+
"appId": "ff5d6eb1-65e4-4f9a-8b14-64d34c12cc2e",
|
|
186
|
+
"mainSlug": { "name": "<url-slug>", "custom": false },
|
|
187
|
+
"schedule": { "id": "<scheduleId>", "availabilityConstraints": { "durationRange": { … } } } } }
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Keep each service's **`service.id`** and **`service.mainSlug.name`** (the frontend links by slug; if absent, derive it: lowercase, non-alphanumerics → hyphens). A failed create returns a normal error — retry that one service **once** with the same body; don't loop, and don't re-create ones that already succeeded.
|
|
191
|
+
|
|
192
|
+
**Verify the range actually landed.** `durationRange` is a newer field and a silently-dropped range yields a service that looks fine and books as a fixed slot. Re-read one created service (`GET https://www.wixapis.com/bookings/v2/services/<serviceId>`) and confirm `schedule.availabilityConstraints.durationRange.unitType` is populated before moving on.
|
|
193
|
+
|
|
194
|
+
### STEP 5: Resource attributes (only when the request wants filterable properties)
|
|
195
|
+
|
|
196
|
+
Attributes are typed custom properties on a resource — `Capacity` (number), `Has projector` (boolean), `Bed type` (string) — used to describe resources on the site and to filter the catalog. Skip this step entirely unless the request calls for it.
|
|
197
|
+
|
|
198
|
+
> **⚠️ The attributes API is the one surface here that really does live under `/_api/`.** Unlike Services V2 (where the `_api` form in the schema header is wrong and the public form is correct), the attributes reference's own examples call `https://www.wixapis.com/_api/attributes/v1/...`. Use the paths exactly as written below — don't "correct" them to a public form.
|
|
199
|
+
|
|
200
|
+
**1 · Define each attribute once per site.** Keep each returned `attributeDefinition.id`.
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
curl -X POST 'https://www.wixapis.com/_api/attributes/v1/attribute-definitions' \
|
|
204
|
+
-H 'Authorization: <AUTH>' \
|
|
205
|
+
-H 'Content-Type: application/json' \
|
|
206
|
+
-d '{
|
|
207
|
+
"attributeDefinition": {
|
|
208
|
+
"name": "Capacity",
|
|
209
|
+
"valueType": "NUMBER",
|
|
210
|
+
"numberConfig": { "min": 1, "max": 20 },
|
|
211
|
+
"defaultValue": { "numberDefault": 2 },
|
|
212
|
+
"visibility": true
|
|
213
|
+
}
|
|
214
|
+
}'
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**2 · Set values per resource.** The **resource id** is the `{entityId}` path segment. Each entry is matched by `attributeDefinitionId`, so only the listed attributes are created or updated.
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
curl -X POST 'https://www.wixapis.com/_api/attributes/v1/attribute-values/<RESOURCE_ID_FROM_STEP_2>/bulk-upsert' \
|
|
221
|
+
-H 'Authorization: <AUTH>' \
|
|
222
|
+
-H 'Content-Type: application/json' \
|
|
223
|
+
-d '{
|
|
224
|
+
"values": [ { "attributeDefinitionId": "<ATTRIBUTE_DEFINITION_ID>", "numberData": 4 } ],
|
|
225
|
+
"returnEntity": true
|
|
226
|
+
}'
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
The value key is typed — `numberData` for `NUMBER`, and the string/boolean equivalents for those `valueType`s; check the reference for the exact key rather than guessing.
|
|
230
|
+
|
|
231
|
+
**3 · Reading them back for display** — filter to attributes whose `attributeDefinition.visibility` is `true`. **⚠️ The API does not enforce visibility server-side**, so an unfiltered render leaks attributes the merchant marked hidden.
|
|
232
|
+
|
|
233
|
+
References: <https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/attributes/attribute-definition/create-attribute-definition.md> and <https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/attributes/attribute-value/bulk-upsert-attribute-values.md>
|
|
234
|
+
|
|
235
|
+
### Attach images (imagery ON only — skip otherwise)
|
|
236
|
+
|
|
237
|
+
Identical to the bookings flow, because it is the same Services V2 entity. Obtain the image per `references/IMAGE_GENERATION.md`, then `PATCH https://www.wixapis.com/bookings/v2/services/<serviceId>` writing under **`media.mainMedia`** and **`media.coverMedia`**, each `{ "image": { "id", "url", "width", "height" } }`, echoing the current `revision`.
|
|
238
|
+
|
|
239
|
+
**⚠️ Writing the image under `media.image` returns `HTTP 200` but silently drops it** — confirm by re-querying the service and checking `media.mainMedia` is populated. Never block on image failure; leave the service text-only. Full shape and caveats: `setup-bookings.md` § "Attach images".
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Conclusion
|
|
244
|
+
|
|
245
|
+
Following these steps **in order** sets up a Wix Rentals site:
|
|
246
|
+
|
|
247
|
+
- A **resource type** exists, and it **contains resources** — without resources the service's availability is permanently empty.
|
|
248
|
+
- Every service carries the **Wix Rentals `appId`** (`ff5d6eb1-65e4-4f9a-8b14-64d34c12cc2e`), set at create time because it is **immutable** afterwards.
|
|
249
|
+
- Every service carries **`serviceResources`** with concrete **`resourceIds`** listed — resource type alone gives 0 availability slots — plus **`primaryResourceType`**, so availability comes from the resources rather than from staff.
|
|
250
|
+
- Every service carries **`form.id`** = the Rentals default booking form constant, so it uses the rentals form rather than the standard Bookings one.
|
|
251
|
+
- Every service carries a **`durationRange`** with a single `unitType` and its matching `hourOptions`/`dayOptions` — never alongside `sessionDurations`.
|
|
252
|
+
- **No category** is set — rental services don't use categories, and the bookings visibility rule doesn't apply to them. They are surfaced by the `appId`-filtered catalog read.
|
|
253
|
+
- Resources are seeded **24/7** (no working-hours schedule), which keeps a multi-day daily rental to a single booking.
|
|
254
|
+
- IDs kept for the coding handoff: `resourceTypeIds[]`, `resourceIds[]`, `serviceIds[]`, service `slug`s (`mainSlug.name`), and any `attributeDefinitionIds[]`.
|
|
@@ -4,6 +4,11 @@ For a **managed** project (hosted on Wix infrastructure), every Wix call uses a
|
|
|
4
4
|
|
|
5
5
|
## 1 · Ensure an authenticated CLI session
|
|
6
6
|
|
|
7
|
+
### Secret boundary — mandatory
|
|
8
|
+
|
|
9
|
+
Never read authentication material or tokens into agent context.
|
|
10
|
+
Never emit them to stdout, stderr, logs, prompts, or tool results.
|
|
11
|
+
|
|
7
12
|
```bash
|
|
8
13
|
npx @wix/cli@latest whoami # exits 0 when logged in; non-zero when logged out
|
|
9
14
|
```
|
|
@@ -25,7 +25,7 @@ This is the framework reference for any **non-Astro** frontend — React/Vue/Sve
|
|
|
25
25
|
| <https://dev.wix.com/docs/go-headless/self-managed-headless/authentication/oauth/create-a-client-for-authentication-with-oauth.md> | **The model.** Install `@wix/sdk` + the domain packages, then `createClient({ modules, auth: OAuthStrategy({ clientId }) })`. clientId only, **no secret in the frontend**. Explicitly scoped to "frameworks other than Astro." Create the client **once** and reuse it. |
|
|
26
26
|
| <https://dev.wix.com/docs/sdk/core-modules/sdk/oauth-strategy.md> | **`OAuthStrategy` reference** — visitor sessions (automatic) vs member flows (managed/custom/external); token + session methods; confirms `clientId` only. |
|
|
27
27
|
| <https://dev.wix.com/docs/go-headless/self-managed-headless/authentication/visitors/handle-visitors-using-the-js-sdk.md> | **Visitors & members via the JS SDK** — visitor token sessions out of the box, and member login when the site needs it. Members are **first-class** on the non-Astro path (not deferred). |
|
|
28
|
-
| <https://dev.wix.com/docs/go-headless/
|
|
28
|
+
| <https://dev.wix.com/docs/go-headless/authentication/members/wix-login-page/add-a-wix-login-page-js-sdk.md> | **Member login (Wix login page)** — the manual `OAuthStrategy` handshake: `generateOAuthData → getAuthUrl → parseFromUrl → getMemberTokens → setTokens`, `logout`, `loggedIn()`. Login *is* sign-up (the Wix page logs in or registers); member tokens are the **same shape** as visitor tokens (`role: member`), so they reuse the visitor session machinery — login just swaps the token set. **`clientId` only (no secret); the connected site must be PUBLISHED and the `redirectUri` must be an exact-match allow-listed URI, or `getAuthUrl` fails; default to the Wix login page** over custom/external. **Full frontend contract → Read `inline-recipes/how-to-code-members-non-astro.md`** (local — Read it, don't curl). **Only if the brief explicitly asks for a custom/branded login form or custom sign-up fields → Read `inline-recipes/how-to-code-members-custom-login.md`** instead (`client.auth.register`/`login`; works on any project type — pick by intent, not project type). |
|
|
29
29
|
| <https://dev.wix.com/docs/sdk/articles/set-up-a-client/about-the-wix-client.md> | **Confirms non-Astro *does* need a client** — the "when you need a client vs not" list; non-Astro (managed or self-managed) is on the "needs a client" side, the mirror of Astro. |
|
|
30
30
|
|
|
31
31
|
> **clientId source is deferred.** This file uses the `clientId`; it does **not** say where it comes from. That's `{managed,self-managed}/AUTHENTICATION.md` — managed reads `appId` from `wix.config.json`; self-managed uses the OAuth app you created. Don't re-mint or re-fetch it if the flow already provides it.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wix-headless-fast
|
|
3
|
+
description: "Build a Wix Headless site fast by wiring SHIPPED, verified @wix/sdk code instead of authoring the integration from recipes. Each Wix business vertical ships a typed, framework-agnostic React core (data layer returning plain DTOs, hooks, headless components) plus an Astro overlay (SSR pages with owner-editable SEO pre-wired) and a build-time REST seed script — the agent scaffolds via the Wix CLI, deploys the shipped code, seeds the backend, designs the presentation layer itself on the shipped hooks (product card/grid, PDP, home, theme), and releases to Wix hosting. Works on Wix-managed Astro (ambient auth, the default) and on any React-based project (Vite, non-Astro) over the public OAuth client id. Verticals: stores/storefront (products, categories, variants, cart, hosted checkout), bookings (services, appointment/class time slots, staff, booking form, checkout-or-place), blog (posts, categories/tags, rich content), cms (structured content collections), forms (schema-driven visitor forms: render, validate, submit), events (listing, RSVP, ticket sales), members (login, gated pages, account), portfolio (project collections, media galleries), pricing-plans (plan grid, hosted purchase), restaurants (menus, online ordering, table reservations). Triggers: build me a store/blog/booking/event/restaurant/portfolio site fast, take appointments fast, sell tickets or membership plans headless, wix headless fast, connect a Wix business app with ready-made SDK code."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Wix Headless Fast
|
|
7
|
+
|
|
8
|
+
Build a Wix Headless site by **deploying shipped code, not authoring it**. Where `wix-headless`
|
|
9
|
+
hands the agent recipes to code from, this skill ships the integration itself — a typed data
|
|
10
|
+
layer, hooks, components, pages, and a seed script that are already correct — and the agent's
|
|
11
|
+
job narrows to brand, layout, copy, and wiring. The decisions live in the code; don't
|
|
12
|
+
re-litigate them.
|
|
13
|
+
|
|
14
|
+
## Relationship to sibling skills
|
|
15
|
+
|
|
16
|
+
| Skill | Use when |
|
|
17
|
+
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
18
|
+
| **wix-headless-fast** (this) | A supported vertical fits the request and the frontend is Astro or React — the fast path. |
|
|
19
|
+
| `wix-headless` | A vertical this skill doesn't ship yet, a non-React frontend, backend-only runs, or stripe/self-managed project types. |
|
|
20
|
+
| `wix-vibe-headless` | Client-only REST over a `WIX_CLIENT_ID` inside a vibe platform (Base44 etc.) — no SDK, no CLI. |
|
|
21
|
+
|
|
22
|
+
## The model
|
|
23
|
+
|
|
24
|
+
- **Shipped code is the implementation.** Every vertical ships under `references/<vertical>/`:
|
|
25
|
+
- `app/` — the framework-agnostic core (TypeScript): a data layer that returns **plain,
|
|
26
|
+
serializable DTOs** (images resolved to https URLs, prices pre-formatted), React hooks, and
|
|
27
|
+
routing-free headless components. Works in Astro islands, Vite SPAs, and Next.
|
|
28
|
+
- `app-astro/` — a thin Astro overlay: SSR pages that fetch via the core and pass DTOs to
|
|
29
|
+
islands, with owner-editable item-page SEO pre-wired.
|
|
30
|
+
- `seed/` — a build-time REST seed script (plain-data plan in, created content out) plus its
|
|
31
|
+
`SEED.md` contract.
|
|
32
|
+
- `INSTRUCTIONS.md` — the vertical's playbook: file map, what you build, hard rules, verify.
|
|
33
|
+
- **One auth seam.** All shipped code calls Wix through `src/wix/sdk.ts`: on Wix-managed Astro
|
|
34
|
+
auth is ambient (no client, no id); on any other React setup the same file runs a manual
|
|
35
|
+
visitor client off the public client id in `src/wix/config.ts`. The deploy step configures
|
|
36
|
+
this — nothing to wire by hand.
|
|
37
|
+
- **Data as-is; presentation is yours.** The data layer, hooks, and cart chrome are wired
|
|
38
|
+
as-is — never rewrite their internals, re-route them through API routes, or re-derive a
|
|
39
|
+
request shape. For a genuine gap, first read the relevant official contract with the
|
|
40
|
+
`wix-docs` skill; do not search generated SDK types, package files, or `node_modules` to
|
|
41
|
+
infer it. A normal caller-permitted operation belongs in a new data-layer function. A
|
|
42
|
+
privileged operation belongs in a validated server endpoint — see
|
|
43
|
+
`references/shared/CUSTOM_OPERATIONS.md`. The presentation components ship only as
|
|
44
|
+
**references**: the vertical's INSTRUCTIONS names the surfaces you design and implement
|
|
45
|
+
yourself on the shipped hooks (for storefront: card, grid, shop + PDP surfaces, home).
|
|
46
|
+
- **Never mock, fail loudly, purchases via Wix.** Live data or an honest empty state; surfaced
|
|
47
|
+
errors, not swallowed ones; checkout/purchase always through the Wix redirect session.
|
|
48
|
+
- **Optional capabilities are deployed from the plan.** A vertical can opt into a shared
|
|
49
|
+
capability without copying sensitive code. For a normal file upload, add a named
|
|
50
|
+
`capabilities.mediaUpload.policies` entry to the plan; Fast ships its client helper, Astro
|
|
51
|
+
endpoint, dependencies, and generated policy module once. Read
|
|
52
|
+
`references/shared/CUSTOM_OPERATIONS.md` before choosing it. The agent wires the helper to
|
|
53
|
+
the product UI; it never authors or widens the endpoint.
|
|
54
|
+
|
|
55
|
+
## The run
|
|
56
|
+
|
|
57
|
+
1. **Resolve the stack.** Default is **Wix-managed Astro** — take it unless the user names a
|
|
58
|
+
different React framework or the directory already holds a non-Astro React project. A
|
|
59
|
+
non-React frontend is out of scope → `wix-headless`.
|
|
60
|
+
2. **Draft the seed plan** (read only the vertical's `SEED.md` for this — it depends only on
|
|
61
|
+
the brief; save the vertical's `INSTRUCTIONS.md` for step 4, where it's needed). Requires from here on: Node ≥ 20.11 and a logged-in Wix CLI
|
|
62
|
+
(`npx @wix/cli@latest whoami`; login via the device-code flow — surface the URL+code, never
|
|
63
|
+
read tokens into context).
|
|
64
|
+
3. **Create runs (empty directory): run the fast path** — one deterministic call:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
node <SKILL_ROOT>/install/fast-path.mjs --business-name "<Brand>" --plan plan.json --vertical <vertical>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`--vertical` is required and picks which shipped code deploys AND which seed runs — use
|
|
71
|
+
the vertical you resolved from the Verticals table.
|
|
72
|
+
|
|
73
|
+
It emits one JSON event per line and returns in **~35s**: **scaffolds** the project,
|
|
74
|
+
**deploys** the shipped code (patching `package.json` with every dependency the code
|
|
75
|
+
imports, and placing the pre-resolved lockfile), then **starts two detached background
|
|
76
|
+
jobs** — the dependency install (`npm ci --ignore-scripts || npm install --ignore-scripts`)
|
|
77
|
+
and the **seed** — whose logs and completion markers are in the events. The final
|
|
78
|
+
`ready_for_brand_layer` event carries the project dir, siteId, ready-made dashboard links,
|
|
79
|
+
and both markers. Relay notable events. On an `error` event, recover just that step via the
|
|
80
|
+
manual path below, then continue.
|
|
81
|
+
|
|
82
|
+
**Connect/iterate runs (a project already on disk): never scaffold — use the manual path:**
|
|
83
|
+
`CI=1 npm create @wix/new@latest init` in place if there is no `wix.config.json` yet; then
|
|
84
|
+
`node <SKILL_ROOT>/install/deploy.mjs <vertical…> --stack astro|react --plan plan.json` from the project root
|
|
85
|
+
(react stack: add `--client-id` if there is no `wix.config.json` to read the public id
|
|
86
|
+
from); then ONE `npm ci --ignore-scripts || npm install --ignore-scripts` (backgroundable —
|
|
87
|
+
but **never run a second npm install concurrently**: two npms in one `node_modules` race and
|
|
88
|
+
redo each other's work); then seed per the vertical's `seed/SEED.md`. Seeding is
|
|
89
|
+
**additive**: never delete or overwrite existing content; if a cleanup seems needed, ask.
|
|
90
|
+
|
|
91
|
+
4. **Design and build the presentation while the install finishes** — in the project dir from
|
|
92
|
+
the `ready_for_brand_layer` event, per the vertical's `INSTRUCTIONS.md`: set the `@theme`
|
|
93
|
+
tokens, brand the chrome, and implement the vertical's creative surfaces yourself on the
|
|
94
|
+
shipped hooks (for storefront: your product card + grid, shop surface, PDP surface, and the
|
|
95
|
+
home page) — designed to fit the brief, not copied from the reference components. Read the
|
|
96
|
+
INSTRUCTIONS and the shared floors — `references/shared/DESIGN.md` +
|
|
97
|
+
`references/shared/CONTENT.md` — now (not earlier — their contracts matter only from this
|
|
98
|
+
step on); the hook/DTO
|
|
99
|
+
contracts are inlined there, so don't open the shipped files themselves. **Author your
|
|
100
|
+
surfaces in as few messages as possible** — batch multiple Write calls in one message
|
|
101
|
+
(components are independent files); don't pay a round-trip per file.
|
|
102
|
+
If the brief needs a core operation that shipped code does not cover, read
|
|
103
|
+
`references/shared/CUSTOM_OPERATIONS.md` before writing it. Use one documented path and
|
|
104
|
+
implement it; do not reverse-engineer SDK internals.
|
|
105
|
+
5. **When both background jobs have completed** — the install's marker
|
|
106
|
+
(`node_modules/.package-lock.json`) and the seed's (`.seed-exit`) both exist — **verify the
|
|
107
|
+
seed succeeded** (`.seed-exit` contains `0`; `seed-result.json` has the created counts for
|
|
108
|
+
your summary — if non-zero, read `seed.log` and re-run the seed module manually). Then
|
|
109
|
+
**build & release once** (managed):
|
|
110
|
+
`npx @wix/cli@latest build` then `npx @wix/cli@latest release` (if the install failed, run
|
|
111
|
+
it once more and then build). Don't build+release mid-flow; backend content is fetched at
|
|
112
|
+
runtime, so a re-release never "refreshes" seeded data. The run is complete only when the
|
|
113
|
+
site is released — close with the live URL and the dashboard link
|
|
114
|
+
`https://manage.wix.com/dashboard/<siteId>`. **Copy the live URL verbatim from the
|
|
115
|
+
`wix release` output — never retype it from memory** (a mistyped subdomain hands the user
|
|
116
|
+
a 404).
|
|
117
|
+
|
|
118
|
+
Don't smoke-test with a dev server unless the user explicitly asks to verify — correctness
|
|
119
|
+
comes from the shipped code, and real errors surface at build/release.
|
|
120
|
+
|
|
121
|
+
## Verticals
|
|
122
|
+
|
|
123
|
+
| The user wants… | Vertical | Playbook |
|
|
124
|
+
| -------------------------------------------------------------------------------------------- | ----------------- | ------------------------------------------ |
|
|
125
|
+
| Online store: products, categories, variants, cart, checkout | **storefront** | `references/storefront/INSTRUCTIONS.md` |
|
|
126
|
+
| Appointments/classes: services, time slots, staff, booking, checkout | **bookings** | `references/bookings/INSTRUCTIONS.md` |
|
|
127
|
+
| Blog: post feed, categories/tags, rich-content post pages | **blog** | `references/blog/INSTRUCTIONS.md` |
|
|
128
|
+
| Structured content collections (directory, recipes, listings) with pages designed per schema | **cms** | `references/cms/INSTRUCTIONS.md` |
|
|
129
|
+
| Any visitor-fillable form: contact/enquiry, signup, application, survey — rendered from the live schema | **forms** | `references/forms/INSTRUCTIONS.md` |
|
|
130
|
+
| Events: listing, event pages, free RSVP, ticket sales via hosted checkout | **events** | `references/events/INSTRUCTIONS.md` |
|
|
131
|
+
| Member accounts: custom in-app login/sign-up, gated pages, account page | **members** | `references/members/INSTRUCTIONS.md` |
|
|
132
|
+
| Portfolio/showcase: collections of projects, project pages with media galleries | **portfolio** | `references/portfolio/INSTRUCTIONS.md` |
|
|
133
|
+
| Membership/subscription plans: pricing page, plan detail, hosted purchase | **pricing-plans** | `references/pricing-plans/INSTRUCTIONS.md` |
|
|
134
|
+
| Restaurant: menu with photos, online ordering, table reservations | **restaurants** | `references/restaurants/INSTRUCTIONS.md` |
|
|
135
|
+
|
|
136
|
+
Verticals compose: a brief that spans several (a restaurant with a blog, a store with member
|
|
137
|
+
accounts) deploys them together — fast-path takes one vertical; deploy the rest with
|
|
138
|
+
`node <SKILL_ROOT>/install/deploy.mjs <vertical…>` from the project root before the install
|
|
139
|
+
starts, and run each vertical's seed. A request that doesn't match any shipped vertical isn't
|
|
140
|
+
this skill's fast path — route it to `wix-headless` rather than improvising an unshipped
|
|
141
|
+
vertical here.
|
|
142
|
+
|
|
143
|
+
## Adding a vertical (structure contract)
|
|
144
|
+
|
|
145
|
+
New verticals follow the same layout — the deploy script discovers them automatically (any
|
|
146
|
+
`references/<name>/app/` directory is a vertical):
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
references/<vertical>/
|
|
150
|
+
INSTRUCTIONS.md # playbook: file map, wiring per stack, what you build, hard rules, verify
|
|
151
|
+
app/ # framework-agnostic core — disjoint paths so verticals never collide:
|
|
152
|
+
wix/<vertical>/ # types.ts (DTOs) + data layer (calls via ../sdk, images via ../media)
|
|
153
|
+
hooks/<vertical>/ # React hooks (SSR-friendly: accept initial data)
|
|
154
|
+
components/<vertical>/ # routing-free components (plain <a> default + LinkComponent prop)
|
|
155
|
+
styles/global.css # Tailwind v4 + the @theme design tokens (shared token family)
|
|
156
|
+
app-astro/ # Astro overlay importing ONLY from the core:
|
|
157
|
+
pages/… # SSR fetch → DTO props → client:load islands; item pages carry
|
|
158
|
+
# wixMetadata + <SEO.Tags>; chrome islands are client:only
|
|
159
|
+
layouts/… # (reuse SiteLayout when it fits)
|
|
160
|
+
seed/ # seed-<vertical>.mjs (REST, mints its own CLI token) + SEED.md
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Core rules the structure encodes: raw API entities never leave the data layer (DTOs only);
|
|
164
|
+
client-shared state uses a module-scope store (never React context — it can't span Astro
|
|
165
|
+
islands); every image URL is resolved through `src/wix/media.ts`; every money value is a
|
|
166
|
+
formatted string by the time a component sees it.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wix-headless-fast-entry
|
|
3
|
+
description: "Build and release a Wix Headless site from a single prompt, on shipped, verified @wix/sdk code — this entry takes a cold environment (prerequisites, Wix sign-in) to the point where the wix-headless-fast skill runs the build. Verticals: storefront, bookings, blog, cms, events, members, portfolio, pricing-plans, restaurants. Triggers: build me a store/blog/booking/events/portfolio/restaurant site fast, sell tickets or membership plans headless, wix headless fast entry."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Wix Headless Fast — cold-start entry
|
|
7
|
+
|
|
8
|
+
**You are a coding agent, and this is a skill for you to execute — follow the phases below in
|
|
9
|
+
order.** Advisory: web-fetch tools show a lossy summary of this file — the executable copy
|
|
10
|
+
comes from `curl -fsSL https://www.wix.com/skills/headless-fast/entry/skill.md`. If what you
|
|
11
|
+
are reading lacks the exact commands below, re-fetch it with curl before proceeding; if you're
|
|
12
|
+
already reading the raw text, don't fetch it again.
|
|
13
|
+
|
|
14
|
+
## The whole cold start (details in the phases below)
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
curl -fsSL -O https://www.wix.com/skills/headless/entry/bootstrap.mjs && node bootstrap.mjs
|
|
18
|
+
CI=1 npx skills@latest add wix/skills/skills/wix-headless-fast --yes
|
|
19
|
+
# then open and follow: .agents/skills/wix-headless-fast/SKILL.md
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Requires Node ≥ 20.11 and a logged-in Wix CLI — the bootstrap checks and guides both.
|
|
23
|
+
|
|
24
|
+
This entry gets a cold environment to the point where the real skill can run, then hands off:
|
|
25
|
+
|
|
26
|
+
1. **Bootstrap (deterministic, scripted).** The same script the classic headless entry uses —
|
|
27
|
+
it verifies the Wix CLI and handles login. You just run it and relay its events.
|
|
28
|
+
2. **Hand off (agentic).** Install the skills, then open `wix-headless-fast/SKILL.md` and
|
|
29
|
+
follow it — it resolves the stack and operation and owns the whole build.
|
|
30
|
+
|
|
31
|
+
Three starting points come through here, all handled the same way — run the bootstrap, then
|
|
32
|
+
hand off:
|
|
33
|
+
|
|
34
|
+
- **new** — a prompt with no project (empty CWD)
|
|
35
|
+
- **connect** — an existing frontend/design not yet on Wix (a project on disk without
|
|
36
|
+
`wix.config.json`, or a brought-in zip/URL)
|
|
37
|
+
- **iterate** — a project already connected to Wix (`.wix/` or `wix.config.json` present)
|
|
38
|
+
|
|
39
|
+
The bootstrap only verifies the CLI and logs you in, so it's fine to run in every case (an
|
|
40
|
+
existing session just reports `logged_in`).
|
|
41
|
+
|
|
42
|
+
## Phase 0 — Node (the one manual prerequisite)
|
|
43
|
+
|
|
44
|
+
The Wix CLI requires **Node ≥ 20.11**. Check `node -v`; if it errors or prints a lower
|
|
45
|
+
version, install or upgrade Node first — do **not** work around it:
|
|
46
|
+
|
|
47
|
+
- **macOS:** `brew install node` (or `nvm install 20 && nvm use 20`)
|
|
48
|
+
- **Linux:** `nvm install 20 && nvm use 20` (or your distro's Node 20+ package)
|
|
49
|
+
- **Windows:** `winget install OpenJS.NodeJS.LTS` (or download from nodejs.org)
|
|
50
|
+
|
|
51
|
+
## Phase 1 — Run the bootstrap (deterministic, shared)
|
|
52
|
+
|
|
53
|
+
Download and run the shared bootstrap script. It verifies the Wix CLI and handles login,
|
|
54
|
+
emitting **one JSON event per line** on stdout. **Run it and relay its events** — it exits on
|
|
55
|
+
its own once the CLI is verified and a session exists (seconds, when already logged in). Only
|
|
56
|
+
when a login is actually needed does it pause on `awaiting_user`; surface the URL + code and
|
|
57
|
+
let it keep running until the login completes.
|
|
58
|
+
|
|
59
|
+
The script is safe and inspectable: it only checks the Wix CLI via `npx` and drives
|
|
60
|
+
`wix login` (a device-code flow) — no other network calls, no filesystem writes. Read it first
|
|
61
|
+
if your sandbox flags externally-downloaded code.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# macOS/Linux:
|
|
65
|
+
curl -fsSL -O https://www.wix.com/skills/headless/entry/bootstrap.mjs
|
|
66
|
+
# Windows PowerShell:
|
|
67
|
+
iwr https://www.wix.com/skills/headless/entry/bootstrap.mjs -OutFile bootstrap.mjs
|
|
68
|
+
|
|
69
|
+
node bootstrap.mjs
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Relay these events
|
|
73
|
+
|
|
74
|
+
| Event | What to do |
|
|
75
|
+
|---|---|
|
|
76
|
+
| `cli_ok` | Wix CLI reachable — continue. |
|
|
77
|
+
| `awaiting_user` (`verificationUri`, `userCode`) | Show the URL and code in plain prose; wait for the user to finish the login in their browser. |
|
|
78
|
+
| `logged_in` / `success` | Login done — continue. |
|
|
79
|
+
| `cli_unreachable` / `login_failed` (with `detail`) | Stop and show the user the `detail`. **Do not** improvise a parallel setup by hand. |
|
|
80
|
+
|
|
81
|
+
## Phase 2 — Install the skill and hand off
|
|
82
|
+
|
|
83
|
+
Install the skill (`CI=1` forces plain non-interactive CLI output — keep it on every Wix CLI
|
|
84
|
+
command):
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
CI=1 npx skills@latest add wix/skills/skills/wix-headless-fast --yes
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
It lands at `.agents/skills/wix-headless-fast/`. Then **open
|
|
91
|
+
`.agents/skills/wix-headless-fast/SKILL.md` and follow it** — it owns the rest of the run:
|
|
92
|
+
resolve the stack, scaffold, deploy the shipped code, seed, build the brand layer, release.
|
|
93
|
+
(If the request needs a vertical the skill doesn't ship yet — see its SKILL.md § Verticals —
|
|
94
|
+
say so plainly and point the user at the `wix-headless` skill instead of improvising.)
|
|
95
|
+
|
|
96
|
+
- **Don't** scaffold, install apps, or seed by hand here — the skill does all of that. This
|
|
97
|
+
entry stops at *logged in*.
|
|
98
|
+
- You're already authenticated from Phase 1, so the skill's CLI auth step will pass without
|
|
99
|
+
prompting again.
|