What problem does it solve?
Many Convex backends repeatedly reimplement common backend patterns like relationship loading, access control, session tracking, migrations, and triggers; this guide shows how to adopt a shared utilities library to reduce boilerplate, improve safety, and enforce consistent data protection across functions.
Core Features & Use Cases
- Relationship helpers for loading related documents and composing nested responses without complex ad-hoc queries.
- Custom function wrappers for enforcing authentication, authorization, multi-tenant scoping, and role-based access control in a type-safe way.
- Filter helpers, session utilities, Zod validation integration, migration tooling, triggers, and aggregation helpers for production workflows.
- Use cases include building multi-tenant APIs with automatic auth injection, tracking anonymous sessions for guest carts, running safe backfills, and implementing event-driven notifications.
Quick Start
Install the convex-helpers package and import the custom function wrappers and relationship utilities to replace repetitive auth checks and related-data lookups.