TinyJoin logoTinyJoin

Guides

These guides start with the smallest useful TinyJoin application and reveal storage, transactions, custom Workers, and compatibility details only when they become relevant.

The Node guide covers in-memory databases in Node.js with the same Client API, and the Drizzle and Kysely guides cover querying TinyJoin with those query builders.

The caveats collect what TinyJoin deliberately does not do, and which projects to reach for when that matters.

For exact method and type signatures, use the API reference.

Getting started

TinyJoin is a relational database that runs locally in a browser. The normal setup is one import and one asynchronous call. Read more.

Caveats

TinyJoin is small on purpose, and being small has costs. This page collects what an application signs up for, in one place, so that the decision gets made before the schema does. Read more.

SQL compatibility

TinyJoin implements its own deliberately bounded, PostgreSQL-shaped SQL dialect. It is not PostgreSQL compiled to WebAssembly, a PostgreSQL server, or a general PostgreSQL replacement. Familiar syntax is used where the smaller runtime can give it clear and deterministic semantics. Read more.

Storage and lifecycle

TinyJoin supports an ephemeral memory database and an opt-in persistent browser database. Both use the same Worker and page-native engine. Read more.

Transactions and changes

Each TinyJoin query is atomic. Use a callback transaction when several related row mutations must commit together. Read more.

Custom Workers

Most applications should use create(). It constructs TinyJoin's packaged module Worker and preserves the relative Worker, OPFS runtime, and WebAssembly assets during the supported Vite build path. Read more.

Node

Use tinyjoin/node to run an in-memory TinyJoin database in Node.js 22 or later. It uses a dedicated Worker thread and the same WebAssembly engine and Client API as the browser runtime. Read more.

Drizzle

Use tinyjoin/drizzle to query a TinyJoin database with the Drizzle ORM query builder. It connects Drizzle to a TinyJoin Client, runs Drizzle's transactions as TinyJoin transactions, and binds JSON values as JSON. Read more.

Kysely

Use tinyjoin/kysely to query a TinyJoin database with the Kysely query builder. Its dialect runs Kysely's queries on a TinyJoin Client, runs Kysely's transactions as TinyJoin transactions, and lets Kysely's introspector and Migrator read and change the schema. Read more.

Offline

OPFS persists database rows. Reopening the application without a network also requires its HTML, JavaScript, CSS, Worker, and WASM files to be available. TinyJoin's optional Vite plugin caches the complete production build, including lazy assets that the first visit has not used yet. Read more.

Benchmarks

TinyJoin is measured against the two databases most often chosen for the same job: SQLite's official WebAssembly build and PGlite. All three run in a dedicated Worker, store their data in the origin private file system (OPFS), and are driven from the page by the same workloads in the same Chromium. Read more.

Agents guide

This guide follows the agents.md convention and gives AI coding assistants a compact, current model of TinyJoin. Read more.

Releases

This is a reverse chronological summary of TinyJoin releases and their public compatibility boundaries. Every entry states what upgrading to it requires, so check the entries between the version in use and the target before upgrading. A release that needs no action says so explicitly. Read more.