Use Convex Components to add isolated backend features and compose component APIs. Use for installing components, calling component APIs, authoring components, and handling component-specific...
npm i @convex-dev/<component>.convex/convex.config.ts:import { defineApp } from "convex/server";app.use(component); use app.use(component, { name: "custom" }) for multiple instances.npx convex dev to generate component code.components.<name> in convex/_generated/api.ctx.runQuery/Mutation/Action with components.<name>.<fn>.components.<name> exposes ONLY public component functions.Id types cross boundaries as string; You MUST NOT use v.id("table") for external tables._generated directory; You MUST use the app's components references.process.env directly.convex/http.ts.ctx.auth is NOT available inside component functions..paginate() is NOT supported inside components.convex-helpers paginator and usePaginatedQuery from convex-helpers if needed.convex.config.ts, schema.ts, functions, and _generated.defineComponent("name") defines component; use component.use(...) for child components.convex/components/ or any folder.@pkg/convex.config.js@pkg/_generated/component.js@pkg/test helperscreateFunctionHandle(api.foo.bar) to pass callbacks across boundaries.v.string() validators and cast back to FunctionHandle.convex-test using component schema/modules or provided test helpers.@pkg/test register helper.