Skip to main content
In this tutorial you’ll scaffold a Webstorio project on your machine, edit a page as a React component, preview it with live reload, and deploy it live with one command. By the end you’ll have a real site at your own webstor.io address. You only need Node.js with a package manager (npm, pnpm, yarn, or bun) and a free Webstorio account. Prefer the dashboard AI builder instead? See Create your first site.

Step 1 — Scaffold a project

Create a new project with the CLI, then install its dependencies:
init scaffolds a ready-to-run project: a webstorio.config.ts, a brand/ folder, a pages/ folder with a home.tsx, components/_header.tsx and _footer.tsx, plus a package.json, tsconfig.json, and .gitignore. The directory name seeds your project’s default name and subdomain.

Step 2 — Explore the structure

A Webstorio site is a small set of files:
Each page is plain React with a default export. webstorio.config.ts maps each file to a route:
webstorio.config.ts
init also writes a compatibilityDate that pins your supported library versions. See the full schema in Configuration. The empty schemas/ folders are ready when you turn on CMS, forms, or App Data — see Feature schemas. For this tutorial you can ignore them.

Step 3 — Preview locally

Start the dev server:
Open the URL in your browser. The dev server watches pages/**, components/**, and webstorio.config.ts, recompiling and reloading whenever you save. It runs fully offline using mock data (data modes).

Step 4 — Edit a page

Open pages/home.tsx and make it your own. It’s just React — style with Tailwind classes (including brand utilities like bg-brand-primary and font-brand-primary from your branding config) and import icons from the allowlist:
pages/home.tsx
Save the file and watch the preview update instantly.
You can only import from the supported libraries; anything else must be a relative import, which the CLI bundles into the page. After adding a new supported library, run npx webstorio update to install matching versions.

Step 5 — Add another page

Create pages/about.tsx with a default export:
pages/about.tsx
Then register it in webstorio.config.ts so it gets a route:
The new page is live in your preview at /about.
Need real CMS, store, or form data on a page? Call the window.webstorio SDK and set dev.dataMode to preview to proxy your real project data.

Step 6 — Log in

Authenticate the CLI through your browser:
This opens Webstorio, you approve, and a token is stored securely on your machine.

Step 7 — Deploy

Optional: preview what will sync with a read-only diff:
Then sync and publish in one command:
The CLI composes each page, resolves your project by its subdomain (creating it if it doesn’t exist), and uploads the source. The Webstorio server compiles it authoritatively and publishes the site. You’ll see a per-page report:
Your site is now live at:
Run npx webstorio push without --publish to sync changes as drafts. Push is idempotent — re-running updates existing pages in place and writes a new version each time. More on status and push: Deploying.

Next steps

You’ve built and deployed a Webstorio site from code. Keep going:

Project structure

Config, pages, components, brand, assets, and schemas.

Local development

Data modes, live reload, and preview fidelity.

Deploying

Login, status, push, and publish.

Feature schemas

Version CMS, forms, and App Data as JSON in the repo.

Use AI agents

Edit local .tsx with Cursor, Claude Code, Codex, etc.

Connect MCP

Manage CMS, forms, and store from an agent.

Commands

Every command and option.

Client SDK

Read and write site data with window.webstorio.