Fullstack SDK for Cloudflare Workers, powered by Vite.
Add the Vite plugin to build APIs and server-rendered pages with typed access to databases, storage, and AI. Void detects the resources your code uses and provisions them when you deploy.
If you run a team platform, void platform also lets you give people access,
manage their projects, and investigate deployments from the terminal. Start with
Platform Administration.
The platform implementation is included in this repository. To change it or deploy a runtime from your own fork, follow Platform Development.
// vite.config.ts import { defineConfig } from 'vite'; import { voidPlugin } from 'void'; export default defineConfig({ plugins: [voidPlugin()], });
Use Node.js 24.21.0 or later for the CLI and build tools.
- Install the Void CLI:
mkdir your-project
cd your-project
pnpm add -D voidIn an empty project, void init asks which framework and starter you want, then installs the dependencies. It uses Vite+ by default. In an existing app, it adds missing scripts and configures the Vite plugin.
Init offers to initialize Git and suggests an optional initial commit command. Use --git or --no-git to choose without the Git prompt. Existing repositories are preserved; Void does not commit automatically.
Init also adds brief instructions to AGENTS.md, pointing coding agents to the bundled docs at node_modules/void/skills/void/docs/. Run void init --agents to add or refresh just the agent setup.
Then run:
pnpm void init pnpm dev # local dev with workerd runtime pnpm void deploy # deploy to the saved Cloudflare or Void target
To switch Cloudflare users, run void cloudflare login. Use void cloudflare status to check the signed-in identity and the project's pinned deployment account; signing in leaves the project target unchanged.
Already deploy the same Void app directly to Cloudflare? Run void deploy. If your project has a wrangler.jsonc or wrangler.json and no deployment destination, Void offers to link and deploy using the existing Worker and resources. Accept once, then use void deploy for future deployments. See Deploy an existing Worker.
- Install Void:
pnpm add -D void
- Enable the plugin in
vite.config.ts:
import { defineConfig } from 'vite'; import { voidPlugin } from 'void'; export default defineConfig({ plugins: [voidPlugin()], });
- Run the setup flow:
pnpm void init
- Deploy to the target selected during setup:
pnpm void deploy
- One CLI — deploy and manage your app on your Cloudflare account or your team's Void platform
- Team platforms — install a shared deployment service in your company's Cloudflare account and connect developers through the same CLI
- Automatic provisioning — use
void/db,void/kv,void/storage, orvoid/ai, and Void provisions the resources your app needs - Typed production secrets — schema-declared server keys are required in remote secret storage and rejected as plaintext Worker vars
- File-based routing — drop a file in
routes/, get an endpoint with method exports, dynamic params, middleware, and Standard Schema validation - Full-stack pages —
pages/directory for server-rendered UI with co-located data loading, SPA navigation, and typed forms (React, Vue, Svelte, Solid) - End-to-end type safety — SQL migrations generate DB types, route handlers infer return types, typed fetch client checks everything at the call site
- Typed durable state — modules in
durable-objects/get inferred SQLite-backed bindings and typed RPC methods - Local dev parity —
vite devruns handlers in the realworkerdruntime with local D1, KV, and R2
Full docs at void.cloud. Run vp run dev:docs in this repo to view the documentation locally.
Run void connect to choose a deployment destination and sign in, void connect --platform cloudflare for your own account, or void connect <url> for your team's platform. See the connection reference.
To install a shared company platform, follow Install a Void Platform. The walkthrough covers Cloudflare setup, a domain, PostgreSQL, credentials, and your choice of GitHub, Google, OIDC, or Cloudflare Access sign-in, then previews the installation with void platform install --plan. Void creates the core API, routing, proxy, and telemetry resources.
Platform upgrades verify migrations and check the new Workers before completing the rollout. If a rollout fails, Void can restore the previous Workers against the compatible database schema. See the platform guide for recovery and upgrade details.
For a test platform before your domain is ready, use void platform install --workers-dev. Later, void platform domain set example.com guides DNS setup and verifies HTTPS while preserving existing app URLs and the platform API connection.
git clone https://github.com/voidzero-dev/void.git
cd void
vp install
vp run build:allvp test run # run tests vpr test:all # format, lint, build, typecheck, and run every SDK/platform test vp lint # oxlint via Vite+ vp fmt # oxfmt via Vite+ vp run check # typecheck all packages vp run dev:docs # local docs dev server
See TESTING.md for targeted verification and the account-neutral, non-destructive native Cloudflare live E2E procedure.
Build the public packages and smoke-test their actual tarballs outside the workspace:
vp run build node .github/scripts/packed-consumer.mjs
The default smoke test uses a React app with npm and pnpm, public Vite, and HTTP
checks for assets and KV. Set VOID_PACKED_SUITE=full for all four native Pages
adapters, Markdown, production preview, and browser hydration/navigation tests.
The Prepublish Test workflow selects smoke coverage for routine code changes, full coverage
for packaging/dependency/adapter changes, and skip expensive jobs for docs-only changes.
Release CI always runs the full matrix on Linux and macOS.
The release acceptance procedure
separates these local checks from the credentialed Cloudflare signoff.
| Path | Purpose |
|---|---|
packages/void |
Core Vite plugin + CLI |
packages/deploy-core |
Shared deploy contracts, artifacts, planning, and target boundary |
packages/deploy-cloudflare |
Public direct-Cloudflare deployment primitives |
packages/platform |
Platform deployment manifests, naming, and lifecycle contracts |
packages/edge |
Shared edge routing and static asset runtime |
packages/isr |
Shared ISR protocol, core, and direct runtime |
packages/react |
React framework adapter |
packages/vue |
Vue framework adapter |
packages/svelte |
Svelte 5 framework adapter |
packages/solid |
SolidJS framework adapter |
platform/packages |
Hosted Void control plane, routing, proxy, logging, and dashboard |
docs |
Documentation (VitePress) |
playground/* |
Test apps for local development |
Public SDK packages must not import from platform/. Hosted platform packages may depend on public or shared workspace packages.
The documentation site deploys from main through the Void GitHub App using the
container executor. The root void.json configures the monorepo
as a static project that builds docs and publishes docs/.vitepress/dist.
There is no documentation deploy workflow or VOID_TOKEN repository secret.
Connect the repository once with:
void github connect void-docs \ --repo voidzero-dev/void \ --branch main \ --executor container
Release publishing still uses the Release GitHub environment with an
NPM_TOKEN secret via .github/workflows/publish.yml.
CI (ci.yml) runs on PRs to main and requires no secrets.
MIT