{"id":22436,"library":"taladb","title":"TalaDB","description":"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.","status":"active","version":"0.7.10","language":"javascript","source_language":"en","source_url":"https://github.com/thinkgrid-labs/taladb","tags":["javascript","database","local-first","offline","wasm","react-native","vector","vector-search","embeddings","typescript"],"install":[{"cmd":"npm install taladb","lang":"bash","label":"npm"},{"cmd":"yarn add taladb","lang":"bash","label":"yarn"},{"cmd":"pnpm add taladb","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for browser/WASM platform backend","package":"@taladb/web","optional":true},{"reason":"Required for Node.js native module backend","package":"@taladb/node","optional":true},{"reason":"Required for React Native JSI TurboModule backend","package":"@taladb/react-native","optional":true}],"imports":[{"note":"Named export, not default. Since v0.1.0.","wrong":"import openDB from 'taladb'","symbol":"openDB","correct":"import { openDB } from 'taladb'"},{"note":"ESM-only package — do not use require().","wrong":"const runMigrations = require('taladb').runMigrations","symbol":"runMigrations","correct":"import { runMigrations } from 'taladb'"},{"note":"Collection is a TypeScript type, not a runtime value. Use type import when not using instances.","wrong":"import { Collection } from 'taladb'","symbol":"type Collection","correct":"import type { Collection } from 'taladb'"},{"note":"TalaDB is the type of the database object returned by openDB().","wrong":"","symbol":"TalaDB","correct":"import type { TalaDB } from 'taladb'"}],"quickstart":{"code":"import { openDB, runMigrations } from 'taladb';\n\nasync function main() {\n  const db = await openDB('quickstart.db');\n\n  // Run migrations\n  await runMigrations(db, [\n    {\n      fromVersion: 0,\n      toVersion: 1,\n      description: 'add default role',\n      async up(col) {\n        await col('users').updateMany({}, { $set: { role: 'viewer' } });\n      },\n    },\n  ]);\n\n  const users = db.collection('users');\n\n  // Create index\n  await users.createIndex('email');\n\n  // Insert\n  const id = await users.insert({ name: 'Alice', email: 'alice@example.com', age: 30 });\n  console.log('Inserted with id:', id);\n\n  // Find one\n  const alice = await users.findOne({ email: 'alice@example.com' });\n  console.log('Found:', alice);\n\n  // Update\n  await users.updateOne({ email: 'alice@example.com' }, { $inc: { age: 1 } });\n\n  // Find all adults\n  const adults = await users.find({ age: { $gte: 18 } });\n  console.log('Adults:', adults);\n\n  await db.close();\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Opens a database, runs a schema migration, creates an index, inserts/finds/updates documents, then closes."},"warnings":[{"fix":"Install both: pnpm add taladb @taladb/web (for browser), or pnpm add taladb @taladb/node (for Node).","message":"Must install the appropriate platform-specific backend package (@taladb/web, @taladb/node, or @taladb/react-native) in addition to taladb.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade Node.js to version 18 or later.","message":"Node.js >=18 is required. Earlier versions will fail to load the native module.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Use import syntax or dynamic import() in Node.js with type: 'module' in package.json.","message":"The package is ESM-only; CommonJS require() will throw an error.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Replace 'new Database()' with 'await openDB()'.","message":"The old API using 'new Database()' constructor was removed in v0.6.0. Use openDB() instead.","severity":"deprecated","affected_versions":"<0.6.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install the appropriate package: npm install @taladb/web (for browser), @taladb/node (for Node.js), or @taladb/react-native (for React Native).","cause":"Platform-specific backend package not installed alongside taladb.","error":"Cannot find module '@taladb/web' (or '@taladb/node', '@taladb/react-native')"},{"fix":"Convert to ES modules: use import statements and set 'type': 'module' in your package.json, or use dynamic import() inside a CommonJS file.","cause":"Using CommonJS require() to import an ESM-only package.","error":"require() of ES Module taladb from not supported"},{"fix":"Replace with: const db = await openDB('name');","cause":"Using the deprecated new Database() constructor removed in v0.6.0.","error":"Error: This constructor is no longer supported. Use openDB() instead."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}