Skip to main content
confect
_generated
api.ts
nodeApi.ts
nodeRegisteredFunctions.ts
registeredFunctions.ts
refs.ts
services.ts
auth.ts
crons.ts
http.ts
impl.ts
nodeImpl.ts
nodeSpec.ts
schema.ts
spec.ts
convex

confect/

_generated/

api.ts

Contains a single default Api export, which combines your database schema and spec. Pass this as the first argument to the Impl.make, GroupImpl.make, and FunctionImpl.make constructor functions when building your spec’s implementation.

nodeApi.ts

This file will only be generated if confect/nodeSpec.ts exists.
Contains a single default Api export, which combines your database schema and Node spec. Pass this as the first argument to the Impl.make, GroupImpl.make, and FunctionImpl.make constructor functions when building your spec’s implementation.

nodeRegisteredFunctions.ts

This file will only be generated if confect/nodeSpec.ts exists.
Contains a single default RegisteredFunctions export, which is a type-correct map of your Node actions, in the format that the Convex CLI can consume for bundling and deployment. You should never need to import this yourself—it is meant to be used internally by the Confect CLI for codegen in the convex/ directory.

registeredFunctions.ts

Contains a single default RegisteredFunctions export, which is a type-correct map of your Convex functions, in the format that the Convex CLI can consume for bundling and deployment. You should never need to import this yourself—it is meant to be used internally by the Confect CLI for codegen in the convex/ directory.

refs.ts

Contains a single default Refs export, which is a map of your Convex functions and their function names and args/returns Schemas. Use this to invoke your Convex functions from the client or inside Convex functions using the *Runner services (QueryRunner, MutationRunner, and ActionRunner).

services.ts

Contains Effect service wrappers for Convex platform capabilities, scoped to your app’s database schema. Use these in your function implementation handlers. See Services for a full list.

auth.ts

Optional Corresponds 1:1 with convex/auth.config.ts. Use this to configure auth.

crons.ts

Optional Corresponds 1:1 with convex/crons.ts. Use this to define cron jobs.

http.ts

Optional Expects a default Convex HttpRouter export. Construct this using Confect’s HttpApi.make and @effect/platform’s HTTP API modules.

impl.ts

Required Expects a default Impl export which implements the Spec in spec.ts. Remember that your Impl must be finalized with Impl.finalize.

nodeImpl.ts

Optional Expects a default Impl export which implements the Node actions Spec in nodeSpec.ts. Remember that your Impl must be finalized with Impl.finalize.

nodeSpec.ts

Optional Expects a default Spec export containing the interface of your Node actions API.

schema.ts

Required Expects a default DatabaseSchema export which specifies your Convex database table schemas.

spec.ts

Required Expects a default Spec export containing the interface of your Convex functions API. The files listed above are the fixed entry points that Confect requires or generates. For guidance on organizing the group spec, impl, and related files you create yourself, see File Naming Conventions.

Rules

  • Your confect/ directory should always be a sibling of your convex/ directory.
  • The confect/_generated/ directory is generated by the Confect CLI. You should never modify files in this directory directly.
  • Confect treats the convex directory as a codegen target. While using Confect, you should never modify files in the convex folder directly, except for tsconfig.json and convex.config.ts.