Develop
Repository
An npm workspace: two apps and three packages. How to check, test and build it, and what CI runs on every push.
Layout
| Path | What |
|---|---|
| apps/dashboard | The dashboard (TanStack Start, React, Kumo) and the Worker's entry, src/server.ts, which exports every Durable Object class |
| apps/docs | This site, deployed as its own Worker, vado-docs |
| packages/server | The database: router, shards, replication, catalog, admin and the bench API |
| packages/client | bindingConnector for ioredis over a service binding, and vado-shim |
| packages/wasm | The Valkey and Redis wasm builds: patches, build scripts and the committed binaries |
| test/ | End-to-end tests against a deployed Worker |
| tools/oxlint | The vendored anti-slop lint plugin |
Commands
npm install
npm run dev # the dashboard and database on http://localhost:5173
npm run docs # this site
npm run check # format, lint (oxlint with anti-slop) and type-check
npm test # unit tests, in plain Node
npm run build # build the Worker
npm run deploy # build, then deploy itThe Worker's wrangler.jsonc stays at the repository root, where the Deploy to Cloudflare button reads it, with main pointing at apps/dashboard/src/server.ts. npm run deploy builds apps/dashboard, then deploys the generated config in apps/dashboard/dist/server.
End-to-end tests
test/e2e.sh runs every check against a deployed Worker on fresh databases: stock ioredis, RESP3, chunked requests, WATCH across a reset, 1 shard against N, the hammer's invariants, and the bench durability, replica and drop checks.
npx vado-shim wss://<your-worker>.workers.dev/ws 6379 &
BASE=https://<your-worker>.workers.dev TOKEN=<BENCH_TOKEN> PW=<VALKEY_PASSWORD> test/e2e.shFLAVOUR=redis runs it on Redis, if the Worker carries it. HOST and PORT point it at another TCP address, such as a Spectrum application.
Continuous integration
| Workflow | Runs |
|---|---|
| ci.yml | Every push and pull request: check, unit tests and a build |
| wasm.yml | Changes under packages/wasm: rebuilds Valkey and Redis and fails unless the bytes and the host interface match the committed ones |
| e2e.yml | Pushes to main: deploys to a throwaway Worker, vado-e2e, and runs test/e2e.sh on both servers. Off until the repository has CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID and the variable E2E=on |
| valkey-release.yml | Weekly: opens an issue when a newer Valkey is out, with a test build's results |
The wasm builds
WASI_SDK=/path/to/wasi-sdk-34.0 packages/wasm/valkey/build.sh
WASI_SDK=/path/to/wasi-sdk-34.0 packages/wasm/redis/build.shEach build downloads a pinned, checksummed release, applies its patches in order, compiles with the shared WASI shims and runs wasm-opt. The same toolchain gives the same bytes on any machine. interface.txt lists what the host must provide and may call, so a patch that changes that contract shows up as a diff of names. Changes to a server go in its patches, never in a branch in the TypeScript.
Code rules
TypeScript, strict, with no lint suppressions. At most 250 lines a file. Each directory keeps its types in types.ts and its tunables in config.ts. Few comments, only the why the code can't show. The invariants every change must keep are in AGENTS.md.