Convex
Convex is a reactive backend platform that replaces your database, server functions, and real-time infrastructure with a single, cohesive system. It eliminates the need to manage separate services for data storage, API endpoints, and live subscriptions.
Why Convex
- Automatic reactivity — queries re-run whenever underlying data changes, pushing updates to every connected client instantly.
- Type-safe end-to-end — schemas, functions, and client hooks all share a single type system powered by TypeScript.
- Zero-config deployment — push functions with
npx convex deployand Convex handles scaling, caching, and edge distribution. - Schema as code — your database schema lives right alongside your functions in TypeScript, so it's versioned, reviewed, and deployed with everything else.
- Scheduled functions & crons as code — define recurring jobs and delayed tasks directly in your codebase instead of configuring them through a separate dashboard or infrastructure layer.
- Built-in file storage — upload, store, and serve files without provisioning a separate object store or CDN.
Sub-topics
| Section | What you will learn |
|---|---|
| Schema Design | Defining tables, field validators, and indexes |
| Queries & Mutations | Reading and writing data with server functions |
| Real-time Subscriptions | How automatic reactivity works on the client |
| File Storage | Uploading and serving files through Convex |
Quick start
# Install the Convex client and CLI
npm install convex
# Start the dev server (watches for function changes)
npx convex dev
Once convex dev is running, any changes you make to files inside the convex/ directory are
automatically deployed to your development backend. The CLI prints a dashboard URL where you can
inspect data, run functions, and view logs.
Project structure
convex/
├── schema.ts # Table definitions and indexes
├── queries.ts # Read-only server functions
├── mutations.ts # Write server functions
├── actions.ts # Side-effect functions (external APIs)
└── _generated/ # Auto-generated types and client
All Convex functions live in the convex/ directory at the project root. The _generated/ folder
is managed by the CLI and should not be edited by hand.