Conversation
A designed Wix Stores storefront: catalog with real category filtering, product pages with variant selection, cart, and checkout, plus a contact form rendered from Wix Forms. Every route is server-rendered and the page ships no framework runtime — the animations and cart interactions are plain modules, so there are no islands to hydrate. Paired with site template 1fe095c6-5015-431d-a216-069181c126ce.
👷 Deploy request for wix-classes-subscriptions-nextjs pending review.Visit the deploys page to approve it
|
👷 Deploy request for wix-cms-nextjs-template pending review.Visit the deploys page to approve it
|
👷 Deploy request for wix-commerce-ticketing-nextjs pending review.Visit the deploys page to approve it
|
👷 Deploy request for wix-appointments-subscriptions-nextjs pending review.Visit the deploys page to approve it
|
👷 Deploy request for wix-headless-example pending review.Visit the deploys page to approve it
|
`forms.getForm()` pulls a namespace re-export of one very large generated module into the server bundle — ~4 MB for a single call. The built worker was 6.75 MB with a 5.47 MB chunk, over the hosting size limit. The form-schema REST endpoint returns the same definitions for ~0 KB: worker total 6.75 MB -> 1.29 MB, largest chunk 5.47 MB -> 0.28 MB. The fields still come from Wix (labels, required flags, dropdown options), so nothing is hardcoded; only the transport changed. `@wix/forms` is still used for `submissions`, which is small. Note the REST shape differs from the SDK's: fields live under `fields` rather than `formFields`, and carry `view` / `validation` instead of `inputOptions` / `stringOptions`.
Reading the form schema over REST removed ~4MB from the server bundle, but the `@wix/essentials` it introduced depends on react-i18next@16, which imports react. Nothing here declares react — there are no islands — so Rollup fails to resolve it and `npm install && npm run build` from a clean copy dies with "Rollup failed to resolve import react from react-i18next/dist/es/Trans.js". Declaring react/react-dom at the range @wix/astro already asks for fixes the build; the peer only has to resolve, no component renders through it. The SSR bundle is also minified now. Astro leaves the server build unminified and `vite.build.minify` only reaches the client build, so the server output shipped with full indentation and comments. That matters beyond page weight: the deploy transport picks its path by server-bundle size, and past ~2.25MiB of server code it switches to one that cannot authorize, which leaves site creation hung mid-deploy. esbuild over the server chunks, with keepNames so stack traces survive. Server bundle, base64 as the transport measures it: 9.00MiB before the REST change, 0.92MiB after these two — 2.1MB of headroom. Verified by creating a site from the rebuilt template: the job reached COMPLETED in 21s rather than failing on a 403, and the site serves / , /store with all 12 seeded products, /cart and a product page, with the REST-backed contact form rendering its real fields. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
astro/benny-pets— a designed Wix Stores storefront. It sits alongsidecommerceas thedesign-forward counterpart: a full visual treatment (loading wordmark, parallax gallery, scroll
reveals, testimonials) over a catalog that is entirely Wix-driven.
Every route is server-rendered, and the page ships no framework runtime — the animations, the
variant picker and the cart interactions are plain modules, so there is not one
<astro-island>onany page. First-party JS is ~8 kB.
Wix apps: Wix Stores (catalog, categories, prices, images, options/variants), Wix eCommerce
(cart, checkout), Wix Forms (the footer contact form).
Routes:
/,/store,/store/[slug],/cart,404, plusPOST /api/cart/{add,update,remove},POST /api/checkout,POST /api/contact.Catalog pairing
siteTemplateId:1fe095c6-5015-431d-a216-069181c126ceBeds, Accessories, Health), every product with an image in Wix Media, two products with real
option sets (S/M/L and S/M/L/XL) priced per variant, and a four-field contact form.
CONTACT_FORM_IDinsrc/lib/constants.ts, which is the formthat site provisions.
Demo: https://benny-site-tuvitk-0a06.wix-site-host.com
Review against AGENTS.md
Checked every file against the standard; what it changed:
Products" list, six gallery cards with hardcoded names and prices, and a category filter that
filtered on
productType(PHYSICAL) and therefore matched nothing. Products, categories, prices,images and form fields now all come from Wix, with empty states when the catalog is empty.
categories.queryCategories()and filters byreal category id, so a category the owner adds appears with no code change. (Note the query needs
at least one filter — a bare
find()is rejected as an empty condition.) The install's"All Products" root is dropped in favour of the filter's own All.
formattedAmount, requested via theCURRENCYfield. No$prefixes, noparseFloatmoney math. Cart totals come fromestimateCurrentCartTotals().getProductBySlugwithVARIANT_OPTION_CHOICE_NAMES; the product page keeps Addto Cart disabled until every option is chosen and updates the price to the chosen variant.
POST /api/cart/addrefuses (409) to add a multi-variant product without one, and resolves thesole variant server-side for single-variant products. Nothing ever adds
variants[0]blindly.forms.getForm(); values are typed perfield definition and submitted under each field's
target.@wix/astro+@wix/astro-wix-hosting-adapter; nocloud-provider-fetch-adapter, noisBuild-conditional adapter. No React integration (there are no.jsx/.tsxfiles). Caretranges throughout. Unknown slugs 404. Caught errors are logged; users see generic messages.
wix.config.json,.env.local,.wix/or lockfile.Testing
npm install && npm run buildfrom a clean copy: passes.categories and formatted prices render server-side; the category filter narrows both the grid and
the list (All 8+4 → Food 2+2 → Beds 0+1 → All 8+4); choosing "L" moves the price $55 → $75 and
enables the buttons; quick-add works for single-variant products; the API returns 409 for a
multi-variant add with no choice; the cart shows
Size: Mat the M price with a subtotal from theestimate call; checkout returns a working redirect-session URL; an unknown slug 404s.
getProduct()returns the product directly whilegetProductBySlug()wraps it in{ product }— the sole-variant helper destructured the wrongshape, so quick-add 409'd on every product.
Bundle size — why the form schema comes over REST
forms.getForm()builds a 5.47 MB chunk (6.75 MB worker total), over the ~4 MB hosting limit:@wix/forms' schema module is a namespace re-export of one very large generated module, so a singlecall pulls all of it in. This template reads the same definitions from the form-schema REST endpoint
instead — worker total 6.75 MB -> 1.29 MB, largest chunk 5.47 MB -> 0.28 MB.
This is a deliberate deviation from the letter of AGENTS.md ("render fields from
forms.getForm()")that keeps its intent: labels, required flags and dropdown options still come from Wix, nothing is
hardcoded, and a field added in the dashboard still appears. Only the transport changed.
@wix/formsis still used for
submissions, which is small. Verified on the live demo — the same four fieldsrender, with
requiredon email.Worth noting
astro/registrationbuilds the identical 5.46 MB chunk from the same call and wouldbenefit from the same change; happy to open a follow-up if you want it.
Per the
add-templateskill, thesiteTemplateIdpairing is untested until the registry publish:the code ran against the site the template was minted from, but whether a site created from the
minted template provisions the same form GUID is only verifiable after that publish.