Figment.so
BlogHow to usePricing

Wix Velo: What Code Can You Add to a Wix Site?

Velo lets you add real JavaScript to a Wix site, split into frontend code that runs in the visitor's browser and backend code that runs on Wix's own servers — and it only works on the Wix Editor and Wix Studio, not on Wix Harmony. Frontend code reacts to clicks and updates the page; backend code (through "web modules") handles anything that needs to stay private, like calling a paid API with a secret key or querying your site's database directly. Here's how the pieces fit together, sourced from Wix's own developer documentation.

What is Velo, exactly?

Velo is Wix's JavaScript-based development layer built into the Wix Editor and Wix Studio, giving you "a zero-setup, serverless backend environment" running on what Wix calls its "Node.js server-side runtime", alongside frontend code you write against page elements (Wix Developers, "About the Site Backend", checked September 2026). It isn't a separate product you buy — it's a code layer available inside editors that already support it, alongside the visual page-building tools those editors already have.

Where does frontend (page) code run, and what can it do?

Frontend code runs in the visitor's own browser. Wix's developer documentation is direct about the split: "Frontend code runs in the site visitor's browser and here you define the interactive parts of your site," including "Responding to user input," "Updating the UI," and "Making calls to backend services" (Wix Developers, "Where Do I Put My Code?", checked September 2026). Because this code is publicly visible, Wix's own guidance is explicit: "avoid including sensitive information, such as API keys or private logic."

Frontend code comes in a few flavors:

  • Page code — logic specific to one page, in that page's own code file.
  • Global code (masterPage.js) — runs on every page, for shared logic like a site-wide header, footer, or search bar.
  • Public files — shared functions you write once and import into multiple page files, backend files, or other public files, to avoid repeating the same code everywhere.

One easy mistake Wix's docs flag directly: importing functions from masterPage.js into individual pages causes its onReady handler to run twice on those pages — shared logic that isn't page-specific belongs in a public file instead, not in masterPage.js itself.

Where does backend code run, and what can it do?

Backend code runs on Wix's servers, never in the visitor's browser. Per Wix's documentation: "Backend code runs on Wix's secure servers and isn't exposed to site visitors. This is the place for logic that needs to be protected, like: Interacting with sensitive data, Sending emails, Handling payments, Verifying permissions." There are two backend file types with different reach:

  • .web.js files (web modules) — can be called directly from frontend code. Wix's docs: "Web modules that can be called from the frontend. You can configure permissions for each function to control who can access them." (Older .jsw files do the same job and "have been deprecated in favor of .web.js files but are still supported.")
  • Internal .js files — cannot be reached from the frontend at all. If you try, Wix's own error message says exactly why: "Access to backend script 'backend/calculations.js' denied! Client-side scripts can only import web-modules from backend code context." To expose an internal file's function to the frontend, you import it into a .web.js file first, then import that web module into your page code.

Backend code also has two more specialized hooks: http-functions.js exposes custom GET/PUT/POST/DELETE endpoints so outside services can call your site directly, and data.js defines data hooks that run before or after changes to a collection (validating or modifying data on insert, update, or remove).

What can Velo code actually reach?

The backend environment gives you access to:

  • Wix's own database through the wix-data API, or an external database you connect and manage yourself, per Wix's site-backend overview.
  • Wix APIs generally — the same platform surface Wix's own apps use, for workflows like Bookings, Members, Payments, and more, scoped by whatever permissions your account and app connection have.
  • Backend events — built-in triggers like onFileUploaded (Media Manager) or onInvoicePaid, which let you run custom logic when something happens elsewhere on the site.
  • The Secrets Manager, for API keys, OAuth tokens, and other sensitive values — Wix's guidance is specific that these belong here "instead of hardcoding values into your code," retrieved safely in backend code through the Secrets API rather than exposed to visitors or committed to version control.

