Store JSON-like documents, run structured queries, and search vectors in one Rust engine. TalaDB runs entirely on-device across the browser, Node.js, React Native, and native Android and iOS apps — no database server or cloud API required.
pnpm add taladb @taladb/web
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),
})
// Filtered vector search — narrow, then rank
const results = await articles.findNearest(
'embedding',
await embed('how do I reset my password?'),
5,
{ locale: 'en', published: true }
)
// [{ document: Article, score: 0.94 }, ...]
A vector and document database in one embedded engine — browser, Node.js, React Native, Android, and iOS.
Exact k-NN (cosine, dot, euclidean) with metadata pre-filtering, plus optional HNSW at scale — the filtered vector search cloud providers charge for, running entirely on device. No API key, no round-trip.
Fuse BM25 keyword ranking with vector similarity via reciprocal rank fusion — so an exact SKU and a semantic paraphrase both surface from one query. The production RAG retrieval recipe, on-device.
Familiar $eq, $gt, $in, $and, $or operators. Fully typed with TypeScript generics — field names and value types validated at compile time.
Subscribe to a filtered collection and receive a fresh snapshot on every write — no polling, no websockets, no infrastructure.
Transparent AES-GCM-256 encryption. Keys derived via PBKDF2-HMAC-SHA256. Every value encrypted with a fresh random nonce — tamper-proof and crash-safe.
Powered by redb — a pure-Rust B-tree storage engine. Every write is atomic, consistent, isolated, and durable. Crash-safe out of the box.
One Rust core compiles to browser WASM, a Node.js native module, a React Native JSI HostObject, and a C library behind the Kotlin and Swift packages. One TypeScript API for JavaScript apps, idiomatic Kotlin, Swift, and Rust APIs for native ones.
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.
Relevance-ranked keyword search with searchText — the same BM25 model as Lucene and Elasticsearch — plus the boolean $contains filter. No external search engine required.
The first browser tab owns the OPFS file; later tabs read a live copy and forward their writes to it. No duplicate engines, no lost updates, no lock errors — and db.isPrimary() tells you which tab owns the storage when work must run only once.
MongoDB-style $match, $group, $sort, $skip, $limit, and $project stages with $sum, $avg, $min, $max accumulators — summaries computed inside the Rust engine, not by materialising every document in JavaScript.
Every alternative makes a trade-off TalaDB doesn't.
| Capability | TalaDB | IndexedDB | SQLite WASM | Dexie.js | Pinecone / Qdrant |
|---|---|---|---|---|---|
| Document (JSON) storage | ✓ | ✓ | ~ | ✓ | ✓ |
| MongoDB-style query DSL | ✓ | — | — | ~ | ~ |
| Aggregation pipeline ($group) | ✓ | — | ✓ | — | — |
| On-device vector search | ✓ | — | ~ | — | ✓ |
| Filtered vector search | ✓ | — | — | — | ✓ |
| TypeScript generics on queries | ✓ | — | — | ✓ | — |
| ACID transactions | ✓ | ~ | ✓ | ~ | ✓ |
| Secondary B-tree indexes | ✓ | ✓ | ✓ | ✓ | ~ |
| Full-text search (BM25) | ✓ | — | ~ | ~ | ~ |
| Hybrid search (keyword + vector) | ✓ | — | — | — | ~ |
| Live queries / subscriptions | ✓ | — | — | ~ | — |
| Encryption at rest | ✓ | — | ~ | — | ✓ |
| Schema migrations | ✓ | — | — | ✓ | — |
| React Native (JSI) | ✓ | — | ✓ | — | — |
| Native Kotlin & Swift packages | ✓ | — | — | — | — |
| Browser + OPFS persistence | ✓ | ✓ | ✓ | ✓ | — |
| No cloud / no API key | ✓ | ✓ | ✓ | ✓ | — |
| Rust core (no GC pauses) | ✓ | — | ~ | — | ✓ |
| Compact WASM core (572 KB gzip) | ✓ | — | — | — | — |
✓ supported · ~ partial / limited · — not supported
From AI-powered web apps to offline-first mobile — TalaDB fits where your data lives.
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.
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.
Use the React Native JSI binding, or the native Kotlin and Swift packages for Android and iOS apps. Store user data, search history, and embeddings directly on the device.
Use TalaDB as a fast, embedded document store for CLI tools, build pipelines, and data transformation scripts — from Node.js, or straight from Rust with the taladb crate. No database server to spin up.
Pick your platform and go.
$ pnpm add taladb @taladb/webTalaDB's WASM worker needs cross-origin isolation headers to use OPFS.
import { defineConfig } from 'vite'
export default defineConfig({
server: {
headers: {
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp',
},
},
})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 }]Free, open-source, Apache 2.0 licensed. One engine across the browser, Node.js, React Native, Android, and iOS — no cloud required.
TalaDB is maintained by one person. Sponsoring on GitHub directly funds continued development.