jotaBase
A sync engine that treats the network as optional — your app reads and writes locally, and reconciles when it can.
Everything here is a one-time setup, and the last step gives you the key the code below needs.
notes.npm install @jotabase/client
Paste the publishable key you just copied. Publishable keys are safe to ship in a frontend bundle.
import { createClient } from "@jotabase/client";
const jb = createClient({
url: "https://api.jotabase.com",
publishableKey: "pk_live_...",
});
Use the name you gave it. Naming one you never created is fine too — the first write brings it into existence.
const db = jb.db("notes");
await db.open(); // loads the saved checkpoint
Writes land locally first and are pushed in the background, so they survive a dropped connection.
await db.put({ id: "note-1", data: { title: "Hello", done: false } });
// Pull everything since the last checkpoint.
await db.sync();
const note = await db.get("note-1");
// Re-sync automatically whenever the server changes.
db.subscribe(() => render());
Everything above works with the key alone. Add end-user auth when your users need roles, or rows only they can see.
const auth = jb.auth("notes");
const { token } = await auth.signIn({ email, password });
jb.setToken(token); // syncs now run as this user, with their roles
jotaBase is in active development and not yet generally available. The dashboard is live for existing accounts.