thedata layerthat you own

Jazz is a relational database with tables, blobs, durable streams, collaborative rich text and more, all protected by declarative permissions. It runs in your existing cloud as part of your backend. Use live queries from your server or straight from your clients, including local-first apps.

Live data, from your cloud to every client

Runs in your own cloud

Jazz makes use of your platform's native serverless primitives, sharding and scaling to zero as needed.

Part of your backend

Jazz is a library your server imports, wherever you deploy it, and keeps its data on that platform's storage. Its schema and permissions are the code you deploy, with no database server to run.

Live queries everywhere

Traditional clients call your API routes as usual. Browsers, mobile apps and backend clients can also live-sync on your own origin, querying straight from a component. Results stay up to date as anyone writes.

Local-first when you want it

Clients start thin. Switch one to local-first for offline use and instant reads: it runs the same Rust engine on the device, with the same queries.

Install in your backend and define a schema

import { createJazz, vercel } from "jazz-tools/backend";
import { app, permissions } from "./schema";
​
export const jazz = createJazz({
app,
permissions,
// Also: cloudflare() (coming soon), and plain sqlite()
// for local dev and your own servers
store: vercel(),
// Better Auth, WorkOS, many other providers or any custom auth:
// pass on the user ID and permission-relevant claims, or null
authenticate: (request) => getSignedInUser(request),
});
import { jazz } from "@/jazz.server";
​
// Sync for browsers, apps and agents, on your own origin
export const { GET, POST, DELETE } = jazz.next();
import { schema as s } from "jazz-tools";
​
const schema = {
todos: s.table(
{
title: s.string(),
done: s.boolean(),
owner_id: s.uuid(),
},
{},
),
};
​
export const app = s.defineApp(schema);
​
export const permissions = s.definePermissions(
app,
({ policy, session }) => {
const mine = { owner_id: session.user };
​
policy.todos.allowRead.where(mine);
policy.todos.allowInsert.where(mine);
policy.todos.allowUpdate
.whereOld(mine)
.whereNew(mine);
policy.todos.allowDelete.where(mine);
},
);

Query from anywhere

import { jazz } from "@/jazz.server";
import { app } from "@/schema";
​
export async function GET(request: Request) {
// Runs as the signed-in user: only their todos
// according to permissions defined in schema.ts
const db = await jazz.forReqUser(request);
const todos = await db.all(app.todos.where({ done: false }));
return Response.json(todos);
}
import { useAll } from "jazz-tools/react";
import { app } from "./schema";
​
export function OpenTodos() {
// As an alternative to traditional querying via api/todos you can query
// and write to Jazz directly from the client, which will do real-time sync
// through the /jazz route, either through a thin client or fully
// local-first with offline support
const { data: todos = [], db } = useAll(app.todos.where({ done: false }));
​
return todos.map((todo) => (
<label key={todo.id}>
<input type="checkbox"
onChange={() => db.update(app.todos, todo.id, { done: true })} />
{todo.title}
</label>
));
}

Build any kind of app, on your infra.

  1. More examples and benchmarks →

One layer for letting apps and agents deal with all kinds of data.

Declarative permissions and per-query auth

Declarative permissions are policies over your data and the user your backend signed in, defined in code and testable like the rest of your app.

Jazz optimizes each query together with the policies that apply to it, so the same rules hold whether a query runs in a route handler or comes straight from the browser.

tasks · all rowstitledone$createdByplan launchfalseyoudraft pricingfalsesamreview prtrueyoubook venuefalseyoufix loginfalseanacombined queryread policy$createdBy = youyour querydone = falsesynced to youtitleplan launchbook venueone plan · rows a user may not read never leave your backend

Blobs, streams, JSON, richtext? To Jazz it's all just columns.

