Weave is an object abstraction over PostgreSQL. Design entities, query by nesting, and enforce access as code. The database speaks SQL underneath — you only ever speak objects.
const weave = createClient({ url, key, entities });
const orders = await weave.order.findMany(
{
status: "paid", // { eq: "paid" }, shorthand
items: { some: { product: { name: { ilike: "%pro%" } } } },
},
{
orderBy: { customer: { name: "asc" } },
expand: { customer: true, items: { product: true } },
},
);
orders[0].customer.name; // string — typed, you expanded it
orders[0].items[0].product.price; // number — nested, revived, inferredPostgres gives you the durability. Weave gives you the developer experience.
Tables, joins and migrations never surface. Every interface — GUI, code, API — speaks the same object vocabulary.
Compose with owned objects and reference other entities. Read a graph by asking to expand it — no join syntax.
The same WhereInput powers a GUI click, an SDK call, and a stored access rule. Learn it once.
Returns self-type by your expand. No hand-written result types, no codegen drift — the shape follows the query.
Design entities in the dashboard or in code. The server is the source of truth; weave gen mirrors it back as readable .ts.
Scopes shape access per entity — which verbs, which rows, which fields — stored by stable id, enforced on the server.
The relational thread and the object thread, crossing where they meet. That interlace — the teal — is the whole idea: the rigor of Postgres with the shape of the objects you actually work with.
Declare entities with the same builders the server uses — columns, owned objects, references. weave push diffs and applies them behind a risk gate; weave gen mirrors the server back into typed .ts.
export default defineEntity("order", {
ref: text().notNull().unique(),
status: text().notNull().default("open"),
customer: reference(customer),
items: owned(array({
product: reference(product),
qty: int4().notNull(),
})),
});Run the server, install the client.
Engine, dashboard and API in one container. Point it at your Postgres and go.
docker run -p 3000:3000 \
-e DATABASE_URL=postgres://… \
ghcr.io/mauro-andre/weaveInstall the typed client in your app. Objects in, objects out, HTTP invisible.
From a Postgres URL to a typed object client in minutes.