SlintORM
Docsnpm
v1.5.1 — now with edge runtime support
SlintORM

Zero-config TypeScript ORM.
Write interfaces, get a database.

Auto-migrations from your TypeScript interfaces. Full query builder. Preloads that don't N+1. Runs anywhere from SQLite to Cloudflare Workers.

$npm install slintorm
Get startedGitHub

5-line quickstart

Define an interface. Initialize the ORM. Call migrate(). Your database is ready.

db.ts
import ORMManager from 'slintorm';

interface User {
  // @auto;primaryKey
  id: number;
  // @unique
  email: string;
  name: string;
}

const orm = new ORMManager({ driver: 'sqlite', databaseUrl: './dev.db' });
await orm.migrate();

const User = orm.defineModel<User>('users', 'User');
const user = await User.insert({ email: 'joe@example.com', name: 'Joe' });
console.log(user.id); // 1

Everything you need

No schema files. No codegen. No config sprawl.

Auto-migrations

Write TypeScript interfaces. Run orm.migrate(). Columns appear, alter-table handled non-destructively.

Full query builder

Fluent chainable API: where, join, orderBy, paginate, groupBy, window functions, EXISTS subqueries.

Preloads, no N+1

preload("relation") batch-fetches related records. Nested preloads, cycle detection, exclude() built in.

Soft delete

@softDelete on deletedAt. Queries auto-filter. withTrashed(), onlyTrashed(), restore() built in.

Edge / serverless ready

Pre-generate schema JSON. Import at runtime, no filesystem reads. Works in Cloudflare Workers, Deno, Next.js Edge.

Zero dependencies

All drivers (pg, mysql2, better-sqlite3, mongodb) are optional peerDependencies. Ship nothing you don't use.

How it compares

SlintORM ships with more out of the box than any comparable library.

FeatureSlintORMDrizzlePrisma
Auto-migrations from interfaces
Zero runtime dependencies
Edge / serverless ready
Soft delete built in
Lifecycle hooks
Relation traversal (relatedTo)
@mask / @omit annotations
No schema file required
SQLite WAL mode
MongoDB support
Validation API built in