Supported App Types
Void supports three types of apps:
- Void apps: Vite apps powered by Void's framework layer, including API routes, pages mode, auth, crons, and queues
- Meta frameworks: TanStack Start, React Router, SvelteKit, Nuxt, and Astro
- Static sites: SPAs, sites built with tools like VitePress, or any directory of static files
The type is auto-detected from your project structure, or you can set it explicitly in void.json.
Void Apps
A Vite app powered by Void's framework layer. In this mode, Void is both the framework and the platform. It is opinionated in the backend and deployment story, while still staying frontend-framework-agnostic. You can use it with React, Vue, Svelte, Solid, or any frontend that works with Vite.
All Void features that involve backend logic are available in this mode, including server routing, pages mode, authentication, typed fetch, cron jobs, and queues.
A Void app can be API-only (just routes/), a SPA + API (frontend in src/ with API routes), or full-stack with pages mode (server-rendered pages in pages/ with co-located data loading):
- pages/Server-rendered pages
- index.tsx
- users/
- [id].tsx
- [id].server.ts
- routes/API endpoints
- api/
- hello.ts
- db/Schema and migrations
- middleware/
- crons/
- queues/
- vite.config.ts
- void.json
Your worker handles API routes, page rendering, and (optionally) custom SSR. Static assets are served from the edge via per-worker assets. Cloudflare bindings (D1, KV, R2) are inferred from your source code and provisioned automatically.
Void apps can also use output: 'static' to pre-render all pages at build time. That gives you a fully static site that can be deployed anywhere, with no Cloudflare Worker required.
Deploy: void deploy builds via Vite, infers bindings, provisions D1/KV/R2 resources, applies migrations, uploads assets and worker, and makes the site live at {slug}.void.app. See Deployment for details.
Detected when any of these exist:
routes/directorypages/directorymiddleware/directorycrons/directoryqueues/directory- Custom SSR entry (
src/main.ssr.tsorsrc/main.ssr.tsx)
Meta Frameworks
Void supports deploying Vite-based meta-framework apps with void deploy. The framework owns routing and SSR. Void handles binding inference, typed DB queries, migrations, and deployment.
| Framework | Detected from package | Setup guide |
|---|---|---|
| TanStack Start | @tanstack/react-start | Guide |
| React Router v7 | @react-router/dev | Guide |
| SvelteKit | @sveltejs/kit | Guide |
| Nuxt | nuxt | Guide |
| Analog | @analogjs/platform | Guide |
| Astro | astro | Guide |
Add voidPlugin() to the framework's Vite config to get binding inference, typed DB generation, migration management, auth, cron jobs, queues, and caching. See the Meta Frameworks Integration for the full feature matrix, deploy pipeline, and per-framework setup guides.
Deploy: void deploy runs the framework build, packages the output, and deploys to Void. The framework still owns routing and SSR, while Void handles resource provisioning, migrations, and edge hosting.
Detected when any of the above packages is in your dependencies.
Pre-built Static Sites
Any project that produces static files, whether that is an SPA, a static site, or a plain directory. Assets are served directly from the edge, and a minimal passthrough worker is generated automatically. You do not need to write worker code yourself.
SPAs (client-side single-page apps) fall back all non-file paths to index.html with a 200 status, so client-side routing works out of the box. Detected when vite is a dependency and no backend files exist.
Static sites (static site generators like VitePress, Docusaurus, or any pre-built directory) produce per-page HTML files. Detected when a known SSG is a dependency, or when using the --dir flag.
At the edge, the resolution order is:
- Exact file path (
/styles.css→styles.css) - Nested index (
/about→about/index.html) 404.htmlwith status 404 (if the file exists)- Plain 404 response
Deploy: void deploy or void deploy --dir <path> uploads static files directly. Assets are served from the edge with automatic caching.
Auto-Detection
When running void deploy and no inference.appType is set in void.json, the detection logic runs in this order:
| Priority | Condition | Type |
|---|---|---|
| 1 | --dir flag | Static (or SPA with --spa) |
| 2 | Known SSG in dependencies (vitepress, @docusaurus/core) | Static, builds with SSG CLI |
| 3 | @tanstack/react-start, @react-router/dev, @sveltejs/kit, nuxt, @analogjs/platform, or astro in deps | Framework |
| 4 | Backend files exist (routes/, pages/, middleware/, crons/, queues/, SSR entry) | Void app |
| 5 | vite or vite-plus in dependencies, no backend files | SPA, builds with vite build or vp build |
| 6 | dist/index.html or ./index.html exists | Static (no build step) |
Explicit Configuration
To lock the app type and skip auto-detection, set inference.appType in void.json:
{
"inference": {
"appType": "static",
"outputDir": ".vitepress/dist"
}
}inference.appType:"void","framework","spa", or"static"inference.outputDir: output directory for static app types (relative to project root, defaults to"dist")