Registry / database / taladb

taladb

JSON →
library0.7.10jsnpmunverified

TalaDB is a local-first document and vector database for React, React Native, and Node.js, powered by a Rust/WASM core with zero GC pauses. Current stable version is 0.7.10, released with regular weekly patches. It provides a MongoDB-style document API that runs entirely on-device: in the browser via WASM + OPFS, in React Native via JSI, and in Node.js via a native module. Key differentiators include built-in vector search, offline-first architecture, no cloud dependency, and automatic platform detection with platform-specific backend packages (@taladb/web, @taladb/node, @taladb/react-native). Ships TypeScript types and requires Node >=18.

npm install taladb
INSTALL
IMPORT
SIG · TALADB
T
taladb
databasejavascriptv0.7.10
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

openDB
import { openDB } from 'taladb'
import openDB from 'taladb'
Named export, not default. Since v0.1.0.
runMigrations
import { runMigrations } from 'taladb'
const runMigrations = require('taladb').runMigrations
ESM-only package — do not use require().
type Collection
import type { Collection } from 'taladb'
import { Collection } from 'taladb'
Collection is a TypeScript type, not a runtime value. Use type import when not using instances.
TalaDB
import type { TalaDB } from 'taladb'
TalaDB is the type of the database object returned by openDB().

Opens a database, runs a schema migration, creates an index, inserts/finds/updates documents, then closes.

import { openDB, runMigrations } from 'taladb'; async function main() { const db = await openDB('quickstart.db'); // Run migrations await runMigrations(db, [ { fromVersion: 0, toVersion: 1, description: 'add default role', async up(col) { await col('users').updateMany({}, { $set: { role: 'viewer' } }); }, }, ]); const users = db.collection('users'); // Create index await users.createIndex('email'); // Insert const id = await users.insert({ name: 'Alice', email: 'alice@example.com', age: 30 }); console.log('Inserted with id:', id); // Find one const alice = await users.findOne({ email: 'alice@example.com' }); console.log('Found:', alice); // Update await users.updateOne({ email: 'alice@example.com' }, { $inc: { age: 1 } }); // Find all adults const adults = await users.find({ age: { $gte: 18 } }); console.log('Adults:', adults); await db.close(); } main().catch(console.error);
Debug
Known issues
gotchaMust install the appropriate platform-specific backend package (@taladb/web, @taladb/node, or @taladb/react-native) in addition to taladb.
fix
Install both: pnpm add taladb @taladb/web (for browser), or pnpm add taladb @taladb/node (for Node).
affects: all
breakingNode.js >=18 is required. Earlier versions will fail to load the native module.
fix
Upgrade Node.js to version 18 or later.
affects: >=0.1.0
gotchaThe package is ESM-only; CommonJS require() will throw an error.
fix
Use import syntax or dynamic import() in Node.js with type: 'module' in package.json.
affects: >=0.1.0
deprecatedThe old API using 'new Database()' constructor was removed in v0.6.0. Use openDB() instead.
fix
Replace 'new Database()' with 'await openDB()'.
affects: <0.6.0
Errors
Common errors & fixes
Cannot find module '@taladb/web' (or '@taladb/node', '@taladb/react-native')
Platform-specific backend package not installed alongside taladb.
fix
Install the appropriate package: npm install @taladb/web (for browser), @taladb/node (for Node.js), or @taladb/react-native (for React Native).
require() of ES Module taladb from not supported
Using CommonJS require() to import an ESM-only package.
fix
Convert to ES modules: use import statements and set 'type': 'module' in your package.json, or use dynamic import() inside a CommonJS file.
Error: This constructor is no longer supported. Use openDB() instead.
Using the deprecated new Database() constructor removed in v0.6.0.
fix
Replace with: const db = await openDB('name');
Upgrade
Version history
0.7.10latest on npm
Audit
Dependencies
@taladb/weboptionalRequired for browser/WASM platform backend
@taladb/nodeoptionalRequired for Node.js native module backend
@taladb/react-nativeoptionalRequired for React Native JSI TurboModule backend
Agent activity
34 hits · last 30 days
node
30
OpenAI (training)
1
Resources
taladb — npm install taladb · libregistry