🎯

moai-platform-convex

🎯Skill

from modu-ai/moai-rank

VibeIndex|
What it does

Enables building TypeScript-first real-time collaborative apps with reactive queries, optimistic updates, and server functions using Convex backend platform.

πŸ“¦

Part of

modu-ai/moai-rank(43 items)

moai-platform-convex

Installation

Install ScriptRun install script
curl -LsSf https://modu-ai.github.io/moai-adk/install.sh | sh
Install ScriptRun install script
curl -LsSf https://astral.sh/uv/install.sh | sh
git cloneClone repository
git clone https://github.com/your-org/moai-rank.git
BunRun with Bun
bun install
BunRun with Bun
bun run db:generate

+ 4 more commands

πŸ“– Extracted from docs: modu-ai/moai-rank
6Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

>

Overview

# Convex Real-time Backend Specialist

Convex is a real-time reactive backend platform with TypeScript-first design, automatic caching, and optimistic updates.

---

Quick Reference

When to Use Convex

Use Convex for real-time collaborative applications including docs, whiteboards, and chat. Choose Convex for apps requiring instant UI updates without manual refetching. Select Convex for TypeScript-first projects needing end-to-end type safety. Use Convex for applications with complex optimistic update requirements.

Core Concepts

Server Functions include queries for read operations, mutations for write operations, and actions for external API calls.

Reactive Queries automatically re-execute when underlying data changes.

Optimistic Updates provide instant UI updates before server confirmation.

Automatic Caching provides built-in query result caching with intelligent invalidation.

Quick Start

Initialize a new Convex project using npm create convex@latest. Start the development server with npx convex dev.

Context7 Library

Use mcp__context7__resolve-library-id with "convex" to get the library ID, then use mcp__context7__get-library-docs for latest documentation.

---

Module Index

This skill is organized into specialized modules for detailed implementation guidance:

Reactive Queries Module

Location: modules/reactive-queries.md

Covers real-time reactive query patterns including basic query structure, index-based queries, search indexes, pagination patterns, React integration with useQuery hooks, and optimistic updates.

Server Functions Module

Location: modules/server-functions.md

Covers mutations for write operations, actions for external API integration, internal functions for server-to-server calls, scheduled functions using crons, and HTTP endpoints for webhooks.

Authentication Integration Module

Location: modules/auth-integration.md

Covers Clerk integration, Auth0 integration, server-side authentication patterns, authorization and role-based access control, and session management.

File Storage Module

Location: modules/file-storage.md

Covers file upload workflows, storage URL generation, client-side upload with progress, file display components, and file management operations.

---

Implementation Guide

Project Structure

A Convex project contains a convex directory with _generated subdirectory for auto-generated types and API, schema.ts for database schema definition, a functions subdirectory for server functions organized by domain, optional http.ts for HTTP endpoints, and optional crons.ts for scheduled jobs. The src directory contains ConvexProvider.tsx for client setup.

Schema Definition

The schema.ts file imports defineSchema and defineTable from convex/server and v from convex/values. The default export uses defineSchema to define tables. Each table is defined with defineTable specifying field types such as v.string(), v.boolean(), and v.number(). Tables can have indexes defined using the index method with index name and field array. Search indexes use the searchIndex method specifying searchField and filterFields.

Validators

The v module from convex/values provides primitive validators including v.string(), v.number(), v.boolean(), v.null(), v.int64(), and v.bytes().

Complex types include v.array() for arrays of a type, v.object() for objects with specified fields, v.union() for union types with v.literal() options, and v.optional() for optional fields.

Reference validators include v.id() for references to table documents.

React Client Setup

The ConvexProvider component imports ConvexProvider and ConvexReactClient from convex/react, ConvexProviderWithClerk from convex/react-clerk, and useAuth from @clerk/clerk-react. Create a ConvexReactClient instance with the VITE_CONVEX_URL environment variable. The Providers component wraps children with ConvexProviderWithClerk passing the client and useAuth hook.

React Hooks Usage

Import useQuery and useMutation from convex/react and api from the generated API module. In a component, call useQuery with the query function and parameters to get reactive data. Call useMutation to get a mutation function. Handle the undefined state during loading. Render the data and use the mutation function in event handlers.

---

Best Practices

Query Optimization:

  • Use indexes for all filtered queries
  • Prefer paginated queries for large datasets
  • Use search indexes for full-text search
  • Leverage automatic caching

Mutation Design:

  • Keep mutations focused and atomic
  • Use internal mutations for multi-step operations
  • Validate all inputs with the v module
  • Always check authorization

Error Handling:

  • Use ConvexError for structured errors
  • Check for undefined during loading states
  • Handle optimistic update rollbacks

---

Works Well With

  • moai-platform-supabase for alternative PostgreSQL-based backend
  • moai-lang-typescript for TypeScript patterns and best practices
  • moai-domain-frontend for React integration patterns
  • moai-platform-clerk for Clerk authentication patterns
  • moai-platform-auth0 for Auth0 authentication patterns

---

Resources

  • Official Documentation at docs.convex.dev
  • Context7 Library at /get-convex/convex
  • GitHub at github.com/get-convex/convex

---

Status: Production Ready

Version: 2.1.0

Last Updated: 2026-01-11

Platform: Convex Real-time Backend

More from this repository10

🎯
moai-lang-csharp🎯Skill

Enables comprehensive C# 12 and .NET 8 development with advanced support for ASP.NET Core, Entity Framework, and modern enterprise solutions.

🎯
moai-domain-backend🎯Skill

Designs and implements robust backend architectures with comprehensive API development, microservices, authentication, and modern server-side patterns across multiple frameworks.

🎯
moai-lang-javascript🎯Skill

Develops modern JavaScript projects with comprehensive support for Node.js, Bun, Deno, testing, linting, and backend frameworks across ES2024+ ecosystem.

🎯
moai-platform-firestore🎯Skill

Enables seamless Firebase Firestore integration, providing real-time sync, offline caching, security rules, and mobile-first NoSQL database management.

🎯
moai-workflow-testing🎯Skill

Orchestrates comprehensive software testing workflows with DDD testing, performance profiling, code review, and quality assurance across multiple development stages.

🎯
moai-foundation-quality🎯Skill

Enforces enterprise-grade code quality standards through TRUST 5 validation, proactive analysis, and automated best practices across multiple programming languages.

🎯
moai-lang-flutter🎯Skill

Enables advanced Flutter/Dart development with modern cross-platform patterns, Riverpod state management, and comprehensive mobile/desktop app capabilities.

🎯
moai-tool-ast-grep🎯Skill

Performs AST-based structural code search, security scanning, and refactoring across 40+ programming languages using syntax-aware pattern matching and transformations.

🎯
moai-lang-typescript🎯Skill

Enables advanced TypeScript development with React 19, Next.js 16, type-safe APIs using tRPC, Zod validation, and modern TypeScript patterns.

🎯
moai-domain-frontend🎯Skill

Develops modern web UIs with React 19, Next.js 16, Vue 3.5, implementing advanced component architectures and performance optimizations.