No server to run
It runs inside your process: on Node.js with the built-in node:sqlite, and in a browser on WASM SQLite.
You keep the polymorphic type model, the schema-first design and the query language.
No server to run
It runs inside your process: on Node.js with the built-in node:sqlite, and in a browser on WASM SQLite.
You keep the polymorphic type model, the schema-first design and the query language.
Offline-first sync
Every write goes in a change log. Stores replicate hub-and-spoke and converge without conflict when two nodes make the same edit, and a conflicting edit is kept, not discarded. Watch three devices and their hub do it, in your browser.
Measured, not claimed
It passes 1,742 of the 1,756 scenarios in TypeDB’s own behavior specification. Twelve of the 14 that do not pass also fail on TypeDB itself.
An editor and a playground
A VS Code extension with a Langium language server, and a browser playground that runs the same language server over LSP.
define entity book, owns title @key, owns author, owns status; attribute title, value string; attribute author, value string; attribute status, value string;insert $b isa book, has title "Dune", has author "Frank Herbert", has status "to-read";match $b isa book, has title $t, has author $a, has status $s;select $t, $a, $s;sort $t;import { TypeDBLiteInterpreter } from '@typedblite/runtime';
const db = new TypeDBLiteInterpreter('readlist.db'); // a file is a databaseconst { rows } = db.query(` match $b isa book, has title $t, has author $a; select $t, $a;`);for (const row of rows) console.log(row.t.asString(), 'by', row.a.asString());db.close();The five-minute tour builds this into a small program. Try it in your browser is its TypeQLite half as a notebook you can run now, and the playground opens with three ready-to-run examples to edit, or your own program to share by link. The sync demo shows stores replicating: three devices and their hub, offline and back, in your browser.
TypeDBLite exists because of TypeDB. The data model, the query language and the behavior it implements are the work of TypeDB Ltd and the TypeDB community, and its behavior specification is what TypeDBLite’s conformance is measured against. TypeDBLite is an independent project, not affiliated with, sponsored by, or endorsed by TypeDB Ltd.
TypeDBLite is an independent open-source project, built on TypeDB with thanks. It is not affiliated with, sponsored by, or endorsed by TypeDB Ltd. Released under the MPL-2.0 license.