On the data side specifically, Velo's wix-data API lets you query, insert, update, and delete items in your site's collections — Wix's glossary defines a database collection as "a table of data that you can use in a Wix site," where each row is an item and each column is a field (Wix Developers, "Velo Glossary", checked September 2026). Wix's CMS can also keep separate sandbox and live collections, so test data and the data your visitors see don't have to be the same.

Which editors actually support Velo?

Wix Editor and Wix Studio, not Wix Harmony. Wix's own "About Wix Harmony" page states this without qualification: "Wix Harmony doesn't support site code. If your projects require code customization, continue using Wix Editor or Wix Studio" (Wix Developers, "About Wix Harmony", checked September 2026). The same page lists the features not available in Harmony, including custom site code, HTTP functions, data hooks, backend event handlers, web modules and scheduled jobs. Harmony does allow "custom code to add HTML, JavaScript, and CSS snippets" — a narrower feature than Velo, not a substitute for it.

Wix Studio's positioning is explicit as the code-capable option going forward: "Wix Studio supports: Full coding capabilities with the Wix JavaScript SDK and Velo APIs... Professional tooling including IDE integration and Git workflows." Existing Wix Editor sites with Velo code already in them keep working normally and are "not being migrated to Harmony" — this is a constraint on where you can build new Velo functionality, not a threat to sites that already have it. If you're not sure which editor your own site uses, our Wix Harmony vs Wix Editor vs Wix Studio guide covers how to check and what switching between them actually requires.

What are the practical limits on Velo's data access?

A few concrete caps worth knowing before you design around Wix Data:

  • Query results: a wix-data query's limit() defaults to 50 and tops out at 1,000 items per request — lower for some built-in Wix app collections; Wix's example is the Stores/Product collection, capped at 100.
  • Total collection items: Wix caps the total number of items a site's collections can hold overall — once you hit it, you can't add data to any collection until you free up room. This sitewide cap doesn't apply to items in Wix's own app collections, external database collections, or sandbox collections specifically.

(Source: Velo API Reference, "Limit", and Wix Developers, "About Data Feature Limitations", checked September 2026.)

Can AI write or edit my Velo code for me?

That's a separate question from what Velo itself does, and it depends on which outside AI tool you mean and which editor you're on. Our guide to AI editing a Wix site covers Wix's own Aria assistant, Wix's official developer MCP server for connecting an outside coding agent to Wix's APIs, and the safe way to grant a browser-based agent limited access — all worth checking against whether your site is actually on an editor that supports Velo in the first place, since none of that changes Harmony's lack of code support.

A quick reference: where does my code go?

Code typeWhere it runsWhat it can doEditor support
Page codeVisitor's browserHandle events, update the UI, call web modulesWix Editor, Wix Studio
Global code (masterPage.js)Visitor's browser, every pageSite-wide UI logic (header, footer, shared state)Wix Editor, Wix Studio
Public filesVisitor's browser (imported where needed)Shared frontend functions, avoid duplicationWix Editor, Wix Studio
.web.js web modulesWix's serversCallable from the frontend; can touch sensitive data/logic with permission controlsWix Editor, Wix Studio
Internal .js backend filesWix's serversSecure logic not reachable from the frontend directlyWix Editor, Wix Studio
http-functions.jsWix's serversExpose custom REST endpoints to outside servicesWix Editor, Wix Studio
Any of the aboveNot available on Wix Harmony

Bottom line: Velo splits cleanly into code that runs where the visitor can see it and code that runs where they can't, and that split is what protects your data and keys. It reaches Wix's own database, external databases, Wix's platform APIs, and outside services through HTTP functions — but only on the Wix Editor and Wix Studio. If your site is on Wix Harmony, Wix's own documentation is direct that code customization isn't available there at all; Wix Studio is where it points you instead.


Get the latest content from Figment. Subscribe today for Figma design guides and website building tips.


Figment.so

Contact

Twitter

Pricing

Privacy

Terms