Jazz is designed to efficiently handle all kinds, sizes, shapes and intensities of data, while still representing everything in a simple relational model.

  • Durable streams? Just keep appending to a column, or stream out of one.
  • Binary blobs? Just put 2GB in a column, and read ranges.
  • Giant JSON document? Just put it in a column and stream parts with JSON pointers.
  • Long markdown document? It's just a very big string column.

This allows you to truly keep all data in one place, with no external links and no separate systems. And permission policies apply exactly like on normal data.

Under the hood, large values are stored as prolly trees, so appends, point edits, partial and streaming reads stay fast. Jazz syncs only the parts you need, and queries over large data run in a streaming fashion.

columnstored as chunksstays fasteventsstreamappend · stream outvideobinary · 2GBread a byte rangesettingsjsonread /theme by pointerbodymarkdownedit mid-documentonly touched chunks sync · permissions apply as on any column

Real-time collaboration and deep edit histories

People and agents now edit the same data at a much higher rate, and you need to reason about it afterwards.

Jazz gives you flexible, branch-like views over your data. Build anything from drafts to complex git-like workflows on them, including permissions over branches.

maindraftanaanaagentagentsammergeread any version · compare branches · see who changed what

Fluid schema evolution for fast teams

Instead of stop-the-world migrations, Jazz migrations are live compatibility layers that translate between the versions of your app.

Old clients keep working, new features ship without complicated rollouts, and apps with many feature flags stay safe to change.

app v1title · doneapp v2title · statuslens v1status → donelens v2done → statusraw table · superset of all versionstitledonestatuswrittenbuy milktrue·v1call anafalse·v1ship v2·doingv2fix bug·donev2

Simplifies your backend and infra

Networking, permissions, auth integration and a collaboration-native data model are standard in Jazz, so your backend holds business logic instead of glue.

Jazz also covers roles that usually need their own infrastructure or vendors: blob storage, durable streams and real-time messaging, all under the same permissions.

typical stackwith jazzbusiness logicCRUD api endpointsrequests and reconnectsclient data state handlingwebsocket fan-outcache + invalidationpermission checksmessage queueblob storage + cdndatabasebusiness logicjazzsync + live queriesdeclarative permissionsdurable streamsfiles + blobsdatabase

Slims your frontend, from thin client to local-first

Even as a thin client, Jazz replaces the request/response loop and all the client state around it. A component asks for the rows it needs with one reactive query hook and stays live as they change: no fetch calls per endpoint, no cache to invalidate, no refetching.

Turn a client local-first and Jazz also takes over the client logic that is usually the hardest to hand-build: optimistic updates, sync and offline support. It keeps a durable copy on the device, so reads never wait on the network and writes show up at once.

typical clientwith jazzui componentsfetch calls per endpointloading + error statesclient state storecache invalidation + refetchwebsocket subscriptionsoptimistic updatesrollback on failureoffline queue + retrieslocal persistenceui componentsthin clientone reactive query hooklive updateswrites as plain calls+ local-firstinstant optimistic writesdurable local copyoffline + background sync

Priced for flexible self-hosting & BYOC

Jazz

Open-source (MIT)

Free

Limited only by what you can fit on a single server instance of any size.

All product features

No sharding

Single region

Community support

Operated by you

Jazz Pro

Source available

Free

Limited only by what you can fit on any number of shards up to 4 GB RAM in total.

All product features

Limited sharding (up to 4 GB RAM total)

Single region

Community support

Operated by you

Jazz and Jazz Pro: typically enough for apps with 1K–10K active users

Jazz Scale

Self-serve license

$200/mo

1,000
included
+$50/mo per additional 1,000

All product features

Unlimited sharding

Multi-region

Private support channel

Operated by you

Custom

Bespoke contract

Let’s talk

Volume deals and tailored terms for large companies and early-stage startups.

All product features

Unlimited sharding

Multi-region

Private support channel
Custom support & training

Operated by you or us (with SLAs)

Jazz Scale and Custom: scale to millions of active users across regions

