Skip to main content

Welcome to Convex

You’re just a few short steps away from building an interactive live-updating web application entirely in JavaScript, all without managing a backend. Follow along with the video or read on below.

The backend as a service designed for web applications

Convex is a database and a backend as a service, designed specifically for the needs of web applications. Queries in Convex are full JavaScript functions, allowing you to easily express your application logic. These queries can be used as end-to-end subscriptions that update your React components in users' browsers whenever the data they depend on changes.

The best way to understand the magic of Convex is to see it in action. We’ll have you up and running in a manner of seconds…

Your first Convex app

Clone the starter project and install its dependencies.

git clone https://github.com/get-convex/convex-tutorial.git
cd convex-tutorial
npm i

This project contains a basic chat web app, including React code that runs on the frontend and Convex query functions that run in the cloud. npm run dev runs both the Convex dev server and a frontend dev server to deploy and hot-reload both these functions and these Convex functions and the application frontend.

npm run dev
note

The first time you run this command you'll be prompted to log in via GitHub and to create a new project. You don't need any additional credentials or to pay for anything.

Your app is up and running.

Convex interactivity

Open another browser window with the same url. You should see chat messages typed in one browser window show up immediately in the other. Any data in Convex (chat messages in this example app) will update immediately for all viewers, anywhere in the world.

Open your project's dashboard to see your data. You can modify this data directly, causing every browser window viewing the app to update immediately.

If you get stuck, join our Discord for help.

Keep reading for an overview of what this code does, or feel free to poke around your new Convex app yourself! You can use it as a base for your own project, skip to the quickstart to add Convex to an existing project, or read about Next.js or TypeScript support.