Skip to content

Add astro/before-ai-v2 template (Wix Events) - #705

Open
tuvit wants to merge 2 commits into
wix:mainfrom
tuvit:add-astro-before-ai-v2-template
Open

tuvit wants to merge 2 commits into
wix:mainfrom
tuvit:add-astro-before-ai-v2-template

Conversation

@tuvit

@tuvit tuvit commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Adds astro/before-ai-v2 — a Windows XP desktop that happens to be an events site. One React island lists upcoming Wix Events and takes RSVPs through an XP-style wizard.

What it demonstrates

  • A visitor-scoped read (wixEventsV2.queryEvents) with no client and no API key — the @wix/astro integration authenticates module-level SDK imports
  • A privileged write behind an endpoint: auth.elevate(rsvpV2.createRsvp), server-side only
  • One React island, client:load, server-rendered so the listing is in the HTML for crawlers
  • Two Astro endpoints whose handler bodies are portable Web Request/Response code

AGENTS.md review

Restructured from a raw CLI project. Findings fixed:

  • Adapter@wix/cloud-provider-fetch-adapter behind an isBuild conditional replaced with @wix/astro-wix-hosting-adapter (the pattern AGENTS.md says was removed repo-wide)
  • Wix is the source of truth — removed the bundled seed-events fallback that shadowed queryEvents, and the "live vs demo" UI it fed. A site with no upcoming events now renders an empty state
  • Dropped the constant fake speaker byline (Wix Events has no such field) and the hardcoded 7:42 PM taskbar clock, now a real client-side clock
  • Error handling/api/rsvp no longer leaks SDK detail or references API-key scopes that don't exist under @wix/astro; it logs server-side and returns a generic message
  • No dead UI — removed handler-less folder buttons and minimize/maximize buttons
  • package.json normalized (wix-astro-before-ai-v2, three scripts, no @wix/cli/cloudflare/node, caret-pinned React); removed astro.config.local.mjs and TESTING.md

Testing

Verified from a standalone copy (git archivenpm install): astro build and tsc --noEmit both pass. Largest built file is 248K, well under the registry's ~4MB limit.

Per AGENTS.md, full CLI e2e is not possible for a new template pre-publish — the released @wix/create-new ships a hardcoded template enum. The catalog pairing (that ca844d81… provisions a site with Wix Events and future-dated RSVP events) is therefore untested and can only be verified after the registry publish.

🤖 Generated with Claude Code

tuvit and others added 2 commits August 25, 2026 17:30
A Windows XP desktop metaphor as an events site: one React island lists
upcoming Wix Events and takes RSVPs through an XP-style wizard.

Restructured to the repo layout and reviewed against AGENTS.md:

- Adapter: @wix/cloud-provider-fetch-adapter behind an `isBuild` conditional
  replaced with @wix/astro-wix-hosting-adapter (the banned pattern)
- package.json: renamed to wix-astro-before-ai-v2, scripts reduced to
  astro/dev/build, dropped @wix/cli + @astrojs/cloudflare + @astrojs/node,
  caret-pinned react/react-dom
- Wix is the source of truth: removed the bundled seed-events fallback that
  shadowed queryEvents, along with the "live vs demo" UI it fed. A site with
  no upcoming events now renders an empty state
- Dropped the constant fake "speaker" byline (Wix Events has no such field)
  and the hardcoded 7:42 PM taskbar clock, now a real client-side clock
- Errors: /api/rsvp no longer leaks SDK detail or references API-key scopes
  that do not exist under @wix/astro — it logs server-side and returns a
  generic message
- No dead UI: removed the handler-less folder buttons and the
  minimize/maximize buttons that did nothing
- Removed astro.config.local.mjs and TESTING.md (the local @astrojs/node
  escape hatch went away with the CLI scripts)

Verified from a standalone copy: npm install, astro build, and tsc --noEmit
all pass; largest built file is 248K, well under the registry's ~4MB limit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

👷 Deploy request for wix-appointments-subscriptions-nextjs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5fcf708

@netlify

netlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

👷 Deploy request for wix-classes-subscriptions-nextjs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5fcf708

@netlify

netlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

👷 Deploy request for wix-headless-example pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5fcf708

@netlify

netlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

👷 Deploy request for wix-cms-nextjs-template pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5fcf708

@netlify

netlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

👷 Deploy request for wix-commerce-ticketing-nextjs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5fcf708

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant