A fluent API builder for Convex functions with composable middleware, reusable chains, and plugin support. Current stable version 0.13.0, actively maintained with monthly releases. Key differentiators: onion-style middleware composition, full type inference across chains, cross-function-type middleware via `$context`, and official plugins (e.g., fluent-convex/zod). Unlike raw Convex functions, provides a developer-friendly chainable syntax and middleware abstraction. Requires peer dependencies convex ^1.31.0, zod ^3.25.0 || ^4.0.0, convex-helpers >=0.1.0.
npm install fluent-convexVerified import paths — ran on the pinned version, not inferred.
Creates a Convex query using fluent-convex with input validation and public registration. Demonstrates createBuilder, .query(), .input(), .handler(), and .public().
Use .$context<{ auth: Auth }>().createMiddleware() for cross-function-type middleware.Check changelog for any deprecations.
Use import syntax (ESM) or upgrade to Node 18+ with { "type": "module" }.Always pass your DataModel type to createBuilder<T>()
Install fluent-convex and ensure tsconfig has 'moduleResolution': 'node16' or 'bundler'
Use .$context<{ auth: Auth }>().createMiddleware() to create middleware that works across all function types.Import DataModel from your convex _generated folder and pass it: createBuilder<DataModel>()
Change to import syntax or set { "type": "module" } in package.json.