Skip to content
VibORM
Esc
navigateopen⌘Jpreview
Types update when your schema does

The type-safe ORMwithout the generate step.

Define a schema in TypeScript and query PostgreSQL, MySQL, or SQLite with a fully inferred, Prisma-inspired client. No code generation. No stale types.

$pnpm add viborm
VibORM
Quick Start

From schema to typed query in one file.

Your schema is the type source. Every filter, relation, selection, and result is inferred directly from it.

import { s } from "viborm";

export const user = s.model({
  id: s.string().id().ulid(),
  email: s.string().unique(),
  posts: s.oneToMany(() => post),
});

export const post = s.model({
  id: s.string().id().ulid(),
  title: s.string(),
  published: s.boolean().default(false),
  authorId: s.string(),
  author: s.manyToOne(() => user)
    .fields("authorId")
    .references("id"),
});
const authors = await client.user.findMany({
  where: {
    email: { contains: "@company.com" },
  },
  include: {
    posts: {
      where: { published: true },
      orderBy: { title: "asc" },
    },
  },
});
Typed filters Typed relations Typed results

Everything stays connected

The schema is the single source of truth.

Change a field and TypeScript follows the change into filters, writes, relations, selections, and returned records immediately.

Inference, not generation

Types flow from immutable schema definitions into every client operation and result.

Prisma-inspired client

Use familiar create, find, update, upsert, delete, aggregation, and transaction APIs.

One ORM, three dialects

Keep one schema and one query surface across PostgreSQL, MySQL, and SQLite.

Relations stay typed

Model one-to-one, one-to-many, and many-to-many relations with typed nested reads and writes.

Standard Schema V1

Validate through the Standard Schema interface and interoperate with its growing ecosystem.

Drivers for your runtime

Run on Node.js, Bun, serverless databases, and Cloudflare D1 through focused drivers.

Everything from CRUD to vectors.

A typed relational core, database extensions, and production tooling in one ORM.

Adapter-owned SQL

Write the query once. Choose the database at the edge.

VibORM keeps query intent separate from dialect syntax. You keep the same model and client API while the adapter handles the SQL each database needs.

Explore every driver

PostgreSQL

pg, postgres.js, Neon HTTP, PGlite, and Bun SQL

MySQL

mysql2, PlanetScale, and Bun SQL

SQLite

sqlite3, libSQL, Bun SQLite, and Cloudflare D1

Database isomorphisms

Same feature set. Change the database, not the application.

VibORM gives PostgreSQL, MySQL, and SQLite one portable schema and client API, so switching drivers does not require rewriting application code.

Scalar lists

s.string().array()
PGtext[]
MySQLJSON
SQLiteJSON text

Enums

s.enum([…])
PGNamed ENUM type
MySQLENUM(…)
SQLiteTEXT + CHECK

Booleans

s.boolean()
PGboolean
MySQLTINYINT(1)
SQLiteINTEGER 0/1

Date and time

s.dateTime()
PGtimestamptz
MySQLDATETIME(3)
SQLiteISO TEXT

Exact decimals

s.decimal()
PGnumeric
MySQLDECIMAL(65,30)
SQLiteTEXT

One schema. One query API. Three database engines.

Define your schema. Keep moving.

Start with an in-process PostgreSQL database, then move to your production driver without changing the way you model or query data.