Use backend
in a application

  • live queriesuseQuery(query, args?), useQueries(queries)
  • mutationsuseMutation(mutation), .withOptimisticUpdate(update)
  • cursor paginationusePaginatedQuery(query, args, options), insertAtTop(options)
  • file storageuseUpload(generateUploadUrl, options?), useUploadQueue(generateUploadUrl, options?), useStorageUrl(getUrl, storageId)
  • actionsuseAction(action)
  • server & ssruseAsyncQuery(query, args?, options?), preloadQuery(query, args?), fetchQuery(query, args?)
nuxt
≥ 4.6
vue
≥ 3.5
convex
≥ 1.46
ports convex
1.51.0
app.vue
const { data: board } =
  await useAsyncQuery(api.reactions.board)
const send = useMutation(api.reactions.send)
18:13harborKaunas👋 harbor, Kaunas, 18:13
harborKaunas👀 harbor, Kaunas, 18:13
harborKaunas🧡 harbor, Kaunas, 18:13
harbor🚀 harbor, 18:13
harbor🚀 harbor, 18:13
harbor🧡 harbor, 18:13
harbor🧡 harbor, 18:13
harbor🧡 harbor, 18:13
0 today0 today0 today0 today
as
live

works with · official add-ons

  • auth
    • better auth
    • clerk
    • auth0
  • billing
    • polar
  • email
    • resend

frontend

Nuxt

The full-stack framework for building web apps, from the first page to production.

nuxt.com

backend

Convex

The reactive backend that keeps your web app in sync with its data in real time.

convex.dev

Everything the module ships

typed#convex/api
Typed against your deployment

Composables, components and server helpers auto-import. The #convex/* aliases resolve your generated API, and the module re-renders them the moment codegen lands.

the import aliases

One table, live in every client

Flip a switch, drag the fader, send a pulse.
Every instrument is a row in one table, and every browser on this page has it on the same commit.

console.vue
const { data: switches } =
  await useAsyncQuery(api.switches.list)

const flip = useMutation(api.switches.flip)
  .withOptimisticUpdate((store, { position }) => {
    // the knob moves before the round trip
  })

Every browser on this page subscribes to the same rows. A flip, a drag or a press moves the instrument the instant you touch it — the optimistic update — and the commit lands a round trip later, for everyone.

console · one shared table live
level65
pulses · all time
live5 of 8 on

Nuxt, or plain Vue?

Throw the switch. The setup changes; the component does not.

nuxt.config.tssetup · changes
export default defineNuxtConfig({  modules: ['nuxt-convex-module'],})

One module. Every composable is auto-imported from here.

Messages.vue component · identical
const messages = useQuery(api.messages.list)const send = useMutation(api.messages.send)

One prompt, or three moves

00 · agent
Install nuxt-convex-module, the Convex module for Nuxt, in this project:
run `npx skills add https://nuxt-convex-module.dev --skill nuxt-convex-module -y`,
then follow .agents/skills/nuxt-convex-module/references/install.md.
open in your agentprompt typed in · you press send

Paste it into Claude Code, Cursor or Codex. The agent adds the module's skill, installs the module, starts a local Convex deployment and checks the dev server. Or take the three moves by hand.

  1. 01 · module
    npx nuxi module add nuxt-convex-module
    

    One module. Composables, components and server helpers auto-import.

  2. 02 · convex
    npm i convex
    

    The package your functions import from — a peer of the module.

  3. 03 · run
    convex dev --start "nuxt dev"
    
    scripts.dev · replaced automatically

    npm run dev stays the command you type. Convex starts Nuxt beside it and hands it the deployment URL. Read live data with useQuery.