Skip to content

Commit 9a4855f

Browse files
authored
docs: Initial pass to reduce AI-wording. (#34)
1 parent b8cab67 commit 9a4855f

48 files changed

Lines changed: 396 additions & 400 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/.vitepress/config.ts‎

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -91,29 +91,20 @@ const integrationLinks = {
9191
items: integrationItems,
9292
};
9393

94-
const resourcesLinks = {
95-
text: "Resources",
96-
items: [
97-
{ text: "Recipes", link: "/recipes/", activeMatch: "/recipes/" },
98-
{ text: "Examples", link: "/examples/", activeMatch: "/examples/" },
99-
{ text: "Roadmap", link: "/roadmap/", activeMatch: "/roadmap/" },
100-
{ text: "Blog", link: "https://voidzero.dev/blog" },
101-
],
102-
};
103-
10494
const socialLinks = [
10595
{ icon: "x", link: "https://x.com/voidcloudhq" },
10696
{ icon: "discord", link: "https://discord.gg/cC6TEVFKSx" },
10797
{ icon: "github", link: "https://github.com/voidzero-dev/void" },
10898
];
10999

110-
const platformLinks = {
111-
text: "Platform",
100+
const companyLinks = {
101+
text: "Company",
112102
items: [
113103
{ text: "Company", link: "https://voidzero.dev" },
114-
{ text: "Features", link: "/platform/features" },
115-
{ text: "Pricing", link: "/platform/pricing" },
116-
{ text: "Enterprise", link: "/platform/enterprise" },
104+
{ text: "Blog", link: "https://voidzero.dev/blog" },
105+
{ text: "Terms of Service", link: "https://voidzero.dev/legal/terms" },
106+
{ text: "Privacy Policy", link: "https://voidzero.dev/legal/privacy" },
107+
{ text: "Acceptable Use Policy", link: "https://voidzero.dev/legal/acceptable-use" },
117108
],
118109
};
119110

@@ -147,8 +138,6 @@ export default extendConfig(
147138
{ text: "Guide", link: "/guide/", activeMatch: "/guide/" },
148139
referenceLinks,
149140
integrationLinks,
150-
// resourcesLinks,
151-
// platformLinks,
152141
// { text: "Dashboard", link: "https://dash.void.cloud" },
153142
],
154143

@@ -301,19 +290,18 @@ export default extendConfig(
301290
],
302291
},
303292
{
304-
title: "Resources",
305-
items: resourcesLinks.items,
306-
},
307-
{
308-
title: "Platform",
293+
title: "Open Source",
309294
items: [
310-
...platformLinks.items,
311-
// {
312-
// text: "Dashboard",
313-
// link: "https://dash.void.cloud",
314-
// },
295+
{ text: "Vite", link: "https://vite.dev" },
296+
{ text: "Vitest", link: "https://vitest.dev" },
297+
{ text: "Rolldown", link: "https://rolldown.rs" },
298+
{ text: "Oxc", link: "https://oxc.rs" },
315299
],
316300
},
301+
{
302+
title: companyLinks.text,
303+
items: companyLinks.items,
304+
},
317305
],
318306
social: socialLinks,
319307
},

‎docs/guide/ai.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ outline: deep
44

55
# AI
66

7-
Void provides a typed AI client powered by Cloudflare's [AI Gateway](https://developers.cloudflare.com/ai-gateway/), supporting both [Workers AI](https://developers.cloudflare.com/workers-ai/) models and third-party providers (OpenAI, Anthropic, Google, etc.) via bring-your-own-key. Import `ai` from `void/ai` and run inference models directly from your route handlers — all usage is metered via Void.
7+
Void provides a typed AI client powered by Cloudflare's [AI Gateway](https://developers.cloudflare.com/ai-gateway/). It supports both [Workers AI](https://developers.cloudflare.com/workers-ai/) models and third-party providers such as OpenAI, Anthropic, and Google through bring-your-own-key credentials. Import `ai` from `void/ai` and run inference directly from your route handlers. Usage is metered through Void.
88

99
```ts
1010
import { ai } from "void/ai";
@@ -29,11 +29,11 @@ export const POST = defineHandler(async (c) => {
2929
});
3030
```
3131

