vertz/server is the backend layer of the Vertz stack. You define entities with schemas, access rules, and hooks — the framework generates typed CRUD routes, validates inputs, enforces access control, and produces a typed client SDK. No boilerplate controllers, no manual route wiring.
How it works
Define your entity
Declare the data model, who can do what, and any side effects (hooks). One object, one place.
Framework generates routes
CRUD endpoints are auto-generated with validation, access enforcement, and error handling built
in.
What’s included
| Feature | Description |
|---|---|
| Entities | Declarative data models with CRUD, access rules, hooks, and custom actions |
| Domains | Group entities and services into bounded contexts with automatic route prefixing |
| Field & relation exposure | Control which fields, filters, and relations are exposed in query responses |
| Services | Standalone operations not tied to a single entity |
| Access control | Deny-by-default, per-operation access rules with row-level checks |
| Environment | Validated, typed, frozen config via createEnv() |
| Authentication | Email/password, JWT sessions, refresh rotation, OAuth providers |
| Middleware | Request pipeline with typed context propagation |
| SDK generation | Auto-generated typed client from entity definitions |
Quick example
Core principles
Entity-driven
Entities are the central abstraction. A single entity definition covers the data model, validation, access control, lifecycle hooks, and custom actions. Everything flows from the entity.Deny-by-default
No access rule = no route generated. You explicitly declare who can perform each operation. There’s no “open by default” — you opt in to access, not out.Type-safe end-to-end
Types flow from your schema definition through the server, into the generated SDK, and down to the UI layer. If it compiles, the types are correct across the entire stack.Guides
Entities
Models, access rules, hooks, and custom actions.
Domains
Group entities and services into bounded contexts with route prefixing.
Fields, Relations & Filters
Control which fields, filters, and relations clients can query.
Authentication
Email/password, JWT sessions, refresh tokens, and session management.
OAuth Providers
Add Google, GitHub, or Discord sign-in.
Services
Standalone operations and cross-entity workflows.
Environment
Validate and type-check env variables with
createEnv().