A deep dive into Void
By Flavio
Updated
Tagged: Cloudflare
Build and deploy full-stack Vite apps with Void, Hono, React, and Cloudflare D1. Learn typed routes, forms, migrations, authentication, and team hosting.
Void lets you put your frontend and backend in a single Vite project and deploy both to Cloudflare Workers. You write a route, import the database client, and Void handles creating the Cloudflare resources behind it.
VoidZero, the team behind Vite (now part of Cloudflare), open-sourced Void on October 15, 2026 under the MIT license at voidzero-dev/void. You get an SDK and a deployment CLI out of the box, plus an optional platform you can host for a team.
If you like Hono, that’s a great reason to give Void a look. Void uses Hono under the hood for server routing and middleware, so any time you’ve spent learning Hono’s request context carries straight over to a full app with a UI and a database.
We’re going to build a small reading list app where you can save articles to a server-rendered page and read them back through a typed JSON API. Once it’s running locally, we’ll deploy it to Cloudflare and put a password in front of it, then look at how hosting a shared Void platform works.
What Void adds to Vite
Vite already gives you the dev server and production builds. To turn that into a full-stack app, you still need server routes to handle requests and a database to store data.
Void fills that gap with a Vite plugin and a straightforward folder layout: API endpoints go in routes/, UI components live in pages/, and your database tables go in db/schema.ts.
Void splits the work across three pieces:
| Part | What it does |
|---|---|
| Void SDK | Routing, server-rendered pages, typed resource APIs, and framework adapters |
| Void CLI | Project setup, builds, provisioning, migrations, deployment, and operations |
| Void Platform | A shared Cloudflare deployment environment that admins run for other users |
You don’t need the platform part to get started. Deploying straight to your own Cloudflare account works out of the box.
In a native Void app, a request moves through the stack like this:
Browser
→ Cloudflare Worker
→ Hono middleware and a Void route or page loader
→ Database query
→ JSON response or rendered page
The browser never talks directly to D1. Everything goes through your server handlers, so you control what gets read and written.
You can also bring Void into an existing Vite-based framework. Your framework keeps its own routing and rendering, and Void wraps around it with resource APIs and deployment. The supported app types guide lists what works in each setup.
Where Hono fits
Hono is a JavaScript web framework built on the standard Request and Response APIs, and it’s what gives Void handlers their request context.
Here’s a complete API endpoint you can save as routes/api/health.ts:
import { defineHandler } from 'void'
export const GET = defineHandler((c) => {
c.header('Cache-Control', 'no-store')
return c.json({ status: 'ok' })
})
That file registers GET /api/health. The c argument is Hono’s context, so c.req gives you the incoming request and c.json() builds a JSON response.
You can also return a plain object from a handler and let Void turn it into JSON for you. Reach for Hono’s response helpers when you want a specific status code or a custom response.
Hono middleware works the same way. Even though Void ships with Hono internally, install hono directly in your project before importing from it:
npm install hono
With that installed, you can add a request logger in middleware/01.logger.ts:
import { logger } from 'hono/logger'
import { defineMiddleware } from 'void'
export default defineMiddleware(logger())
Global middleware runs in filename order, which is why numeric prefixes like 01. come in handy. If you only want middleware on one endpoint, pass it to that handler instead.
Check the Hono integration guide for more on helpers and middleware. If you haven’t used Hono before, my free Hono course walks through routing and request handling from scratch.
Create a project
First, make sure you’re running a Node.js version that meets Void’s Node requirement, either a patched recent LTS release or a newer supported one. Older Node versions will fail before the app even boots.
On macOS, install Node with Homebrew:
brew install node
On Omarchy, grab it through its package command:
omarchy pkg add nodejs npm
Verify which version your terminal picks up:
node --version
npm --version
Now create a fresh directory and install Void locally:
mkdir reading-list
cd reading-list
npm install -D void
npx void init
The wizard asks for a toolchain, a UI framework, a starter template, and a deployment target. Pick these options for our reading list:
- Vite as the toolchain, so the scripts call Vite directly.
- React as the Pages framework.
- Static Pages as the starter, since we’ll write our own database schema next.
- Cloudflare if you want to connect your account right away, or Skip deployment setup to keep things local for now.
Let the wizard install dependencies and initialize Git if it asks.
Vite+ is the default toolchain in the wizard. You can stick with it if you want, because npm run dev and npm run build work through the generated scripts either way and you don’t need a global Vite+ install.
If you’re using pnpm, Bun, or adding Void to an existing app, the quickstart walks through those setups.
Understand the project files
Out of the box, the React starter gives you a single page and your Vite config. Once we add the database and API files, the core of the project will look like this:
reading-list/
db/
schema.ts
migrations/
middleware/
01.logger.ts
pages/
index.server.ts
index.tsx
routes/
api/
health.ts
articles/
index.ts
[id].ts
vite.config.ts
void.config.ts
tsconfig.json
package.json
Here we’re using Void’s default root-level folders. If you prefer putting everything inside src/, set sourceDir: 'src' and stick to that layout.
The starter already configures the Vite plugins for you, so a minimal vite.config.ts for this React app looks like this:
import { defineConfig } from 'vite'
import { voidPlugin } from 'void'
import { voidReact } from '@void/react/plugin'
export default defineConfig({
plugins: [voidPlugin(), voidReact()],
})
voidPlugin() wires up Void’s server side, and voidReact() handles the React adapter and build setup. You don’t need to install another React Vite plugin on top of it.
Leave the generated void.config.ts in place too. That’s where Void keeps app and Cloudflare settings, while vite.config.ts handles build plugins. Whenever you’re curious about the other folders Void supports, they’re all listed in the project structure reference.
Define a D1 database
Each item in our reading list needs a title and a URL. We’ll store them in D1, Cloudflare’s managed SQLite database, which also runs locally without needing a separate database server installed on your machine.
Create db/schema.ts with the table definition and input validator:
import { integer, sqliteTable, text } from 'void/schema-d1'
import { createInsertSchema } from 'void/drizzle-zod'
export const articles = sqliteTable('articles', {
id: integer('id').primaryKey({ autoIncrement: true }),
title: text('title').notNull(),
url: text('url').notNull(),
})
export const insertArticleSchema = createInsertSchema(articles, {
title: (schema) => schema.trim().min(1).max(200),
url: (schema) => schema.url().max(2000).regex(/^https?:\/\//),
}).pick({ title: true, url: true })
Void bundles Drizzle’s schema helpers and query APIs, so you don’t have to install Drizzle separately for this.
The articles table describes what goes into SQLite, while insertArticleSchema checks what comes in from the browser. Since the database generates the ID, the validator only accepts title and url.
Titles made of spaces won’t pass validation, and URLs have to use http: or https:. That URL check also keeps anyone from sneaking in a javascript: link that would get rendered on the page. TypeScript catches mistakes in your editor, of course, but any client can hit your endpoints, so the server has to validate incoming data itself.
If the table syntax looks unfamiliar, my Drizzle introduction breaks it down, and Void’s database guide covers schema aliases and queries.
Generate and apply migrations
Your schema file describes the database structure you want, and a migration is the SQL that creates or updates the tables to match it.
Generate the first migration and apply it to your local D1 database:
npx void db generate
npx void db migrate
Void writes the SQL files and metadata into db/migrations/. Commit that whole folder alongside your schema. Open the generated SQL file once to make sure it creates the articles table with the columns you expect (a good habit for any migration, especially once you have real data and start renaming or dropping columns).
Whenever you want to peek at your local rows from the terminal, run:
npx void db execute 'SELECT * FROM articles'
Void also has db push to sync schema changes locally without writing migration files. That’s handy when you’re prototyping, though production deployments rely on checked-in migrations, so we’ll stick with generate and migrate here.
One heads-up about db seed: it wipes the development database before loading seed data rather than appending to what’s already there. The database CLI reference spells out which commands reset data and which leave it alone.
Load articles on the server
Any Void page can pair up with a .server.ts file that runs a loader on the server and passes its result straight into the UI.
Create pages/index.server.ts:
import { articles, insertArticleSchema } from '@schema'
import { defineHandler, type InferProps } from 'void'
import { db, desc } from 'void/db'
export const loader = defineHandler(async () => {
const rows = await db
.select()
.from(articles)
.orderBy(desc(articles.id))
.limit(100)
return { articles: rows }
})
export const action = defineHandler.withValidator({
body: insertArticleSchema,
})(async (_c, { body }) => {
await db.insert(articles).values(body)
})
export type Props = InferProps<typeof loader>
Here @schema is Void’s built-in alias for db/schema.ts, and db is the database client wired up to D1.
The loader fetches the latest 100 articles, and the action validates incoming form submissions and inserts them. When an action succeeds without returning a value, Void automatically re-runs the loader so the page updates with fresh data.
InferProps pulls the page’s prop types directly from the loader, so you don’t have to maintain a second TypeScript interface that drifts out of sync with your query. Because the page file imports it with import type, none of the database code ends up in the browser bundle.
If you’re using Vue, Svelte, or Solid instead of React, the loader documentation shows the same pattern plus how to defer slow data.
Build the page and form
Next, let’s build the page that lists those articles and gives you a form to add new ones. Replace pages/index.tsx with this:
import { Form, useForm } from '@void/react'
import type { Props } from './index.server'
export default function ReadingList({ articles }: Props) {
const form = useForm('/', { title: '', url: '' })
return (
<main>
<h1>Reading list</h1>
<p>Save articles you want to read later.</p>
<Form form={form}>
<p>
<label>
Title
<input
name="title"
value={form.data.title}
onChange={(event) => form.setData('title', event.target.value)}
required
maxLength={200}
/>
</label>
{form.errors.title && <span role="alert">{form.errors.title}</span>}
</p>
<p>
<label>
URL
<input
name="url"
type="url"
value={form.data.url}
onChange={(event) => form.setData('url', event.target.value)}
required
maxLength={2000}
/>
</label>
{form.errors.url && <span role="alert">{form.errors.url}</span>}
</p>
<button type="submit" disabled={form.pending}>
{form.pending ? 'Saving...' : 'Save article'}
</button>
{form.recentlySuccessful && <p role="status">Article saved.</p>}
</Form>
{articles.length === 0 ? (
<p>No articles saved yet.</p>
) : (
<ul>
{articles.map((article) => (
<li key={article.id}>
<a href={article.url}>{article.title}</a>
</li>
))}
</ul>
)}
</main>
)
}
useForm() picks up the expected input shape from the page’s action, and Form wires up submission and error handling. Field errors show up next to their inputs, and the submit button disables itself while a request is in flight.
HTML attributes like required and type="url" give instant feedback in the browser, while the server validator still has the final say on what gets saved.
Void renders the initial HTML on the server and takes over in the browser for interactions and action updates. Notice there’s no useEffect() fetching the initial list and no extra client state duplicating it.
The inputs also keep their values after you submit, so if validation fails you can fix a typo without retyping the whole form. If you want the fields to clear after a successful save, you can reset them once the action finishes.
For named actions, redirects, and the rest of the form API, see Actions & Forms.
Run the application
Start the dev server:
npm run dev
Open http://localhost:5173 in your browser to load the empty reading list.
Try saving an article with these values:
Title: Hono: a modern web framework for JavaScript
URL: https://flaviocopes.com/hono/
The new link shows up right away without a full page reload. Refresh the browser to make sure it’s still there, which confirms the row landed in D1.
Next, submit a title containing only spaces. The server rejects it and renders a field error next to the input, and fixing the title lets the submission go through.
Right now the reading list is shared across the whole app, with no user accounts or private lists. Before we deploy a personal copy, we’ll put a password gate in front of it.
Add a JSON API
Page loaders work great for the UI, and when another client needs the same data you can expose a JSON API right next to it.
Create routes/api/articles/index.ts:
import { articles, insertArticleSchema } from '@schema'
import { defineHandler } from 'void'
import { db, desc } from 'void/db'
export const GET = defineHandler(async () => {
return db
.select()
.from(articles)
.orderBy(desc(articles.id))
.limit(100)
})
export const POST = defineHandler.withValidator({
body: insertArticleSchema,
})(async (c, { body }) => {
const [article] = await db.insert(articles).values(body).returning()
return c.json(article, 201)
})
That file adds GET /api/articles and POST /api/articles. The POST handler reuses the exact same validator as our page action and responds with the new row and status 201.
With the dev server still running locally (before we add the password gate), query the list from a second terminal:
curl http://localhost:5173/api/articles
Add another article through the API:
curl -i http://localhost:5173/api/articles \
-H 'Content-Type: application/json' \
-d '{"title":"Drizzle ORM: an introduction","url":"https://flaviocopes.com/drizzle/"}'
Then send an invalid payload to check validation:
curl -i http://localhost:5173/api/articles \
-H 'Content-Type: application/json' \
-d '{"title":"","url":"invalid"}'
That last request comes back with 400. If you refresh the page in your browser, the article you created over the API shows up alongside the first one, since both use the same D1 table. Changes show up on the next loader run rather than pushing live into other open tabs.
Void’s server routing guide has the details on method exports, parameter validation, and per-route middleware.
Add a route parameter and a 404
Wrapping a filename in brackets like [id].ts defines a dynamic route. Let’s add one to fetch a single article by ID.
Create routes/api/articles/[id].ts:
import { articles } from '@schema'
import { HTTPException } from 'hono/http-exception'
import { defineHandler } from 'void'
import { db, eq } from 'void/db'
export const GET = defineHandler(async (c) => {
const id = Number(c.req.param('id'))
if (!Number.isSafeInteger(id) || id < 1) {
throw new HTTPException(400, { message: 'Invalid article ID' })
}
const [article] = await db
.select()
.from(articles)
.where(eq(articles.id, id))
.limit(1)
if (!article) {
throw new HTTPException(404, { message: 'Article not found' })
}
return article
})
The bracket syntax is Void’s file convention, and inside the handler you read the segment with Hono’s c.req.param('id').
An invalid ID returns 400, and a valid ID that doesn’t match any row returns 404. Returning the article only when it’s found keeps the inferred response type clean on the success path.
Test all three cases from your terminal:
curl -i http://localhost:5173/api/articles/1
curl -i http://localhost:5173/api/articles/999999
curl -i http://localhost:5173/api/articles/banana
Call the API with typed fetch
When you want to call your API from browser code, Void gives you a typed fetch client wired straight to your route definitions.
Inside an event handler, grabbing our articles looks like this:
import { fetch } from 'void/client'
const articles = await fetch('/api/articles')
const article = await fetch('/api/articles/:id', {
params: { id: '1' },
})
Pass the :id route pattern along with a params object, and the client sends the real HTTP request to /api/articles/1. It also parses the response for you instead of returning a raw browser Response, so there’s no .json() step afterward.
Sending a POST request works the same way. Pass a plain object as the body and Void serializes it automatically:
import { fetch } from 'void/client'
const article = await fetch('/api/articles', {
method: 'POST',
body: {
title: 'Hono on Cloudflare Workers',
url: 'https://flaviocopes.com/hono-cloudflare-workers/',
},
})
You don’t need to wire this into our reading-list form, since our page already handles reads and writes through its loader and action. This client is for when you want to talk to the API directly from client-side code.
TypeScript catches bad route paths or unsupported methods right in your editor, along with request bodies that don’t match your handler’s validator. Runtime checks like validating whether a string is a real URL still happen in the validator when the request runs.
If the server responds with an error status, the client throws a FetchError that you can catch to show feedback in the UI:
import { fetch, FetchError } from 'void/client'
try {
await fetch('/api/articles/:id', { params: { id: '999999' } })
} catch (error) {
if (error instanceof FetchError && error.status === 404) {
console.log('That article no longer exists')
} else {
throw error
}
}
Check the typed fetch reference for the full list of request options and error fields.
How Void discovers resources
Earlier we imported db from void/db without pasting a D1 database ID anywhere. Void scans your source files to figure out which bindings you’re using, wires them up locally, and provisions them when you deploy. If you’d rather point to an existing resource or override what Void infers, you can configure that explicitly.
Here are the main resource imports:
| Import | Resource |
|---|---|
void/db | D1 by default, or the configured SQL database |
void/kv | Workers KV |
void/storage | R2 object storage |
void/ai | AI access |
void/queues | Queue producers, alongside consumers in queues/ |
All of these belong in server code only. If a browser component needs that data, go through a loader or an API route.
Void scans standard directories and supported file types to detect these imports, so if you put server code in a custom folder, check the resource inference rules to make sure Void picks it up.
Leave the generated .void-wrangler.jsonc out of Git, since it’s only there for Cloudflare tooling. Do commit void.config.ts and void.lock.json when they’re generated, because the lock file tracks your resource IDs and migration history.
Protect a personal deployment
Right now our write API is wide open, so anyone who finds the URL can add links to the list. If this is just a personal tool, putting a shared password in front of it is all you need before deploying.
Void ships with a Basic Auth wrapper that leaves its own internal tooling endpoints alone. First, define the environment variables in env.ts:
import { defineEnv, string } from 'void/env'
export default defineEnv({
BASIC_AUTH_USERNAME: string(),
BASIC_AUTH_PASSWORD: string(),
})
Next, add the middleware in middleware/02.basic-auth.ts:
import { basicAuth } from 'void'
import { env } from 'void/env'
export default basicAuth({
username: () => env.BASIC_AUTH_USERNAME,
password: () => env.BASIC_AUTH_PASSWORD,
realm: 'Reading list',
})
Drop a .env file in the project root with BASIC_AUTH_USERNAME and BASIC_AUTH_PASSWORD for local development. Generate a strong password in your password manager and make sure .env stays out of Git.
Restart the dev server and reload the page, and the browser will prompt you to sign in. The same gate covers the article API too. When testing with curl, pass -u flavio (or whatever username you picked) and curl will prompt for the password.
Since browsers cache Basic Auth credentials automatically, we also want CSRF protection on form submissions so another site can’t submit requests on your behalf. Create middleware/03.csrf.ts:
import { csrf } from 'hono/csrf'
import { defineMiddleware } from 'void'
export default defineMiddleware(csrf())
Our form and API live on the same origin, so this setup works out of the box (if you ever add cross-origin clients later, you’ll need to update the origin rules).
This gives us a quick lock for a personal app without building a full user system. You can read more about how this wrapper works in the global middleware documentation.
Set production secrets
Your root .env file is only for local development. Void doesn’t upload it when you deploy, so you need to set your production secrets on the target itself.
If you haven’t connected your deployment account yet, run this first:
npx void connect --platform cloudflare
Then set the Basic Auth credentials on your deployment target:
npx void secret put BASIC_AUTH_USERNAME
npx void secret put BASIC_AUTH_PASSWORD
Paste each value when prompted. You can inspect your local config anytime with:
npx void env check
Any variable starting with VITE_ is a public build value that ends up in browser JavaScript, so never put passwords or API keys in one. Pass public production values through the build environment instead, since Void ignores .env client values during builds.
See the environment guide for schema validation and how server secrets differ from public build settings.
Build and deploy to Cloudflare
Before pushing the app live, generate Void’s route and page types and run your checks:
npx void prepare
npx tsc --noEmit
npm run build
Those generated types live in .void/. You’ll want to run prepare after a fresh clone and before running TypeScript checks in CI.
Commit your source files and generated migrations, and keep .env, node_modules/, .void/, and dist/ out of Git.
Now deploy to your Cloudflare account:
npx void deploy --platform cloudflare
Void builds the app, provisions the database, applies any pending migrations, and publishes everything. If you’re not signed in yet, it asks you to log in and pick an account, then prints the live URL.
Open that URL, log in through the password prompt, and save a link. Reload to make sure it persisted, and hit the API to verify that works too. Your local database rows stay on your machine, so provisioning production and running migrations starts you with a fresh table rather than copying your dev articles over.
Your app code stays the same whether you deploy straight to Cloudflare or use a Void platform. Native apps deployed directly can run inside Workers Free quotas, though each Cloudflare product you enable has its own availability and billing, and a team platform adds extra setup. The deployment guide walks through the differences between targets.
Logs, updates, and rollback
Once that first deploy saves your target, shipping updates is just:
npx void deploy
Whenever you change the database schema, generate a migration, inspect it, and apply it locally first. Void blocks the deploy if it spots schema changes without matching migrations.
To check on the live app and watch what’s happening, run the project commands:
npx void project status
npx void project logs
On a direct Cloudflare target, logs stream as a live tail, whereas a Void platform can retain log history and filter by time range.
If a release breaks something, you can roll back to an earlier deployment:
npx void project rollback
Rollbacks only restore your application code, not your database migrations. If a release dropped a column, rolling back to older code that still queries it will break. Whenever you can, make schema changes backwards-compatible so both the old and new versions of your app work against the same table.
You can check the project CLI reference for details on status, target-specific logs, and rollbacks. Here’s how the deploy and rollback flow works:
Deploy from GitHub
With a deployment target saved, Void can generate a GitHub Actions workflow for you:
npx void init --github
Read through the generated file before committing it. If you’re deploying straight to Cloudflare, add a CLOUDFLARE_API_TOKEN repository secret in GitHub Actions, scoped to the account and resources your app needs.
If your workflow runs TypeScript checks before deploying, put void prepare right after installing dependencies so the fresh CI runner has Void’s generated types.
Team platforms use a different credential setup. A standard self-hosted platform works with a scoped project deploy token in your workflow, and optional GitHub integrations add flows like OIDC. Grab the matching workflow from the deployment instructions for your target.
Add real user accounts
If more than one person is going to use this app and everyone needs their own private reading list, swap out the shared password for real user accounts.
Void’s built-in auth runs on Better Auth. In a native Void app on Cloudflare, you turn it on through auth imports or configuration.
For example, this complete routes/api/profile.ts requires a signed-in user:
import { defineHandler } from 'void'
import { requireAuth } from 'void/auth'
export const GET = defineHandler((c) => {
const user = requireAuth(c)
return { id: user.id, email: user.email }
})
On the frontend, auth from void/client gives you sign-up, sign-in, and sign-out methods, and importing it can enable email/password auth automatically.
To make our reading list private per user, requireAuth() is only the first step. You also need an owner ID column on each article so your page loaders, actions, and API endpoints filter reads by the signed-in user and set ownership on the server when saving a new link.
Once you turn on auth, generate your migrations again. Direct Cloudflare deployments expect Void’s managed auth tables to be in your checked-in migrations.
The full walkthrough is in the authentication guide. Void-managed auth is only for native Void apps on Cloudflare; if you’re using a framework integration or another runtime, use Better Auth directly.
Add storage and background work
Our reading list only needs D1, though Void exposes the rest of Cloudflare’s stack in the same way once your app grows.
For caching or simple settings, reach for Workers KV. A server helper can store a preferred page size like this:
import { kv } from 'void/kv'
await kv.put('settings:page-size', 20)
const pageSize = await kv.get<number>('settings:page-size')
Because KV is eventually consistent, leave anything that needs database queries or ownership checks in your SQL database.
For file uploads and exports, Void wraps R2 storage. Saving an exported reading list from the server looks like this:
import { storage } from 'void/storage'
await storage.put('exports/reading-list.json', JSON.stringify(articles), {
httpMetadata: { contentType: 'application/json' },
})
In that snippet, articles is the array of rows your handler pulled from the database. If you do per-user exports, choose keys carefully and enforce access on the server.
For background jobs, Queues let you hand off async work. Consumers live in queues/, and void/queues gives producers a typed interface derived from them. Make sure your consumers handle retries safely so a duplicate delivery never charges someone twice or sends the same message again.
Cron jobs live in crons/, where each file exports a schedule and a handler. Schedules don’t fire on their own during local development, so trigger them manually using the authenticated dev trigger Void prints when the server starts.
There’s also built-in support for AI APIs. In local development, Workers AI calls go through a remote binding, which means they need Cloudflare access and count against your account allowance (they won’t work offline).
Keep an existing framework
You don’t have to throw away your current framework to use Void.
Void has framework integrations for React Router, TanStack Start, SvelteKit, Nuxt, and Astro. The exact setup depends on how each framework runs its server build.
With Astro, for example, Void plugs into your Vite config next to Astro’s Cloudflare adapter. Any page that runs at request time needs to opt out of prerendering, and you’ll need the AsyncLocalStorage compatibility flag enabled. The Astro integration guide has the adapter’s generated-config path and runtime requirements.
Keep your regular Astro pages and endpoints and call the supported Void APIs from their server code. Astro won’t pick up native Void files like pages/index.server.ts.
Host a Void platform for a team
If you have a team deploying apps and don’t want to hand out Cloudflare account credentials to everyone, you can host a Void platform yourself.
One admin installs it inside the organization’s Cloudflare account and manages access and resource limits from there. Everyone else signs in through the platform and deploys only to the projects they’re allowed to touch.
You’ll need a few pieces in place before running the installer: Workers for Platforms, R2, Analytics Engine, a dedicated hosted PostgreSQL database, and a supported login provider. For production you’ll want a real domain, though workers.dev works fine for testing. PostgreSQL holds platform records like users and deployments, while individual apps can keep using D1.
This setup isn’t free. Workers for Platforms requires a paid Cloudflare plan, and you’ll pay separately for hosted PostgreSQL and your Cloudflare usage.
Start by generating a plan so you can see what will be created in your Cloudflare account:
npx void platform install --plan
Check the resources and credentials it lists, then run the installer:
npx void platform install
The wizard walks you through picking an account, configuring domains, connecting PostgreSQL, and setting up login. It asks for two sets of credentials: one for managing the installation itself, and another for provisioning apps at runtime. The prerequisites and installation guide walk through those details.
Once the platform is up, developers connect with the platform API URL their admin shares:
npx void connect https://api.your-team-domain.com
npx void deploy --platform void --project reading-list
Swap in your real platform URL, sign in, and follow the prompts to create or link a project.
Watch out for the difference between the full source repository and the standard core installation. Out of the box, the core platform gives you CLI deployments, shared access, resources, and retained logs. The user dashboard and managed GitHub builds are optional services outside that core install, and custom per-project domains aren’t available in it either. Check the platform feature comparison to see what each deployment target includes.
Using Void with a coding agent
Void bundles its Markdown docs right inside node_modules/void/docs/, so a coding agent can read documentation that matches the exact package version in your project.
When you run void init on a new project, it writes a small AGENTS.md and links skills for the supported agents it finds. On an existing project, it asks before changing your instructions and leaves everything outside its own section untouched. You’ll still want to add the reasoning behind your project’s own rules to that generated file.
Keep agent prompts focused by naming the exact files to edit and the checks to run:
Read node_modules/void/docs/guide/quickstart.md and the database guide.
Add an archive flag to our reading list. Keep the existing Hono middleware.
Validate the input on the server and generate a database migration.
Update the page loader and API so archived articles are hidden by default.
Run void prepare, TypeScript checks, and the production build.
Test archiving through the browser and check the API afterward.
Stop before deploying.
The generated route types catch mistakes across files early, though the agent still needs to test runtime behavior, especially authorization and migrations. See the coding-agent guide for where the bundled skills and instructions go.
What I would use Void for
The sweet spot for Void is a new internal app on Cloudflare that needs a UI, a few server endpoints, and a database. Something like a small inventory tool or a review dashboard, much like the reading list in this guide, gives it enough real work without pulling you into a heavy architecture.
Building on Hono is a big part of the appeal. Request handlers and middleware look the way you already expect, and Void takes care of wiring them into the build and deployment.
Start by deploying straight to your own Cloudflare account. Running a team platform only pays off once several people need shared deployments and someone owns keeping it running.
For a site like this blog, which already builds with Astro and runs on Cloudflare Pages, there’s no reason to swap out a working deployment setup. It’s much easier to evaluate a new SDK on a fresh app.
Limits to understand before choosing it
Void cuts out a lot of configuration, though your app still sits on top of Cloudflare’s services. D1, KV, and R2 behave the same way and keep their own limits.
Void can build standalone servers for Node.js, Bun, or Deno, but those targets don’t include Cloudflare bindings like D1, KV, R2, or Workers AI. If you ever moved our D1 reading list to a VPS, the Hono handlers would come along unchanged, while the database layer would have to be swapped out. The other-runtime guide covers how those targets work.
When you upgrade Void, keep the CLI, installed SDK, and adapters on compatible versions. Commit your dependency lockfile and check the migration notes before updating a production app.
If all you’re building is a small API with Hono and one binding, a direct Hono Worker may already be enough. Void pays off more when you use its page integration, typed APIs, and resource workflow together.
Build the reading list locally first. Test an empty list, a valid save, validation failures, and a missing article, then put the gate in place and repeat those checks at your deployed URL. If you want to learn the Cloudflare pieces underneath, the free Cloudflare Workers course builds an app from the platform APIs upward.
Want me to talk about your product? You can sponsor this site.
Related posts about cloudflare: