Getting Started
Scaffold a new project with one command:Data Fetching (UI)
Vertz automatically generates a typed SDK at.vertz/generated/client.ts during development (vertz dev) and builds. Create a client wrapper, then pass SDK method calls to query() for reactive data. Never pass raw entity name strings.
Client setup
Typically insrc/client.ts:
Fetching data in components
List responses
List responses useListResponse<T> — access items via tasks.data?.items, total via tasks.data?.total, pagination via tasks.data?.hasNextPage.
The shape is:
Query result properties
Query results are reactive objects with.data, .loading, .error, .revalidating, .idle properties. Use them directly in JSX — the compiler handles reactivity.
Forms (UI)
Pass SDK mutation methods toform() — never raw strings or URLs:
taskForm.action, taskForm.method, taskForm.onSubmit. Input names: <input name={taskForm.fields.title} />. Per-field errors: taskForm.title.error. Per-field values: taskForm.title.value.
Reactivity (UI)
The Vertz compiler transforms plain TypeScript into fine-grained reactive updates:let count = 0→ signal. Assignments likecount++trigger DOM updates.const doubled = count * 2→ computed. Auto-tracks signal dependencies.- JSX props with reactive expressions → getters. Parent changes propagate without re-running child components.
Styling (UI)
Usecss() for scoped styles with design tokens and variants() for parameterized styles:
Entities (Server)
Define entities withentity() — each generates CRUD endpoints with access control:
Domains (Server)
Group related entities and services into bounded contexts with automatic route prefixing:inject, and validate against name collisions at startup. Tenant scoping works seamlessly inside domains.
Schema (Database)
Define tables withd.table() and models with d.model():
.hidden() excludes from API responses, .readOnly() excludes from create/update inputs, .default(value) makes the field optional on create.
Testing (Server)
UsecreateTestClient() for type-safe server integration tests. Pass your server instance — get back a client with typed entity and service proxies:
Entity proxy
Service proxy
Response handling
Every method returnsTestResponse<T> — a discriminated union on ok: