nimbus
ReferenceConvex

Convex project layout

Files that nimbus init convex creates, files the toolchain recognizes, and artifacts codegen generates.

The directory layout of a Convex-style Nimbus project: what nimbus init convex scaffolds, what the toolchain recognizes, and what codegen writes.

Directory tree

A project after its first nimbus dev run:

my-app/
├── convex/
│   ├── _generated/          # written by codegen — do not edit
│   │   ├── api.ts
│   │   ├── server.ts
│   │   ├── scheduled_functions.ts
│   │   └── dataModel.d.ts
│   ├── schema.ts            # scaffolded; optional
│   └── messages.ts          # scaffolded example functions
├── .nimbus/                 # local state — gitignored
│   ├── convex/              # codegen build artifacts
│   ├── dev/                 # dev-server data
│   └── packages/            # provisioned npm packages
├── .env.local               # written by nimbus dev — gitignored
├── .gitignore
├── package.json
└── tsconfig.json

Scaffolded files

FileContents
convex/schema.tsA messages table with author and body string fields and a by_author index.
convex/messages.tsExample list query and send mutation.
package.jsonDeclares "convex": "file:./.nimbus/packages/convex". No codegen dependency — codegen is embedded in the Nimbus binary.
tsconfig.jsontarget/module esnext, moduleResolution bundler, strict, noEmit, include: ["convex"].
.gitignoreIgnores .nimbus/, .env.local, and node_modules/.

Recognized files

FileRole
convex/schema.tsTable definitions. Optional: with no schema file the project compiles with zero tables, and tables accept documents of any shape. Must export default defineSchema(...).
convex/*.tsFunction modules. Exports registered with query, mutation, action, httpAction, or their internal variants become callable functions.
convex/http.tsThe only file HTTP routes are read from. Must export default a router initialized with httpRouter().
convex/auth.config.ts or .jsAuth provider list. Exactly one of the two extensions may exist. process.env reads resolve at codegen time.
convex.jsonProject configuration (see below).

convex.json

KeyValues
node.nodeVersion"20", "22", "24", or "26". Default "24". Applies to "use node" modules.
node.externalPackagesArray of package names left external to the bundle, or ["*"] (which must appear alone) for all packages.

Generated files

convex/_generated/ is rewritten by codegen on every run:

FileContents
api.tsThe api and internal function-reference trees.
server.tsRe-exports the function registrars (query, mutation, action, httpAction, internalQuery, internalMutation, internalAction, paginatedQuery, internalPaginatedQuery, plus defineSchema, defineTable, httpRouter) and the QueryCtx, MutationCtx, and ActionCtx types. paginatedQuery and internalPaginatedQuery are a Nimbus extension — not in upstream Convex.
scheduled_functions.tsReferences for schedulable (mutation) functions.
dataModel.d.tsDoc, Id, TableNames, and DataModel types derived from the schema, including the _id, _creationTime, and _updateTime system fields. _updateTime is a Nimbus extension — not in upstream Convex.

.nimbus/convex/ holds the build artifacts the server executes:

FileContents
functions.jsonFunction manifest.
schema.jsonCompiled schema.
http_routes.jsonRoutes parsed from convex/http.ts.
auth.config.jsonCompiled auth providers.
node_external_packages.jsonResolved external-package list.
bundle.mjsThe executable function bundle.
bundle.sha256Bundle digest, verified before every invocation.

Local state

PathContents
.nimbus/dev/Dev-server data directory (override with nimbus dev --data-dir).
.nimbus/packages/The Nimbus-provisioned convex npm package targeted by the file: dependency.
.env.localWritten by nimbus dev: NIMBUS_DEPLOYMENT=local:<slug> identifying the local deployment.

Environment variables

VariableMeaning
NIMBUS_DEPLOYMENTLocal deployment marker written to .env.local by nimbus dev.
NIMBUS_CODEGEN_RUNNERSet to external-node to run codegen through an external Node.js toolchain instead of the in-binary default (diagnostic use).

On this page