These are the most common mistakes we see in Vertz projects — especially when AI agents or developers are getting started. Each one has a clear fix.Documentation Index
Fetch the complete documentation index at: https://docs.vertz.dev/llms.txt
Use this file to discover all available pages before exploring further.
Skipping vtz create
The fastest and most reliable way to start a Vertz project is vtz create. It scaffolds a working full-stack app with the compiler, dev server, SSR, typed API client, and theme — all configured correctly.
vtz create and modify the scaffolded code.
Using signal() instead of let
The Vertz compiler transforms let declarations into signals automatically and auto-unwraps .value in JSX. Using signal() directly bypasses these optimizations.
let, the compiler tracks dependencies automatically — queries re-fetch, DOM updates, and effects re-run without manual .value reads. With signal(), you must manage everything yourself.
Using () => true instead of rules.public
Entity access rules should use declarative rules.* descriptors, not callback functions.
rules.* descriptors are plain objects that the framework can serialize for the client SDK, display in generated OpenAPI docs, and potentially compile to database-level policies. Callback functions are opaque.
See Entities for the full access control API.
Using raw fetch() instead of the generated SDK
Vertz auto-generates a typed SDK from your entity and service definitions. Always use it.
Manual refetch() instead of reactive queries
When queries read reactive state inside their thunk, they automatically re-fetch when that state changes. Manual refetch() calls are usually unnecessary.
Calling components as functions
Always use JSX syntax for components. Calling them as functions bypasses the compiler’s reactive prop generation.Annotating component return types
Let TypeScript infer return types from JSX. Annotating: HTMLElement is a lossy upcast.
Running SQLite scripts with node instead of vtz
The vtz runtime includes a built-in SQLite driver powered by Rust — no extra dependencies needed. Running scripts that use @vertz/db with SQLite under plain node will fail because Node.js doesn’t have the native driver.
vtz runtime embeds SQLite via Rust, so any script run through vtz (including vtz run <script>, vtz dev, and vtz test) has SQLite available with zero extra dependencies. Running the same script with node bypasses the runtime entirely.
If you need to run database scripts outside of vtz, use PostgreSQL instead of SQLite, or install better-sqlite3 as a fallback.
Using .references() on columns for foreign keys
Foreign keys are declared via d.ref.one() on models, not .references() on columns.