# Convex — Reactive Backend and Database for Apps > Convex is an open-source reactive backend platform that combines a document database, serverless functions, and real-time sync into a single TypeScript-first development experience. ## Install Save in your project root: # Convex — Reactive Backend and Database for Apps ## Quick Use ```bash npm create convex@latest cd my-app npx convex dev # starts local backend and syncs schema ``` ## Introduction Convex provides a reactive backend where database queries, serverless functions, and real-time subscriptions are defined together in TypeScript. Changes to data automatically propagate to all connected clients without manual WebSocket management or polling. ## What Convex Does - Stores data in a transactional document database with strong consistency - Runs server-side TypeScript functions with automatic caching and reactivity - Pushes real-time updates to connected clients when query results change - Provides built-in file storage, authentication, and scheduled jobs - Offers a fully self-hostable open-source backend since the 2024 release ## Architecture Overview Convex is built in Rust and uses a custom transactional document store as its storage layer. Server functions are defined in TypeScript and executed in a V8 isolate runtime. The reactivity system tracks which documents each query reads and automatically re-runs queries when those documents change, pushing updates to subscribed clients over WebSockets. ## Self-Hosting & Configuration - Bootstrap a new project with the create-convex CLI in seconds - Self-host using the open-source convex-backend Docker image - Define your schema, queries, mutations, and actions in a convex/ directory - Environment variables and secrets are managed through the dashboard or CLI - Deploy to production with zero-downtime schema migrations ## Key Features - Automatic reactivity eliminates manual cache invalidation and data refetching - ACID transactions across multiple documents and tables - TypeScript end-to-end with generated types from your schema - Built-in vector search for AI embedding queries - Scheduled functions and cron jobs without external task queues ## Comparison with Similar Tools - **Supabase** — Postgres-based with REST APIs and real-time via Change Data Capture, but not reactively re-executing queries - **Firebase** — Google-managed NoSQL with real-time sync, but proprietary and limited query capabilities - **PocketBase** — Lightweight Go backend with SQLite, simpler but no reactive query system - **SpacetimeDB** — Unified DB and server with WASM modules, focused on game workloads - **Hasura** — GraphQL layer over Postgres with subscriptions, but requires managing the underlying database ## FAQ **Q: Is Convex fully open source?** A: Yes, the Convex backend was open-sourced in 2024 under the FSL (Functional Source License), which converts to Apache 2.0 after two years. **Q: Can I self-host Convex?** A: Yes. The open-source backend can be deployed on your own infrastructure using Docker. **Q: What client frameworks does Convex support?** A: Official React, Next.js, and React Native clients are available. Community clients exist for Vue, Svelte, and plain JavaScript. **Q: How does Convex handle file uploads?** A: Convex includes built-in file storage with automatic URL generation. Files are stored alongside your data with no external S3 configuration required. ## Sources - https://github.com/get-convex/convex-backend - https://docs.convex.dev --- Source: https://tokrepo.com/en/workflows/b3685d7c-3c71-11f1-9bc6-00163e2b0d79 Author: AI Open Source