Skip to main content
Convex is the backend platform every vly app runs on. This deep-dive explains the core concepts, the function model, and the patterns vly uses. If you’ve used Firebase, Supabase, or Postgres, Convex will feel familiar but more cohesive — schema, functions, auth, file storage, and real-time sync are one system, not stitched together.

The mental model

Five concepts, in order of how often you’ll touch them:

Schema — what your data looks like

Tables, fields, types, indexes. TypeScript-first. See Schema.

Queries — read data, reactively

Pure functions that read the DB. Clients subscribe; updates are automatic. See Queries.

Mutations — write data, transactionally

Write functions with ACID guarantees. Cannot call third-party APIs. See Mutations.

Actions — side-effects and third-party calls

For anything that touches the outside world: API calls, email, file processing. See Actions.

Scheduled functions — cron and one-shot

Run a mutation or action at a specific time, or on a recurring schedule. See Scheduled functions.

Why reactive queries change everything

Convex queries are subscriptions. When a client calls a query via useQuery, the result auto-updates whenever any data the query depends on changes. No polling. No refetch. No manual cache invalidation.
This is why vly apps feel “live” by default. Building a chat, a multiplayer game, a dashboard, or a collaborative editor takes 90% less plumbing because the sync layer is automatic.

The function types in detail

The split between mutations and actions is intentional: mutations are transactional and cannot call the network (so they always commit cleanly). Actions can call the network but aren’t transactional (because external APIs aren’t either).

A complete worked example

Schema:
convex/schema.ts
A query — listing tasks for an owner:
convex/tasks.ts
Call it from React:
A mutation — creating and toggling tasks:
convex/tasks.ts
An action — calling Resend to send a welcome email:
convex/notifications.ts
Actions can call third-party APIs and use process.env. Queries and mutations cannot. A React component — putting it all together:
components/Tasks.tsx
Five files. Reactive sync is free — when one user toggles a task, every other user viewing this list sees the change.

Beyond CRUD

Convex isn’t just a database. The platform includes:

File storage

Upload, store, and serve files. Image transformations included.

Vector search

Semantic search via embeddings. Built on top of mutations and queries.

Full-text search

BM25-style search across text fields. No external service.

Scheduled functions

Cron-style or delayed one-shot execution.

Auth integration

ctx.auth.getUserIdentity() is available everywhere.

Migrations

Schema evolution patterns and how vly handles them automatically.

When to use which function type

A simple decision tree: vly picks the right type for you when you describe a feature. You only need to know the model when hand-editing.

What vly handles automatically

When you describe a feature in vly, the agent:
  • Picks the right function type
  • Adds the right schema indexes
  • Wires up useQuery / useMutation in components
  • Adds auth checks
  • Generates the migration script if a schema field changes
You can always override by hand in Code mode.

Limits to know

For higher limits, contact support.

Next

Schema

Defining tables, fields, indexes, validators.

Queries

Reactive reads, with the patterns vly uses.

Mutations

Transactional writes.
Last modified on April 18, 2026