What it costs on each platform

Monthly active users

1k MAU

Frequency of use

Daily use

Real-time profile

Collaborative interaction

Large values per user (files, images, rich text, durable streams)

1 MB blob per user

Cloudflare Durable Objects

Total / mo

$5.00

Per MAU / mo

$0.0050

Runs on
Durable Object
Est. Cloudflare bill
$5.00
Jazz
Jazz OSS, free

Cold wake (p50 / p95)

~50 ms / ~250 ms (estimated)

Security

Cloudflare WAF and DDoS protection, with a fast-patching security team

Durability

Every write stored across multiple data centers before it's acknowledged

Vercel Sandbox

Total / mo

$0

Per MAU / mo

$0

Runs on
1 vCPU / 2 GB Sandbox
Est. Vercel bill
$0
Jazz
Jazz OSS, free

Cold wake (p50 / p95)

~0.75 s / ~4 s

Security

Vercel Firewall and DDoS protection, with a fast-patching security team

Durability

Persistent Drive, Blob for large values

AWS EC2

Total / mo

$61.3

Per MAU / mo

$0.06

Runs on
2 vCPU / 8 GB EC2 instance
Est. AWS bill
$61.3
Jazz
Jazz OSS, free

Cold wake (p50 / p95)

None, always on

Security

Shield Standard included; WAF, OS patches and TLS are up to you

Durability

EBS replicated within one zone, plus snapshots

Your own server

Total / mo

$25.2

Per MAU / mo

$0.03

Runs on
2 vCPU / 8 GB Hetzner server
Est. hosting bill
$25.2
Jazz
Jazz OSS, free

Cold wake (p50 / p95)

None, always on

Security

Firewall, OS patches and TLS are up to you

Durability

Server disks plus the backups you schedule

Start with your agent

Paste this into your coding agent. It works for a new project and for an app you already have: the agent asks what it needs and sets Jazz up in your backend.

[describe your project first, or drop into an ongoing chat]

# Agent Quickstart for jazz.tools

## Decide

1. **Where should this project be deployed?** Jazz runs embedded in your backend, so it deploys with your app. It works best on serverless platforms like Vercel; Cloudflare support is coming. You don't need to deploy to start: locally, Jazz uses a SQLite file.
   Default: Vercel for a Next.js app, your own server otherwise.
   See /docs/setup/deployment/vercel, /docs/setup/deployment/own-server
2. **What auth provider or library should be used?** Jazz is unopinionated here: it hooks into however your backend already does auth, including roles and claims from your identity provider, which policies can check directly.
   Default: keep what the project uses; for a new app, Better Auth.
   See /docs/setup/auth/backend, /docs/setup/auth/better-auth, /docs/setup/auth/workos, /docs/setup/auth/custom, /docs/setup/auth/local-first
3. **Which backend framework should be used?** Next.js, Hono, Express / Node, Bun or Effect. Each setup page has a tab per framework.
   Default: what the project already has; for a new app, Next.js with React, or Hono or Express plus Vite with Vue or Svelte. For a separate frontend dev server (React + Vite, say), run Jazz in your backend and proxy `/jazz` to it with WebSockets on (Vite: `server.proxy["/jazz"] = { target, ws: true }`), plus your auth routes (Better Auth also needs the dev origin in `trustedOrigins`); see /docs/setup/deployment/own-server#a-separate-frontend-dev-server
4. **Should Jazz only be used through traditional API routes, or would this app benefit from simpler state management by accessing Jazz directly from the frontend?** This choice is cheap to change later: a screen moves from thin to local-first with the same schema, queries and policies.
   - React Native is always local-first: /docs/setup/react-native
   - For the web: is this an app where fast loads and bundle size matter most, with lots of first-time visitors? Use the thin client (/docs/setup/web-client/thin-client). Or is it a frequently used app that benefits from local storage for UI speed and offline support? Use the local-first client (/docs/setup/web-client/local-first-client). Both pages list the current bundle sizes.
   - Which frontend framework? React, Vue, Svelte, Solid, Effect or plain TypeScript.
     Default: thin client, React.