32-
You can use any model available on [Workers AI](https://developers.cloudflare.com/workers-ai/models/) — text generation, image classification, embeddings, translation, and more.
32+
You can use any model available on [Workers AI](https://developers.cloudflare.com/workers-ai/models/), including text generation, image classification, embeddings, translation, and more.
3333

3434
## Streaming
3535

36-
Use `ai.stream()` to get a streaming response with SSE headers — ready to return directly from a route handler:
36+
Use `ai.stream()` to get a streaming response with SSE headers that you can return directly from a route handler:
3737

3838
```ts
3939
import { defineHandler } from "void";
@@ -73,11 +73,11 @@ const result = await ai.toMarkdown([{ name: "document.pdf", blob: pdfBytes }]);
7373

7474
AI requires Void credentials for local development. Run `void auth login` and `void project link` (or follow the interactive setup during `vite dev`) to connect your project.
7575

76-
Once linked, credentials are injected automatically as worker bindings — no manual configuration needed. All inference traffic routes through the Void AI proxy over HTTPS, so usage is tracked and metered the same way as in production.
76+
Once linked, credentials are injected automatically as worker bindings. You do not need to configure them by hand. All inference traffic goes through the Void AI proxy over HTTPS, so usage is tracked and metered the same way it is in production.
7777

7878
## Usage Limits
7979

80-
Workers AI usage is metered in [**neurons**](https://developers.cloudflare.com/workers-ai/platform/pricing/) — Cloudflare's unit for inference cost. Usage resets at the start of each billing cycle.
80+
Workers AI usage is metered in [**neurons**](https://developers.cloudflare.com/workers-ai/platform/pricing/), which is Cloudflare's unit for inference cost. Usage resets at the start of each billing cycle.
8181

8282
| Plan | Included | At limit |
8383
| ---- | ------------- | ---------------------------------- |
@@ -89,7 +89,7 @@ On the **free tier**, AI requests return a `429` error once the limit is reached
8989

9090
## Third-Party Providers (BYOK)
9191

92-
You can use models from OpenAI, Anthropic, Google, and other providers by passing a `provider/model` identifier. Bring your own API key — add it as a project secret, and Void handles the rest. Third-party inference is billed directly by the provider — Void does not mark up API calls. All requests still route through AI Gateway for usage tracking on the dashboard.
92+
You can use models from OpenAI, Anthropic, Google, and other providers by passing a `provider/model` identifier. Bring your own API key, add it as a project secret, and Void handles the rest. Third-party inference is billed directly by the provider, and Void does not mark up API calls. Requests still route through AI Gateway so usage shows up on the dashboard.
9393

9494
### Usage
9595

@@ -111,7 +111,7 @@ export const POST = defineHandler(async (c) => {
111111

112112
The same `ai.run()` and `ai.stream()` methods work for both Workers AI and third-party models. The framework detects the provider from the model string and routes the request through [AI Gateway](https://developers.cloudflare.com/ai-gateway/) automatically.
113113

114-
The options follow each provider's conventions — all third-party providers use the OpenAI-compatible chat completions format (`messages`, `max_tokens`, `temperature`, etc.). TypeScript narrows the input and return types based on the model string: Workers AI models get per-model typed inputs from `@cloudflare/workers-types`, while third-party models (`"provider/model"`) get `ChatCompletionInputs` and `ChatCompletionResponse`.
114+
The options follow each provider's conventions. All third-party providers use the OpenAI-compatible chat completions format, including `messages`, `max_tokens`, and `temperature`. TypeScript narrows the input and return types based on the model string: Workers AI models get per-model typed inputs from `@cloudflare/workers-types`, while third-party models such as `"provider/model"` get `ChatCompletionInputs` and `ChatCompletionResponse`.
115115

116116
### Provider Key Convention
117117

@@ -158,7 +158,7 @@ If the key is missing at runtime, `ai.run()` throws a descriptive error telling
158158

159159
### Streaming with Third-Party Models
160160

161-
`ai.stream()` works the same way — the response is always SSE regardless of provider:
161+
`ai.stream()` works the same way. The response is always SSE regardless of provider:
162162

163163
```ts
164164
export const POST = defineHandler(async (c) => {

‎docs/guide/app-types.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ outline: deep
66

77
Void supports three types of apps:
88

9-
1. **Void apps** — Vite apps powered by Void's framework layer ([API routes](./server-routing.md), [pages mode](./pages-routing/overview.md), [auth](./auth.md), [crons](./jobs.md), [queues](./queues.md))
10-
2. **Meta frameworks** — [TanStack Start](https://tanstack.com/start/latest), [React Router](https://reactrouter.com/), [SvelteKit](https://svelte.dev/docs/kit), [Nuxt](https://nuxt.com/), [Astro](https://astro.build/)
11-
3. **Static sites** — SPAs, static sites like [VitePress](https://vitepress.dev/), or any directory of static files
9+
1. **Void apps:** Vite apps powered by Void's framework layer, including [API routes](./server-routing.md), [pages mode](./pages-routing/overview.md), [auth](./auth.md), [crons](./jobs.md), and [queues](./queues.md)
10+
2. **Meta frameworks:** [TanStack Start](https://tanstack.com/start/latest), [React Router](https://reactrouter.com/), [SvelteKit](https://svelte.dev/docs/kit), [Nuxt](https://nuxt.com/), and [Astro](https://astro.build/)
11+
3. **Static sites:** SPAs, sites built with tools like [VitePress](https://vitepress.dev/), or any directory of static files
1212

1313
The type is auto-detected from your project structure, or you can set it explicitly in [`void.json`](../reference/config.md).
1414

1515
## Void Apps
1616

17-
A Vite app powered by Void's framework layer. In this mode, **Void is both the framework and the platform** — an opinionated setup that unlocks DX perks unique to Void, while staying frontend-framework-agnostic. You can use it with React, Vue, Svelte, Solid, or any frontend that works with Vite.
17+
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.
1818

19-
All Void features that involve backend logic — [server routing](./server-routing.md), [pages mode](./pages-routing/overview.md), [authentication](./auth.md), [typed fetch](./typed-fetch.md), [cron jobs](./jobs.md), [queues](./queues.md) — are available in this mode.
19+
All Void features that involve backend logic are available in this mode, including [server routing](./server-routing.md), [pages mode](./pages-routing/overview.md), [authentication](./auth.md), [typed fetch](./typed-fetch.md), [cron jobs](./jobs.md), and [queues](./queues.md).
2020

2121
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):
2222

2323
<VoidAppFileTree annotations />
2424

2525
Your worker handles API routes, page rendering, and (optionally) [custom SSR](./ssr.md). Static assets are served from the edge via per-worker assets. Cloudflare bindings (D1, KV, R2) are [inferred from your source code](../reference/resource-inference.md) and provisioned automatically.
2626

27-
Void apps can also be configured with [`output: 'static'`](./ssg.md) to pre-render all pages at build time, producing a fully static site that can be deployed anywhere — no Cloudflare Workers required.
27+
Void apps can also use [`output: 'static'`](./ssg.md) 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.
2828

2929
**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](./deployment.md) for details.
3030

@@ -39,7 +39,7 @@ Void apps can also be configured with [`output: 'static'`](./ssg.md) to pre-rend
3939

4040
## Meta Frameworks
4141

42-
Void supports deploying Vite-based meta-framework apps via `void deploy`. The framework owns routing and SSR — Void handles [binding inference](../reference/resource-inference.md), [typed DB queries](./database.md), migrations, and deployment.
42+
Void supports deploying Vite-based meta-framework apps with `void deploy`. The framework owns routing and SSR. Void handles [binding inference](../reference/resource-inference.md), [typed DB queries](./database.md), migrations, and deployment.
4343

4444
| Framework | Detected from package | Setup guide |
4545
| --------------------------------------------------- | ----------------------- | ----------------------------------------------------- |
@@ -51,13 +51,13 @@ Void supports deploying Vite-based meta-framework apps via `void deploy`. The fr
5151

5252
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](../integrations/frameworks/overview.md) for the full feature matrix, deploy pipeline, and per-framework setup guides.
5353

54-
**Deploy:** `void deploy` runs the framework's build, packages the output, and deploys to Void. The framework owns routing and SSR — Void handles resource provisioning, migrations, and edge hosting.
54+
**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.
5555

5656
**Detected when** any of the above packages is in your dependencies.
5757

5858
## Pre-built Static Sites
5959

60-
Any project that produces static files — SPAs, static sites, or plain directories. Assets are served directly from the edge. A minimal passthrough worker is generated automatically — no user code is needed.
60+
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.
6161

6262
**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.
6363

@@ -70,7 +70,7 @@ At the edge, the resolution order is:
7070
3. `404.html` with **status 404** (if the file exists)
7171
4. Plain 404 response
7272

73-
**Deploy:** `void deploy` (or `void deploy --dir <path>`) uploads static files directly — no worker code needed. Assets are served from the edge with automatic caching.
73+
**Deploy:** `void deploy` or `void deploy --dir <path>` uploads static files directly. Assets are served from the edge with automatic caching.
7474

7575
## Auto-Detection
7676

‎docs/guide/auth.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Add a provider to `void.json`. Email/password is the default, so the simplest co
2424
}
2525
```
2626

27-
You can also skip this step entirely — auth activates automatically when you import from `void/auth` or `void/client`.
27+
You can also skip this step entirely. Auth activates automatically when you import from `void/auth` or `void/client`.
2828

2929
### 2. Sign up and sign in
3030

‎docs/guide/database.md‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const dbFileItems = [
3232

3333
# Database
3434

35-
Void provides a first-class [Drizzle ORM](https://orm.drizzle.team) integration. Define your schema as TypeScript, import a pre-wired Drizzle instance from `void/db`, and start querying — no extra install needed.
35+
Void provides a first-class [Drizzle ORM](https://orm.drizzle.team) integration. Define your schema in TypeScript, import the pre-wired Drizzle instance from `void/db`, and start querying. You do not need an extra install.
3636

3737
<FileTree :items="dbFileItems" default-expanded />
3838

@@ -86,7 +86,7 @@ export const users = pgTable("users", {
8686

8787
:::
8888

89-
Everything ships with `void` — there is nothing extra to install. You don't have to write this by hand — use `void gen model` or let your coding agent generate it.
89+
Everything ships with `void`, so there is nothing extra to install. You also do not have to write this by hand. Use `void gen model` or let your coding agent generate it.
9090

9191
You can also split your schema across multiple files under `db/schema/` and re-export from a barrel file:
9292

@@ -112,7 +112,7 @@ import { users } from "@schema";
112112
```
113113

114114
::: info What is `@schema`?
115-
`@schema` is a Vite path alias that the Void plugin configures automatically to point to your `db/schema.ts` file (or `db/schema/` directory). You don't need to set it up — just use it to import your table definitions.
115+
`@schema` is a Vite path alias that the Void plugin configures automatically. It points to your `db/schema.ts` file, or `db/schema/` if you split tables across files. You can just use it to import table definitions.
116116
:::
117117

118118
### List rows
@@ -301,7 +301,7 @@ export const insertUserSchema = createInsertSchema(users, {
301301

302302
:::
303303

304-
`createInsertSchema` generates a validator that matches `$inferInsert` — columns with defaults or auto-increments become optional, `NOT NULL` columns are required. The optional second argument refines individual columns — either via a callback that receives the auto-generated schema, or by passing a type directly to override the field.
304+
`createInsertSchema` generates a validator that matches `$inferInsert`. Columns with defaults or auto-increments become optional, while `NOT NULL` columns stay required. The optional second argument lets you refine individual columns, either with a callback that receives the generated schema or by passing a type directly to override a field.
305305

306306
Use the derived schema in your route handlers with [`withValidator()`](./server-routing.md#validation):
307307

@@ -321,11 +321,11 @@ export const POST = defineHandler.withValidator({
321321

322322
Three functions are available:
323323

324-
| Function | Purpose |
325-
| -------------------- | ------------------------------------------------------------------------- |
326-
| `createInsertSchema` | Validates insert data — excludes auto-generated columns, applies defaults |
327-
| `createSelectSchema` | Matches the shape of selected rows |
328-
| `createUpdateSchema` | Like insert but all fields are optional (partial update) |
324+
| Function | Purpose |
325+
| -------------------- | ----------------------------------------------------------------------------- |
326+
| `createInsertSchema` | Validates insert data, excluding auto-generated columns and applying defaults |
327+
| `createSelectSchema` | Matches the shape of selected rows |
328+
| `createUpdateSchema` | Like insert but all fields are optional (partial update) |
329329

330330
Void already bundles the Drizzle adapters. Install the validator library itself if you use its direct APIs in your schema file:
331331

@@ -356,17 +356,17 @@ See the [CLI reference](../reference/cli.md#database) for details.
356356

357357
## Scaffolding
358358

359-
The `void gen model` command scaffolds a Drizzle table definition and updates your barrel export. It generates dialect-appropriate code — `sqliteTable` for D1, `pgTable` for PostgreSQL:
359+
The `void gen model` command scaffolds a Drizzle table definition and updates your barrel export. It generates dialect-appropriate code: `sqliteTable` for D1 and `pgTable` for PostgreSQL.
360360

361361
```bash
362362
void gen model post title:string body:text published:boolean
363363
```
364364

365365
This creates:
366366

367-
1. `db/schema/post.ts` — a Drizzle table definition with `id`, `createdAt`, `updatedAt`, and your columns
367+
1. `db/schema/post.ts`: a Drizzle table definition with `id`, `createdAt`, `updatedAt`, and your columns
368368
2. Updates `db/schema.ts` with `export * from "./schema/post"`
369-
3. `routes/api/posts/index.ts` — GET (list) + POST (insert with validation)
370-
4. `routes/api/posts/[id].ts` — GET by id with 404 handling
369+
3. `routes/api/posts/index.ts`: `GET` for list and `POST` for insert with validation
370+
4. `routes/api/posts/[id].ts`: `GET` by id with `404` handling
371371

372372
See the [CLI reference](../reference/cli.md#code-generation) for the full list of generators.

0 commit comments

Comments
 (0)