convex

Guide Convex backend implementation with type-safe schemas and validators.

17|1|Updated Nov 15, 2022
One-click install
npx skills add https://github.com/ThijmenGThN/next-leaflet --skill convex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex
Source: https://github.com/ThijmenGThN/next-leaflet/tree/main/.claude/skills/convex
Command: npx skills add https://github.com/ThijmenGThN/next-leaflet --skill convex

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Convex backend guide helps developers implement database queries, mutations, actions, real-time subscriptions, authentication, file storage, scheduling, and HTTP endpoints with type safety and best practices, reducing complexity and speeding development.

Core Features & Use Cases

  • Type-safe queries, mutations, and actions with built-in validators and types to ensure data integrity.
  • Real-time subscriptions, auto cache invalidation, and robust production patterns for reliable data flows.
  • Authentication, authorization checks, and secure deployment patterns across Convex backends.
  • End-to-end guidance for deployment, file storage, scheduling, and HTTP endpoints to simplify server-side work.

Quick Start

Install the Convex CLI, scaffold a project, and start defining queries, mutations, and actions using Convex function builders to quickly build a robust backend.

Frequently Asked Questions about convex

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build type-safe queries and mutations in a Convex backend?

Convex queries and mutations use built-in function builders with validators and types to ensure data integrity. Define queries to fetch data and mutations to modify it, leveraging Convex's type system to catch errors at development time and validate all inputs automatically.

What's the best way to implement real-time subscriptions in Convex?

Convex real-time subscriptions automatically push data changes to clients with built-in cache invalidation. Define subscription functions that return reactive data, and clients receive updates instantly when underlying data changes, eliminating manual polling.

How do I handle authentication and authorization in a Convex backend?

Convex provides authentication checks and authorization patterns built into function builders. Add auth guards to queries, mutations, and actions to verify user identity and permissions, ensuring only authorized users access or modify sensitive data.

Can I use Convex for scheduled tasks and HTTP endpoints?

Convex supports scheduling functions to run at specified intervals and HTTP endpoints to expose backend logic via REST. Use scheduling for recurring jobs like cleanup or notifications, and HTTP APIs to integrate with external services or webhooks.

What database operations does Convex support with schemas?

Convex provides type-safe schema definitions that map to database tables, enabling queries, mutations, and indexes. Define schemas upfront to enforce structure, then query with full type safety and use indexes to optimize performance for production workloads.

How do I deploy a Convex backend to production?

Convex deployment integrates with its CLI and hosting platform for production-ready backends. Push your functions and schemas, and Convex handles scaling, database management, and real-time synchronization automatically across edge locations.