Define your product nouns once. Get the backend around them.
Entities are the things your product is built around — customers, orders, invoices, teams, subscriptions — alongside policies, workflows, custom logic, agents, and surfaces. Describe what they mean: fields, relations, who can access them, how they version, where they live across providers. Vadyl creates the database tables, typed APIs, SDKs, access checks, audit trail, migration plans, and operational hooks. Stop keeping six definitions in sync.
export const Order = defineEntity(({ name: "Order", fields: ({ id: id(), customerId: fk(Customer), total: money({ currency: "USD" }), status: enum(["pending", "paid", "shipped"]), }), relations: ({ items: hasMany(OrderItem), }), access: policy((s) => ({ read: s.own() || s.hasRole("admin"), })), }));
From one product definition,
an entire backend.
Every consumer of your entity is a projection: REST routes, GraphQL types, gRPC contracts, language SDKs, schema migrations, access enforcement, observability, agent capability grants.
Persistence across seven storage models
Relational, document, key-value, graph, wide-column, time-series, vector — all derived from one product entity. DDL plans compiled per provider, capability-aware.
API surfaces
REST, GraphQL, gRPC, OpenAPI, MCP — all from the same canonical descriptor graph.
Typed SDKs in five languages
TypeScript, Python, C#, Go, Rust today. Each SDK embeds a manifest with seven version dimensions; generated-format mismatch fails fast at runtime.
Access enforcement
Row filters, field masks, attribute checks compile to native RLS where supported; runtime predicate enforcement everywhere else. Same outcome.
Field security
Six orthogonal dimensions per protected field. AEAD envelope with AAD-bound context. Blind indexes for searchable encryption. Online re-key.
Triggers & validations
Three-phase Gate / Pre / Post triggers. Server-side invariants. Cross-field constraints as typed AST. Trigger audit.
Cross-provider queries and joins
Operation DAG planner. Fan-out reads where joins can't land natively. In-memory hash join with typed correlation keys. Parallel tier execution.
Cross-provider transactions and rollback
Capability-driven 2PC where supported, saga compensation everywhere else. Three guarantee tiers. Priority-LIFO rollback (DELETE → UPDATE → INSERT).
Deeply nested operations
Cascading writes, relation-aware traversal, expansion budgets, cycle detection. Composite keys handled identically through the entity model.
Branchable lifecycle
Schema, validations, indexes, access policies, providers — all part of one DAG. Sandbox, propose, three-way merge, deploy.
Versioning and rollback
Atomic project publications carry contract version + source commit. Locked workflow versions. Rollback is first-class — same DAG, opposite direction.
Auditability + explainability
Every mutation surfaces in the canonical event substrate. Every decision carries a typed reason code projected from canonical authorities — never log-scraped.
Composing 160+ flags
All canonical, all peer
Branchable platform state
Across 7 families
Define your first product entity in 5 minutes.
The Vadyl quickstart walks you through a complete entity contract — fields, relations, access, indexes — and the backend surfaces Vadyl compiles from it.