A minimal e-commerce storefront built with Jay Framework and Wix Stores. Features product listing, product detail pages with variants, and a shopping cart.
Live demo: jay-store-736aca87-yoav68.wix-site-host.com
- Node.js >= 20
- A Wix account (a new site is created automatically in step 1)
Run these commands in order:
npm install
npm create @wix/new@latest init
npm run setupHere's what each command does:
-
npm install— Installs project dependencies. -
npm create @wix/new@latest init— Creates a new headless Wix site and generateswix.config.jsonwith:siteId— the Wix site identifier (also known as metasite ID in Wix)appId— a client ID for headless API access
This command is only required for Wix-hosted sites.
-
npm run setup— Createsconfig/.wix.yamland validates plugin configuration. On the first run, this will report errors — that is expected. It creates a config template that you fill in during the steps below.
Complete these steps, then run npm run setup again at the end to validate everything.
Note:
appId(inwix.config.json) andclientId(inconfig/.wix.yaml) are the same value. Both can also be generated manually from Wix Dashboard → Site Settings → Headless Settings → Headless Client.
npm create @wix/new@latest init creates a new site on your Wix account. Open manage.wix.com/studio/sites to find it. All steps below apply to this site.
-
Create a new API key.
-
Paste it into
config/.wix.yamlunderapiKeyStrategy.apiKey.Note: Wix may not let you scope an API key to a single headless site. If site-specific permissions are unavailable, grant access to all sites on your account.
In your site's Business Manager → Apps → Manage Apps → App Market, find Wix Stores and add it.
In the same site's CMS, create a new collection for Wix BaaS deployment. No specific schema is required — only the name matters.
-
Choose Content collection (not Catalog collection):
-
Choose Start from scratch:
-
Set the collection name to
jay-backend-files(the collection ID will auto-fill to match). Keep Multiple item collection (the default), then click Create:
npm run setupWhen everything is configured, the output should look like:
📦 wix-server-client
✅ Services verified
Wix client connected (site: 04cf42a4...)
📦 wix-deploy
✅ Services verified
Deploy target: wix.config.json (appId: 574c2287...). Collection: jay-backend-files ✓
📦 wix-stores
✅ Services verified
Wix Stores configured (product URL: /products/{slug})
Setup complete: 3 configured
| File | Purpose |
|---|---|
wix.config.json |
Used for Wix BaaS deployment — only needed on the server where the application is deployed. Required only for Wix-hosted sites. |
config/.wix.yaml |
Used to connect to Wix backend services (Wix Data, Wix Stores, etc.) at build time and runtime. |
Having two separate files allows deploying multiple versions of the business as different BaaS instances. By default, both point to the same site.
npm run agent-kitGenerates an agent-kit/ directory with documentation and reference material for the AI agent. The kit is organized by role:
agent-kit/
├── plugins-index.yaml # Index of all installed plugins, their contracts, actions, services, and contexts
├── designer/ # Jay-HTML syntax, styling, components, and routing for visual design
├── developer/ # Page contracts, component data/state/refs, CLI commands, and configuration
├── devops/ # Production builds, serving modes, fetch handler, and cache invalidation
├── plugin/ # Plugin structure, actions, commands, services, webhooks, and validation
├── materialized-contracts/
│ └── wix-stores/
│ └── product-page.jay-contract # Fully resolved product page contract with all fields
└── references/
└── wix-stores/
└── categories.yaml # Store categories reference data
Each role directory includes an INSTRUCTIONS.md entry point for the AI agent.
npm run devThe dev server starts at http://localhost:3000 with hot reload. If port 3000 is taken, it will pick another port and print the URL in the output.
The project includes the Jay AI designer for editing pages visually with AI assistance.
npm run devThen open http://localhost:3000/aiditor in your browser.
- Navigate between pages using the site itself within the preview, or using the top routes selector dropdown.
- Annotate visually using the point, area, or arrow tools to give visual instructions to the agent. You can also paste images into the annotation instructions.
- Use the bottom Agent Output panel to see progress and give textual instructions via Claude Code.
This project includes the wix-deploy package for deploying to Wix BaaS. If you don't need Wix deployment, remove wix-deploy from your dependencies.
npm run build:production
npm run deployThis bundles a ~2.5 MB entry.mjs, uploads page data to the jay-backend-files collection, and deploys the server + frontend to Wix BaaS + CDN.
When deployment succeeds, the live site URL is printed at the end of the output:
[deploy] Done in 45.2s (bundle 12.1s + deploy 33.1s)
[deploy] Version: 2 | Entry: 2.5 MB | Backend files: 42
[deploy] URL: https://your-site-name.wix-site-host.com
Look for the line starting with [deploy] URL:. You can also find the site in manage.wix.com/studio/sites.
No manual file copying is needed. The server reads directly from the build output on disk:
npm run build:production
npm run serveThe site is available at http://localhost:3000 (or the next available port, printed in the terminal).
To run on a remote server, copy the project to that machine (including the build/ directory produced by build:production), install dependencies with npm install, and run npm run serve.
If you already have a Node.js server, use the fetch handler and point it at the build output directories. After npm run build:production, check the build/ folder for the version directory (for example build/v1/):
import { createJayFetchHandler } from '@jay-framework/jay-fetch-handler';
const handler = createJayFetchHandler({
backendDir: './build/v1/backend',
staticBaseUrl: '/',
frontendDir: './build/v1/frontend',
});
// Use with any HTTP server frameworkNothing needs to be copied into your server code — only reference the paths to backend/ and frontend/ inside the build output.
src/
├── pages/
│ ├── page.jay-html # Homepage
│ ├── products/
│ │ ├── page.jay-html # Product listing
│ │ ├── [slug]/page.jay-html # Product detail (dynamic)
│ │ └── ceramic-flower-vase/ # Product detail (static override)
│ │ └── page.jay-html
│ └── cart/
│ └── page.jay-html # Shopping cart
└── styles/
└── atelier-theme.css # Theme styles
Pages use .jay-html templates with headless component bindings — no JavaScript needed for data fetching, server-side rendering, or client hydration. The framework handles all of that through contracts and plugins.







