Skip to content

convex

Convex is a fullstack TypeScript development platform with real-time database, file storage, and serverless functions. This project uses Better Convex for type-safe cRPC procedures with TanStack Query integration.

This project uses Better Convex for type-safe cRPC procedures with TanStack Query. See patterns-better-convex for the key patterns used in this codebase.

Key Features:

  • Real-time database with automatic subscriptions
  • Type-safe queries, mutations, and actions
  • Built-in file storage and authentication
  • cRPC procedures with middleware (via Better Convex)
  • TanStack Query integration for React
TopicDescriptionReference
FunctionsQueries, mutations, actions with cRPCcore-functions
SchemaDatabase schema and validatorscore-schema
RealtimeSubscriptions and optimistic updatescore-realtime
TopicDescriptionReference
Better ConvexcRPC, folder structure, zid(), type inferencepatterns-better-convex
Best PracticesGeneral Convex patterns and guidelinespatterns-best-practices
TopicDescriptionReference
AgentsAI agents with tools and RAGadvanced-agents
HTTP ActionsWebhooks and HTTP endpointsadvanced-http-actions
File StorageFile uploads, serving, storageadvanced-file-storage
Cron JobsScheduled background tasksadvanced-cron-jobs
MigrationsSchema evolution, data backfillsadvanced-migrations
ComponentsReusable Convex packagesadvanced-components
TopicDescriptionReference
Security CheckQuick security audit checklistsecurity-check
Security AuditDeep security review patternssecurity-audit

For most tasks in this project:

  1. Start with Better Convex patterns - See patterns-better-convex
  2. Use cRPC procedures - Not standard Convex functions
  3. Add validators - In packages/validators/ using Zod
  4. Use .output() with zid() - For proper type inference