webstorio init scaffolds this layout:
Root files
pages/
One .tsx module per route. Each file must have a default export. Register
every page in webstorio.config.ts with file, slug, and title:
- Use
slug: "/"for the home page (type: "system"). - Nested or dynamic routes use path segments (e.g.
blog/{content_entry_id}). How-to: Routing.
components/
Two kinds of components:
Site chrome (_header, _footer) — listed under components in the
config with slugs "_header" and "_footer". Pushing them enables the matching
header/footer features on the live site.
Shared UI — any other .tsx you import with a relative path (for example
../components/Testimonials). Do not list these in the config; the CLI
inlines them into each page that imports them on push.
pages/about.tsx
brand/
Markdown the AI and dashboard use for voice and visual guidance. Point to the
files from branding in config:
brandInfoFile: "brand/brand-info.md"designSystemFile: "brand/design-system.md"
brandInfo / designSystem as inline strings instead of files.
assets/
Default assetsDir is assets. Paths in branding and page SEO (favicon,
defaultOgImage, per-page ogImage) are relative to this folder.
schemas/ (optional)
Set schemasDir (for example "schemas") when you want CMS content types,
forms, or App Data tables versioned in the repo:
When the directory is present,
webstorio push upserts schemas by key. When
absent, remote schemas are left unchanged. See Feature schemas
for layout, file shape, and webstorio schema commands.
Imports and compilation
- Pages and components are plain React (
.tsx). - Import only from supported libraries; everything else must be a relative import (bundled on push).
- Call
window.webstoriofor live site data. - On push, the CLI composes each page and uploads source; the server compiles authoritatively.
Next steps
- Your first site with the CLI — build one end to end
- How the CLI works — compose-and-push model
- Configuration — full
webstorio.config.tsfields - Local development —
webstorio devand data modes

