Instant is a free, open source databases project written in TypeScript and released under Apache-2.0. It has 10,517 GitHub stars, 407 forks and 19 open issues, and was last pushed 6 hours ago. On this registry it ranks #49 of 81 tracked projects in Databases, with 5 head-to-head comparisons available. It gained 5 stars over the last 6 tracked days.

What is Instant?

What it is

Instant is an open-source realtime client-side database for collaborative apps, written in TypeScript and released under the Apache-2.0 license. It lives in the JavaScript, React, and React Native ecosystem, where it acts as a backend layer for auth, permissions, presence, storage, and streams.

It solves the repeated plumbing work that appears when a UI engineer builds a modern interactive application. Instead of standing up databases, caches, ORMs, endpoints, stores, selectors, and mutators for each feature, Instant lets developers write relational queries in the shape of the data they want, then handles fetching, permission checking, offline caching, optimistic updates, and rollbacks.

Key capabilities

  • It exposes InstaQL, a relational query language that lets developers request nested data such as users, posts, and comments in one query.
  • It handles data fetching, permission checking, and offline caching on the client, so application code can use query results directly.
  • It applies optimistic updates and rollbacks when data changes, reducing the need to write custom transaction queues and local cache logic.
  • It makes every query multiplayer by default, so collaborative applications can propagate changes without separate stateful server code.
  • It stores user data as triples in Postgres, tails the write-ahead log, and uses a sync server to detect novelty and invalidate relevant queries.
  • It supports ephemeral updates, including presence features such as cursors and who is online.

Who uses it and how

  • Developers building collaborative web apps use it to read and update shared data in React components, as shown by the chat example that calls db.useQuery and db.transact.
  • Teams shipping React Native apps use the SDK to persist recent query caches in AsyncStorage.
  • Frontend engineers building offline-capable interfaces use it to keep recent queries cached locally and to apply updates optimistically before the server confirms them.
  • Application builders who need presence features use it to sync ephemeral state such as cursors and online status alongside ordinary relational data.

Getting started

The README says the easiest way to start is to sign up at instantdb.com, where a functional app can be created in five minutes or less. It also points to the docs, examples, browser demo, and Discord.

When to use it — and when not to

Use Instant when you want a realtime client-side database that combines queries, permissions, presence, storage, and streams without building separate endpoints, stores, and caches for each feature. It is less suitable if you need a documented self-hosted deployment, because the README describes a hosted multi-tenant Postgres-backed service and does not provide self-hosting steps. The repository metadata reports zero contributors and nineteen open issues.

project readme (upstream, from github) — read inline

Shows the Instant logo

stars

Get Started · Examples · Try the Demo · Docs · Discord

Instant is the best backend for AI-coded apps. You get auth, permissions, storage, presence, and streams — everything you need to ship apps your users will love.

You write relational queries in the shape of the data you want and Instant handles all the data fetching, permission checking, and offline caching. When you change data, optimistic updates and rollbacks are handled for you as well. Plus, every query is multiplayer by default.

We also support ephemeral updates, like cursors, or who's online. Currently we have SDKs for Javascript, React, and React Native.

How does it look? Here's a barebones chat app in about 12 lines:

// ༼ つ ◕_◕ ༽つ Real-time Chat
// ----------------------------------
// * Updates instantly
// * Multiplayer
// * Works offline

import { init, id } from "@instantdb/react";

const db = init({ 
  appId: process.env.NEXT_PUBLIC_APP_ID,
});

function Chat() {
  // 1. Read
  const { isLoading, error, data } = db.useQuery({
    messages: {},
  });

  // 2. Write
  const addMessage = (message) => {
    db.transact(db.tx.messages[id()].update(message));
  };

  // 3. Render!
  return <UI data={data} onAdd={addMessage} />;
}

Want to see for yourself? try a demo in your browser.

Motivation

Writing modern apps is full of schleps. Most of the time you start with the server: stand up databases, caches, ORMs, and endpoints. Then you write client-side code: stores, selectors, mutators. Finally you paint a screen. If you add multiplayer you need to think about stateful servers, and if you support offline mode, you need to think about IndexedDB and transaction queues.

To make things worse, whenever you add a new feature, you go through the same song and dance over and over again: add models, write endpoints, stores, selectors, and finally the UI.

Could it be better?

In 2021, we realized that most of the schleps we face as UI engineers are actually database problems in disguise. (We got into greater detail in this essay)

Shows how Instant compresses schleps

If you had a database on the client, you wouldn't need to think about stores, selectors, endpoints, or local caches: just write queries. If these queries were multiplayer by default, you wouldn't have to worry about stateful servers. And if your database supported rollback, you'd get optimistic updates for free.

So we built Instant. Instant gives you a database you can use in the client, so you can focus on what’s important: building a great UX for your users, and doing it quickly.

Architectural Overview

Here's how Instant works at a high level:

Shows how Instant compresses schleps

Under the hood, we store all user data as triples in one big Postgres database. A multi-tenant setup lets us offer a free tier that never pauses.

A sync server written in Clojure talks to Postgres. We wrote a query engine that understands datalog and InstaQL, a relational language that looks a lot like GraphQL:

// give me all users, their posts and comments
{
  users: {
    posts: {
      comments: {
      }
    }
  }
}

Taking inspiration from Asana’s WorldStore and Figma’s LiveGraph, we tail postgres’ WAL to detect novelty and invalidate relevant queries.

For the frontend, we wrote a client-side triple store. The SDK handles persisting a cache of recent queries to IndexedDB on web, and AsyncStorage in React Native.

All data goes through a permission system powered by Google's CEL library.

Getting Started

The easiest way to get started with Instant is by signing up on instantdb.com. You can create a functional app in 5 minutes or less.

If you have any questions, you can jump in on our discord.

Contributing

You can start by joining our discord and introducing yourself. Even if you don't contribute code, we always love feedback.

If you want to make changes, start by reading the client and server READMEs. There you'll find instructions to start Instant locally.

Frequently asked questions

Is Instant free to use?

Instant is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does Instant do?

Realtime client-side database for collaborative apps

What is Instant written in?

Instant is primarily written in TypeScript. Its source is publicly available at https://github.com/instantdb/instant, and it has 10,517 GitHub stars.