convex-schema-validator
Type-safe database schema definition with indexes, validation, and migration strategies for Convex.
- Supports 13+ validator types including strings, numbers, booleans, document references, arrays, objects, unions, and discriminated unions for flexible data modeling
- Enables single-field and compound indexes plus full-text search indexes for optimized query performance
- Provides optional and nullable field patterns with clear migration paths for adding required fields and backfilling data
- Includes nested objects, arrays of objects, and record types for complex data structures with full TypeScript type inference
Convex Schema Validator
Define and validate database schemas in Convex with proper typing, index configuration, optional fields, unions, and strategies for schema migrations.
Documentation Sources
Before implementing, do not assume; fetch the latest documentation:
- Primary: https://docs.convex.dev/database/schemas
- Indexes: https://docs.convex.dev/database/indexes
- Data Types: https://docs.convex.dev/database/types
- For broader context: https://docs.convex.dev/llms.txt
Instructions
Basic Schema Definition
More from waynesutton/convexskills
convex
Umbrella skill for all Convex development patterns. Routes to specific skills like convex-functions, convex-realtime, convex-agents, etc.
5.5Kconvex-best-practices
Guidelines for building production-ready Convex apps covering function organization, query patterns, validation, TypeScript usage, error handling, and the Zen of Convex design philosophy
3.1Kconvex-functions
Writing queries, mutations, actions, and HTTP actions with proper argument validation, error handling, internal functions, and runtime considerations
2.4Kconvex-realtime
Patterns for building reactive apps including subscription management, optimistic updates, cache behavior, and paginated queries with cursor-based loading
2.1Kconvex-cron-jobs
Scheduled function patterns for background tasks including interval scheduling, cron expressions, job monitoring, retry strategies, and best practices for long-running tasks
2.1Kconvex-http-actions
External API integration and webhook handling including HTTP endpoint routing, request/response handling, authentication, CORS configuration, and webhook signature validation
2.0K