gitmyhub

convex-backend

TypeScript ★ 12k updated 2d ago

The open-source reactive database for app developers

An open-source reactive backend for web apps that combines a database, server-side TypeScript functions, and client libraries so your app auto-updates when data changes, no polling needed.

TypeScriptRustNode.jsDockersetup: moderatecomplexity 3/5

Convex is an open-source backend system for web app developers that combines a database, server-side functions, and client libraries into one package. The key idea is that it is reactive: when data in the database changes, any part of your app that depends on that data updates automatically, without you having to write extra code to poll for changes or manage synchronization.

You write your server-side logic in plain TypeScript, and Convex runs it with strong consistency guarantees, meaning it handles concurrent requests in a way that prevents data conflicts. The same backend handles both fetching data and performing operations like creating or updating records. Client libraries connect your frontend to this backend, so building live-updating apps (chat, dashboards, collaborative tools) requires less coordination code than with traditional setups.

The easiest way to use Convex is through the managed cloud platform, which has a generous free tier and handles all infrastructure automatically. For teams that want to run it themselves, a self-hosted option is available using Docker or a prebuilt binary. The self-hosted version works alongside tools like Vercel, Fly.io, Neon, Postgres, SQLite, and others, and includes the same dashboard and command-line interface as the cloud product.

One note on self-hosting: the backend binary sends a small anonymous signal to Convex by default, containing a random deployment identifier, database version, and uptime information. This can be turned off with a flag if preferred.

This repository contains the backend source code, with the core written in Rust and the TypeScript packages (including the runtime for user-defined functions) in the npm-packages directory. Building from source is documented separately in BUILD.md.

Where it fits