Skip to content
Built in RustOpen Source

The embedded database
for local-first JavaScript apps

Local-first document + vector database built in Rust. MongoDB-like queries and on-device vector search — browser, Node.js, and React Native. No cloud. No round-trips. No compromise.

pnpm add taladb @taladb/web

app.ts
import { openDB } from 'taladb'
import { pipeline } from '@xenova/transformers'

// Open a persistent on-device database
const db = await openDB('myapp.db')
const articles = db.collection<Article>('articles')

// On-device embedding model — no API key
const embed = await pipeline('feature-extraction',
  'Xenova/all-MiniLM-L6-v2')

// Store a document with its vector embedding
await articles.createVectorIndex('embedding', { dimensions: 384 })
await articles.insert({
  title: 'Getting started with TalaDB',
  embedding: await embed(article.body),
})

// Hybrid search — metadata filter + vector ranking
const results = await articles.findNearest(
  'embedding',
  await embed('how do I reset my password?'),
  5,
  { locale: 'en', published: true }
)
// [{ document: Article, score: 0.94 }, ...]

Everything you need. Nothing you don't.

A complete embedded database for local-first JavaScript apps — browser, Node.js, and React Native.

On-Device Vector Search

Cosine, dot, and euclidean similarity search with metadata filtering — the hybrid search pattern cloud providers charge for, running entirely on device. No API key, no round-trip.

MongoDB-like Query API

Familiar $eq, $gt, $in, $and, $or operators. Fully typed with TypeScript generics — field names and value types validated at compile time.

Live Queries

Subscribe to a filtered collection and receive a fresh snapshot on every write — no polling, no websockets, no infrastructure.

Encryption at Rest

Transparent AES-GCM-256 encryption. Keys derived via PBKDF2-HMAC-SHA256. Every value encrypted with a fresh random nonce — tamper-proof and crash-safe.

ACID Transactions

Powered by redb — a pure-Rust B-tree storage engine. Every write is atomic, consistent, isolated, and durable. Crash-safe out of the box.

Runs Everywhere

One Rust core compiles to browser WASM, a Node.js native module, and a React Native JSI HostObject. One API, zero platform branches in your app code.

Secondary Indexes

Type-safe B-tree indexes with O(log n) range scans. The query planner picks the best index automatically — no hints or query annotations needed.

Full-Text Search

Built-in inverted token index for string fields. The $contains operator matches documents using normalized term matching — no external search engine required.

Why not just use…?

Every alternative makes a trade-off TalaDB doesn't.

CapabilityTalaDBIndexedDBSQLite WASMDexie.jsPinecone / Qdrant
Document (JSON) storage~
MongoDB-style query DSL~~
On-device vector search~
Hybrid filter + vector ranking
TypeScript generics on queries
ACID transactions~~
Secondary B-tree indexes~
Full-text search~~
Live queries / subscriptions~
Encryption at rest~
Schema migrations
React Native (JSI)
Browser + OPFS persistence
No cloud / no API key
Rust core (no GC pauses)~
sub-400 KB WASM bundle

✓ supported  ·  ~ partial / limited  ·  — not supported

Built for local-first JavaScript apps

From AI-powered web apps to offline-first mobile — TalaDB fits where your data lives.

BrowserWASMOPFS

AI-Powered Web Apps

Pair TalaDB with on-device models (transformers.js, ONNX Web) to build semantic search, RAG pipelines, and AI assistants that run entirely in the browser.

  • Store document embeddings alongside metadata
  • Hybrid search: filter by tag, rank by similarity
  • No API key, no rate limit, no data egress
BrowserNode.js

Offline-First SaaS

Build apps that work without a connection. TalaDB persists data to OPFS in the browser and redb on Node.js — sync to your backend whenever a connection is available.

  • ACID writes survive tab closes and crashes
  • HTTP push sync fires in the background
  • Live queries keep the UI reactive without polling
iOSAndroidJSI

React Native Mobile

The JSI HostObject gives you synchronous database access without bridges. Store user data, search history, and embeddings directly on the device.

  • Synchronous reads via JSI — no async overhead
  • Same TypeScript API as web and Node.js
  • AES-GCM-256 encryption for sensitive user data
Node.jsBun

CLI Tools & Scripts

Use TalaDB as a fast, embedded document store for CLI tools, build pipelines, and data transformation scripts — no database server to spin up.

  • Native napi-rs module — no serialization overhead
  • ACID transactions for safe concurrent writes
  • Full-text and vector search in a single binary

Up and running in minutes

Pick your platform and go.

1

Install

bash
$ pnpm add taladb @taladb/web
2

Configure Vite

TalaDB's WASM worker needs cross-origin isolation headers to use OPFS.

vite.config.ts
import { defineConfig } from 'vite'

export default defineConfig({
  server: {
    headers: {
      'Cross-Origin-Opener-Policy': 'same-origin',
      'Cross-Origin-Embedder-Policy': 'require-corp',
    },
  },
})
3

Open a database and query

app.ts
import { openDB } from 'taladb'

const db = await openDB('myapp.db')
const users = db.collection<{ name: string; age: number }>('users')

await users.insert({ name: 'Alice', age: 30 })
const results = await users.find({ age: { $gte: 18 } })
// [{ _id: '...', name: 'Alice', age: 30 }]

Start building local-first today.

Open source, MIT licensed, and free forever. Documents and vectors, on device.