---
url: https://void.cloud/integrations/frameworks/overview.md
description: >-
  Keep your framework's routes and rendering, and use Void for databases,
  storage, jobs, and deployment.
---

# Meta-Frameworks

Use your framework’s routes and rendering with Void’s [database](../../guide/database.md), [storage](../../guide/storage.md), and [deployment](../../guide/deployment.md).

Add `voidPlugin()` to the framework’s Vite config. TanStack Start and React Router use the Cloudflare plugin included with Void. SvelteKit, Nuxt, Analog, and Astro use their own Cloudflare integrations.

![void relationships with meta frameworks and deployment targets](./void-relationships.svg)

## Supported Frameworks

| Framework                             | Package                 | Integration                                                                  |
| ------------------------------------- | ----------------------- | ---------------------------------------------------------------------------- |
| [TanStack Start](./tanstack-start.md) | `@tanstack/react-start` | Vite plugin composition. `voidPlugin()` runs alongside the framework plugin. |
| [React Router v7](./react-router.md)  | `@react-router/dev`     | Vite plugin composition. Setup matches TanStack Start.                       |
| [SvelteKit](./sveltekit.md)           | `@sveltejs/kit`         | Vite-based, uses its own Cloudflare adapter                                  |
| [Nuxt](./nuxt.md)                     | `nuxt`                  | Own CLI and build toolchain                                                  |
| [Analog](./analog.md)                 | `@analogjs/platform`    | Vite-based, uses Nitro with Cloudflare preset                                |
| [Astro **v7+**](./astro.md)           | `astro`                 | Own CLI and Cloudflare adapter (v7 required)                                 |

Detection is automatic. The CLI reads your `package.json` dependencies.

In vinext apps, `middleware.ts` and `proxy.ts` also apply to files in `public/`. When either file is present, static requests go through the Worker and count toward its request usage. Apps without middleware keep static asset delivery.

## Feature Support

* **Binding inference:** D1, KV, R2, AI, and queues are detected from source code.
* **Typed database:** query types come from your Drizzle schema.
* **Migrations:** local D1 is updated on dev startup, and migrations are validated and deployed with `void deploy`.
* **Runtime helpers:** [`void/db`](../../guide/database.md), [`void/kv`](../../guide/kv.md), [`void/storage`](../../guide/storage.md), and [`void/ai`](../../guide/ai.md) give you typed access to Cloudflare bindings in dev and production.
* **Environment variables:** TanStack Start, React Router, and vinext support validated values from [`void/env`](#environment-variables).
* **Auth:** Use Better Auth’s integration for your framework.
* **[Cron jobs](../../guide/jobs.md):** scheduled handlers via the `crons/` directory.
* **[Queue consumers](../../guide/queues.md):** typed producers and consumers via the `queues/` directory.
* **Revalidation and prerendering:** configure them with [`routing.revalidate`](../../guide/edge/revalidation.md) and [`routing.prerender`](../../guide/edge/prerendering.md) in `void.config.ts`.

To test a queue consumer in vinext, start the dev server and use the [manual queue trigger](../../guide/queues.md#local-development) with the port it prints and the token in `.void/dev-trigger-token`. Calling `send()` in dev or preview accepts the message without running the local consumer. Keep `queues/` and `env.ts` as they were at build time when using preview.

For framework apps, Void revalidation caches public HTML document responses with both `void deploy` and `void deploy --platform cloudflare`. Client data requests continue to use the framework's own behavior. A response with `Set-Cookie` or `Cache-Control: private`, `no-store`, or `no-cache` is never shared.

Frameworks can also access bindings directly via the framework's own mechanisms (e.g. `env` from `cloudflare:workers` in SvelteKit 3, Analog, and Astro, `platform.env` in SvelteKit 2, `event.context.cloudflare.env` in Nuxt).

## Configuration

### Environment variables

In TanStack Start, React Router, and vinext, import `env` from `void/env` to read values validated by your [`env.ts`](../../guide/env-vars.md) schema. Defaults, type conversions, and async validators work in both development and production.

Reading a missing or invalid value throws an error. Requests that do not read that value can still run. For other frameworks, use the framework's environment API.

### `void.config.ts`

Most configuration is inferred automatically. Use `void.config.ts` to override defaults or fine-tune behavior:

```ts
import { defineConfig } from 'void/config';

export default defineConfig({
  inference: {
    build: 'nuxt build',
    scanDirs: ['src', 'server', 'lib'],
    bindings: { db: 'MY_DB' },
  },
  routing: {
    prerender: ['/', '/about', '/pricing'],
    revalidate: 60,
  },
});
```

| Field                | Purpose                                                                   |
| -------------------- | ------------------------------------------------------------------------- |
| `inference.build`    | Override the default build command                                        |
| `inference.scanDirs` | Directories to scan for binding inference (defaults vary by framework)    |
| `routing.prerender`  | Paths to prerender as static HTML at deploy time                          |
| `routing.revalidate` | Default revalidation TTL in seconds for cached responses                  |
| `inference.bindings` | Enable, disable, or rename an inferred binding.                           |
| `routing.notFound`   | Configure unmatched routes in SvelteKit, Nuxt, Analog, or Astro directly. |

See [Configuration](../../reference/config.md) for the full reference.

### Cloudflare settings

Frameworks that use Cloudflare's dev runtime need their adapters pointed at Void's generated `.void-wrangler.jsonc`. Their setup guides show the adapter options. Define your Cloudflare settings in `void.config.ts`:

```ts
import { defineConfig } from 'void/config';

export default defineConfig({
  cloudflare: {
    name: 'my-app',
    compatibility_date: '2026-02-24',
    compatibility_flags: ['nodejs_compat'],
  },
});
```

For a project connected directly to Cloudflare, Workers AI runs remotely in development. [Sign in to Cloudflare](../../guide/ai.md#local-development) to use it.

Void combines these settings with inferred bindings and records provisioned resource IDs in `void.lock.json`. Commit both files.

## Deployment

Run `void deploy` to build with your framework and deploy to the selected target. See [Deployment](../../guide/deployment.md) for setup and CI.
