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.
Run any example
Section titled “Run any example”Every example uses the same two commands. Start the local development server, which watches your code and serves the app:
nimbus devThen deploy the app:
nimbus deploy [TARGET] --convex-silo demoTARGET 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.
The apps
Section titled “The apps”- React (
html) — a single-page React app onconvex/reactand generated_generated/api.tsrefs. It operates on amessagescollection and exercises live inserts, a paginated query with live invalidation, a scheduled mutation viactx.scheduler.runAfter(...), patch and delete, a livectx.db.get(id)detail query, and React error-boundary behavior for query errors. - Browser client (
http) — the samemessagescollection driven fromconvex/browser(ConvexHttpClient) without React. The composer submits through a Convex-style action that delegates to an internal mutation, can schedule that mutation, calls compiledhttpActionroutes, and reloads a message throughctx.db.get(id). - Node (
node) — a Node script using generated refs with bothConvexHttpClientfor point-in-time reads andConvexClientfor live subscriptions over an injected WebSocket implementation. It prints subscription updates as they land. - Tasks
— the shared tasks
task list, authored with
convex/_generated/serverandschema.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/CALLSnavigation, 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 withcrypto.subtle.digest;nodeDigests.ts("use node") hashes the same input withnode:crypto, and both agree.shareIds.tsuses the browser-safe npm packagenanoidfrom a default-runtime function. See the two Convex runtimes for what each runtime guarantees.
Run these in place, not copied out
Section titled “Run these in place, not copied out”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.