Wix-managed headless projects are built on a modern web development stack that combines the Astro framework, the Vite toolchain, and Wix hosting infrastructure. This article explains how these pieces fit together and what they mean for your project.
Wix-managed headless projects use Astro as their foundation. Astro is a JavaScript-based web framework designed for building fast, content-focused websites.
There are several reasons Astro is a good fit for headless projects:
For details on Astro's features and syntax, see the Astro documentation.
When you create a Wix-managed headless project with the CLI, it generates an Astro project with Wix integration. Here are the key parts of the project:
src/: Your source code: Astro pages, components, layouts, and extensions.src/extension.ts: Registers all extensions for your project.public/: Static files served at the root of your project, such as images and fonts..wix/: Wix configuration and environment files.astro.config.mjs: Astro configuration file.wix.config.json: Defines your project's app ID and project ID..env.local: Environment variables for local development, including authentication credentials.Your frontend is defined by standard Astro files: pages, components, and layouts. Extensions are organized in custom folders under src/ and registered in the extension.ts configuration file.
For the complete file structure reference, see Project Structure in the CLI documentation.
Under the hood, the Wix CLI uses Vite as its build tool. Vite provides:
The CLI handles the setup, so you don't need to configure Vite yourself.
When you create a Wix-managed headless project, the CLI sets up a private app behind the scenes. This app serves 2 important roles:
extension.ts file in your project is the configuration file for this app's extensions.The private app is tied to your headless project and can't be shared with other projects or published to the Wix App Market. It exists to power your project's backend capabilities and authentication.
You can see the private app's ID in your wix.config.json file under the appId field.
Wix-managed headless projects are hosted on Wix serverless infrastructure. You don't manage any servers, containers, or deployment pipelines.
The hosting environment provides:
For details on building and deploying to this infrastructure, see Development, Build, and Deployment.