The front end
just went full-stack

Convex is the reactive backend-as-a-service for web developers.

Start building
  • 1. Create your project's backend with one command
  • 2. Write simple JavaScript backend functions to store and query your app's state
  • 3. Connect those backend functions to your app with convenient React hooks
  • 4. Watch your app update in real time automatically
Terminal
› npx convex init
convex/listMessages.js
1
2
3
4
5
6
import { query } from "./_generated/server";

// List all chat messages.
export default query(({ db }) => {
  return db.query("messages").collect();
});
convex/sendMessage.js
1
2
3
4
5
6
7
import { mutation } from "./_generated/server";

// Send a chat message.
export default mutation(({ db }, body) => {
  const message = { body, time: Date.now() };
  db.insert("messages", message);
});
Terminal
› npx convex deploy
src/App.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import {
  useQuery,
  useMutation
} from "../convex/_generated/react";

function App() {
  // Reactively load the current messages.
  const messages = useQuery("listMessages") ?? [];

  // Send a message using a mutation.
  const sendMessage = useMutation("sendMessage");

  return (
    <div>
      {messages.map(message =>
        <Message message={message} />
      )}
      <button onClick={() => sendMessage("Hello Convex!")}>
        Say Hello
      </button>
    </div>
  )
}

    End-to-end reactivity

    No need to manage subscriptions. Everything in Convex is automatically multiplayer, real-time, and reactive. If backend state changes affect any loaded React components in your app, your users will be updated automatically, every time.

    gradient
    gradient
    gradient
    gradient
    Illustration

    Day one ease, year two power

    At first, just store your documents with JavaScript and declare victory. But as your project grows? Automatic caching for scale. Schemas and Indexes for safety. Amazing TypeScript support. Convex has you covered. And brought to you by a team that has built and run some of the biggest backends in the world.

    gradient
    gradient
    gradient
    gradient

    A console that keeps you in the loop

    While you're building, iterate on your app by quickly changing a document field's value or clearing a table. In production, keep tabs on your traffic and data. Through the entire app lifecycle, the Convex console is the web dev's ideal full-stack sidekick.

    gradient

    Want to try Convex?

    Build your next project todayStart building

    We're hiring

    Come help us reshape how the world builds apps.

    See open roles