Type Safe
Full TypeScript support with strict mode enabled. Schema validation with Zod, Valibot, or TypeBox. Comprehensive error types.
Zero Dependencies
Core packages have zero runtime dependencies. Only peer dependencies on Kysely. Minimal security surface and full control.
Production Ready
Built-in health checks, graceful shutdown, retry logic with exponential backoff, and circuit breaker pattern.
Plugin System
Extend functionality with plugins: soft delete, audit logging, automatic timestamps, row-level security, and query debugging.
Multi-Database
Support for PostgreSQL, MySQL, SQLite, and MSSQL. Database-specific optimizations and unified error handling.
Minimal & Modular
Use only what you need. Tree-shakeable ESM architecture with cross-runtime support for Node.js, Bun, and Deno.
Quick Start
Install
npm install kysely @kysera/repository @kysera/soft-delete
Use
import { Kysely, PostgresDialect } from 'kysely'
import { createORM } from '@kysera/repository'
import { softDeletePlugin } from '@kysera/soft-delete'
const db = new Kysely({ dialect: new PostgresDialect({ pool }) })
// Create plugin container with soft delete - not a traditional ORM
const orm = await createORM(db, [softDeletePlugin()])
const userRepo = orm.createRepository({
tableName: 'users',
primaryKey: 'id',
mapRow: (row) => row,
})
// CRUD with automatic soft delete filtering
const user = await userRepo.create({ email: 'john@example.com', name: 'John' })
const users = await userRepo.findAll() // excludes soft-deleted records