Skip to content

Zorix DBSimple & Fast IndexedDB Library

Super fast, lightweight, and type-safe database for your web apps. Working with IndexedDB has never been this easy.

Zorix Logo
pnpm add @zorix/zorixdb
quickstart.ts
typescript
import { DB, schema, string, number } from '@zorix/zorixdb';

// 1. Connect to database
const db = new DB('my-app', { version: 1 });

// 2. Listen for database changes easily
db.on('change', (event) => console.log('Data changed:', event));

// 3. Define schema with type safety
const Users = await db.model(
  'users',
  schema({
    id: number().primary(),
    name: string().index(),
    age: number(),
  })
);

// 4. Fast bulk insert in one single transaction
await Users.insertMany([
  { id: 1, name: 'Alice', age: 25 },
  { id: 2, name: 'Bob', age: 30 },
]);

// 5. Query data using simple, clean syntax
const adults = await Users.find({ where: { age: { gte: 18 } } });
console.log(adults);
10x–50x Fast Bulk Writes
Inserts thousands of records in one quick transaction. Super fast data saving.
Native Query Speed
Fetches data straight from the browser engine without slow cursor loops.
TypeScript-First
Full auto-completion and type checking. Catch errors early while writing code.
Simple Events
Listen to data inserts, updates, and deletes easily to keep your UI in sync.
Always Fresh Data
Reads fresh data straight from IndexedDB every time. No hidden cache confusion.
Zero Dependencies
Tiny library size with zero extra packages. Keeps your app build light and clean.

Released under the MIT License.