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
| Topic | Description | Reference |
|---|---|---|
| Functions | Queries, mutations, actions with cRPC | core-functions |
| Schema | Database schema and validators | core-schema |
| Realtime | Subscriptions and optimistic updates | core-realtime |
Patterns
Section titled “Patterns”| Topic | Description | Reference |
|---|---|---|
| Better Convex | cRPC, folder structure, zid(), type inference | patterns-better-convex |
| Best Practices | General Convex patterns and guidelines | patterns-best-practices |
Advanced
Section titled “Advanced”| Topic | Description | Reference |
|---|---|---|
| Agents | AI agents with tools and RAG | advanced-agents |
| HTTP Actions | Webhooks and HTTP endpoints | advanced-http-actions |
| File Storage | File uploads, serving, storage | advanced-file-storage |
| Cron Jobs | Scheduled background tasks | advanced-cron-jobs |
| Migrations | Schema evolution, data backfills | advanced-migrations |
| Components | Reusable Convex packages | advanced-components |
Security
Section titled “Security”| Topic | Description | Reference |
|---|---|---|
| Security Check | Quick security audit checklist | security-check |
| Security Audit | Deep security review patterns | security-audit |
Quick Start
Section titled “Quick Start”For most tasks in this project:
- Start with Better Convex patterns - See patterns-better-convex
- Use cRPC procedures - Not standard Convex functions
- Add validators - In
packages/validators/using Zod - Use
.output()withzid()- For proper type inference
Documentation
Section titled “Documentation”- Primary: https://docs.convex.dev
- LLM-optimized: https://docs.convex.dev/llms.txt
- Better Convex: https://www.better-convex.com