## Design the data

5. **The most important thing to get right in a Jazz app is the schema** (/docs/schemas/defining-tables, /docs/schemas/column-types, /docs/schemas/relationships) **and its permission policies** (/docs/schemas/policies).
   - For new apps, this is the core design question. Show the user the schema and policies and iterate with them now, before building the whole app.
   - For existing apps migrating from another data store, the existing data should constrain this enough.
   - Write permission tests next to the policies: /docs/tooling/testing
   - In either case, use these Jazz features instead of modeling them yourself:
     - Built-in metadata columns like `$createdBy`, `$createdAt`, `$updatedBy` and `$updatedAt`: /docs/reading/metadata
     - Edit history: /docs/reading/history
     - Files, streams and long text as large values in ordinary columns: /docs/writing/writing-data#editing-a-page-of-a-large-value
     - Collaborative rich text: /docs/writing/text

## Build

6. **Now build the app** with server- or client-side queries (/docs/reading/queries, /docs/reading/filters-and-sorting, /docs/reading/includes-and-relations) and transactions (/docs/writing/writing-data, /docs/writing/transactions, /docs/writing/text). One subtlety of Jazz is choosing between two kinds of transaction. Start with mergeable ones.
   - Mergeable transactions are eventually consistent and local-first: concurrent writes are combined by merge strategies.
   - Serializable transactions are ACID with serializable isolation and locally optimistic: use them for invariants that must hold across users, such as unique names, stock counts or balances. The server can still reject them, so handle that in the UI.
7. **Debug.** Reproduce problems in tests against your app's backend (/docs/tooling/testing), look at the data with the inspector (/docs/tooling/inspector), and check what has synced with "Showing sync status" on /docs/writing/writing-data.
8. **Feedback.** Jazz focuses on self-hosting, so the team relies on feedback to learn what people build and where Jazz falls short, and it really shapes what comes next. Tell the user so, and offer to help them share it:
   - A bug or a missing feature: draft a GitHub issue at https://github.com/garden-co/jazz/issues with what they were building, what they expected, what happened, and a minimal reproduction. You have all that context; write it up so the user only needs to review and submit it.
   - What they built and how it went: the Jazz Discord, https://discord.gg/jazz.

## Later and more advanced topics to be aware of

1. Schema evolution and migrations are particularly interesting in Jazz: /docs/schemas/migrations
2. Need backend clients that can't be part of the main backend API? /docs/setup/backend-client
3. Drafts and branches of rows: /docs/recipes/drafts-and-branches
4. Durability tiers, for "is it saved?" indicators: /docs/reference/durability-tiers

## About this guide

The above is a guide from the Jazz team for agents building with Jazz. You and your user have the most context about what you're building, so use your intuition. Depending on how established or greenfield the project is and what the user wants, explain how Jazz fits their existing tech choices, recommend options for open choices, or just make the choices needed to get things running quickly. Every choice under "Decide" has a default you can take when the user has no preference.

All docs links are paths on https://jazz.tools. Append `.md` to any docs page for Markdown. The full docs index is https://jazz.tools/llms.txt. To search the docs, fetch https://jazz.tools/api/search?q=<words>&format=md (add `&full=1` to include the top three pages).

**This guide is for Jazz 2,** which is in alpha and leaves alpha soon. Install the current version with `npm install jazz-tools` (plus `jazz-rn` for React Native); it is a 2.0 alpha, and that's expected. Versions before 2.0 are Classic Jazz, a different API: don't pin `jazz-tools` to 0.x, and don't follow Classic examples (`co.map`, `CoValue`, `Group`) from memory or the web.

Or have it run npm create jazz. Read the quickstart or join the Jazz Discord.