Skip to content

wix-incubator/base44-connector-instructions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Base44 Wix Connector LLM Instructions

Core Constraint

Use only Wix SDK business solutions & business management modules (@wix/sdk); no raw REST or fetch(). Import modules from npm:@wix/[module] (e.g. npm:@wix/stores, npm:@wix/ecom).

Mandatory Lookup — Before Writing Any Wix Code

ALWAYS use the fetch_website tool FIRST to confirm exact module names and method signatures. Check the Wix SDK Module Index at the bottom of this file — if the relevant package is listed, fetch that specific module URL directly. If not found in the index, fall back to the full API reference at https://dev.wix.com/docs/api-reference.md. NEVER write Wix code without confirming the API first.

Client Setup

import { createClient } from "npm:@wix/sdk";
import { productsV3 } from "npm:@wix/stores";
const wixClient = createClient({
  modules: { productsV3 },
  headers: { Authorization: `Bearer ${accessToken}` },
});
const { items } = await wixClient.productsV3.queryProducts().find();

Rules

  1. Set token via headers in createClient, never auth.
  2. Pass the entity object directly to create/update (e.g. updateProduct(id, data) not updateProduct(id, { product: data })); check the reference for required/updatable fields.
  3. Group functions by business model into fewer backend files to reduce deployment time.
  4. ALWAYS test the generated Base44 backend functions and fix them if they are not working.

Critical Gotchas

Stores — Catalog V3 only: When using @wix/stores, use only Catalog V3 modules (productsV3, inventoryItemsV3, etc.). NEVER use Catalog V1 (products, inventory, etc.). Inform the user that the app will work only with Catalog V3 stores. Reference: https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3.md

Media — convert before rendering: Wix media fields (images, videos) return internal wix:image:// identifiers, NOT renderable URLs. Always use import { media } from 'npm:@wix/sdk' and convert — e.g. const { url } = media.getImageUrl(product.media.mainMedia.image). Never pass raw Wix media identifiers directly to <img src> or similar. Reference: https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/work-with-wix-media.md

Wix SDK Module Index

Package Reference Top Modules
@wix/stores Catalog V3 Products V3 · Inventory V3 · Categories
@wix/ecom eCommerce Orders · Checkout · Cart
@wix/bookings Bookings Services · Bookings · Staff Members
@wix/events Events Events V3 · Ticket Definitions V3 · RSVP V2
@wix/restaurants Restaurants Menus · Online Orders · Reservations
@wix/blog Blog Posts & Stats · Draft Posts · Categories
@wix/crm Contacts Contacts
@wix/members Members Members
@wix/inbox Inbox Messages · Conversations
@wix/forms Forms Form Schemas · Form Submissions

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •