Skip to content

Convex example apps

Runnable Convex apps that build on Nimbus’s Convex surface. Each one authors functions with convex/_generated/server and a convex/schema.ts and drives them from a stock Convex client — convex/react, convex/browser, or the Node client — against a local Nimbus server. Read the overview first if you have not scaffolded a project yet.

The apps live under examples/convex/ in the source repository. Run them in place from a checkout — see the copy-out note below before moving one elsewhere.

Every example uses the same two commands. Start the local development server, which watches your code and serves the app:

Terminal window
nimbus dev

Then deploy the app:

Terminal window
nimbus deploy [TARGET] --convex-silo demo

TARGET is a URL or a configured target name; omit it to target your local server. Each app also has standalone npm scripts — a convex:server:* support server paired with a convex:example:* dev server — listed in its README.

  • React (html) — a single-page React app on convex/react and generated _generated/api.ts refs. It operates on a messages collection and exercises live inserts, a paginated query with live invalidation, a scheduled mutation via ctx.scheduler.runAfter(...), patch and delete, a live ctx.db.get(id) detail query, and React error-boundary behavior for query errors.
  • Browser client (http) — the same messages collection driven from convex/browser (ConvexHttpClient) without React. The composer submits through a Convex-style action that delegates to an internal mutation, can schedule that mutation, calls compiled httpAction routes, and reloads a message through ctx.db.get(id).
  • Node (node) — a Node script using generated refs with both ConvexHttpClient for point-in-time reads and ConvexClient for live subscriptions over an injected WebSocket implementation. It prints subscription updates as they land.
  • Tasks — the shared tasks task list, authored with convex/_generated/server and schema.ts. Creates, toggles, and deletes are Convex mutations; the newest-first list is a reactive Convex query that updates without polling. It implements the full spec — create, list, toggle, delete, and the live update.
  • Showcase — a small app for exploring the developer console’s function source view: syntax-highlighted source, a symbol strip with DEFINES/CALLS navigation, and type-hover tooltips. Deploy it, then open a function’s Source tab in the console.
  • Runtimes — the two-runtime story side by side. digests.ts (default runtime) hashes with crypto.subtle.digest; nodeDigests.ts ("use node") hashes the same input with node:crypto, and both agree. shareIds.ts uses the browser-safe npm package nanoid from a default-runtime function. See the two Convex runtimes for what each runtime guarantees.

Every app in this directory declares "convex": "*". Inside this repository that resolves to Nimbus’s Convex compatibility package, which deliberately takes the official convex package name and convex binary so your code runs unchanged. Copy one of those apps out of the repository and npm install, and "convex": "*" instead resolves to the official Convex Cloud package from the npm registry, replacing Nimbus’s — including its convex binary.

That breakage is visible, not silent. The apps’ scripts run convex codegen --app ., but --app is a Nimbus-only flag that the official convex CLI rejects, so codegen fails loudly. And nothing quietly talks to Convex Cloud: the React client pins http://localhost:8080/convex/demo (with skipConvexDeploymentUrlCheck set), and the other apps keep their own local-server defaults.

Until a scaffolder that rewrites the convex dependency to a published Nimbus package ships, run every app in this directory from a checkout of the repository.