Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/cloud/cloudflare.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ In this guide, we'll walk you through configuring Cloudflare as your default clo

:::

## SSR Worker (beta)

:::warning Availability

Zephyr’s **SSR Worker** runtime is currently **beta** and **only available on Cloudflare** using **Zephyr’s default (managed) Cloudflare integration**.

It is **not available** on Bring Your Own Cloud (BYOC) deployments (including custom/non-default integrations).

Learn more: **[SSR Worker (beta)](/reference/ssr-worker)**.
Using TanStack Start? See: **[TanStack Start](/meta-frameworks/tanstack-start)**.

:::

## Configure and Enable Cloudflare

<Steps>
Expand Down
75 changes: 75 additions & 0 deletions docs/meta-frameworks/tanstack-start.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: TanStack Start
description: Deploy TanStack Start (Cloudflare template) to Zephyr by adding the Zephyr TanStack Start Vite plugin.
head:
- - meta
- property: og:description
content: Deploy TanStack Start (Cloudflare template) to Zephyr by adding the Zephyr TanStack Start Vite plugin.
---

import { PackageManagerTabs } from '@rspress/core/theme';
import BuildAuthInfo from '../../components/build-auth-info.mdx';

# TanStack Start

If you created your app with the **TanStack Start CLI** and selected the **Cloudflare** deployment option, deploying to Zephyr is just adding the Zephyr TanStack Start plugin to your Vite build.

For the upstream CLI flow, see TanStack’s docs: **[TanStack Start (React) Quick Start](https://tanstack.com/start/latest/docs/framework/react/quick-start)**.

For Cloudflare-specific setup details (Wrangler config, Cloudflare Vite plugin, etc.), see: **[Cloudflare Workers: TanStack Start](https://developers.cloudflare.com/workers/framework-guides/web-apps/tanstack-start/)**.

:::info Prerequisites

- Finished our [Prerequisites](/getting-started/installation) setup guide
- Your organization is using **Zephyr’s managed Cloudflare integration** (the default integration)

:::

## Install

Add the plugin to your project:

<PackageManagerTabs command="add -D vite-plugin-tanstack-start-zephyr" />

## Configure Vite

In your `vite.config.ts`, import `withZephyrTanstackStart` and add it to the **end** of your `plugins` array (after TanStack Start):

```ts filename="vite.config.ts"
import { withZephyrTanstackStart } from 'vite-plugin-tanstack-start-zephyr';

export default defineConfig({
plugins: [
// ...your existing plugins (cloudflare(), tanstackStart(), react(), etc.)
withZephyrTanstackStart(),
],
});
```

:::warning Git is required

Zephyr derives your **Application UID** from your `package.json` and git context. Make sure your repo is initialized and has a remote (for example, GitHub).

:::

## Deploy

Run your production build:

```bash filename="Terminal"
npm run build
```

On the first run, you’ll be prompted to authenticate:

<BuildAuthInfo />

## SSR Worker (beta)

TanStack Start deployments on Zephyr use our **SSR Worker** runtime.

- This is currently **beta** and **only available on Cloudflare**
- It is **only available on Zephyr’s default (managed) Cloudflare integration**
- It is **not available on Bring Your Own Cloud (BYOC)** deployments

Learn more: **[SSR Worker (beta)](/reference/ssr-worker)**.
29 changes: 29 additions & 0 deletions docs/reference/ssr-worker.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: SSR Worker (beta)
description: Zephyr SSR Worker runtime for server-rendered deployments. Currently beta and Cloudflare-only on Zephyr's default integration.
head:
- - meta
- property: og:description
content: Zephyr SSR Worker runtime for server-rendered deployments. Currently beta and Cloudflare-only on Zephyr's default integration.
---

# SSR Worker (beta)

Zephyr’s **SSR Worker** is our runtime for serving **server-rendered** JavaScript applications at the edge. It runs your server entrypoint inside an isolate and serves the correct server/client assets for a deployed snapshot.

## Availability (important)

:::warning Beta + Cloudflare-only

- **Beta**: this feature is in active development and the API/behavior may change
- **Cloudflare-only**: currently available **only** on Cloudflare
- **Default integration only**: available **only** on Zephyr’s default (managed) Cloudflare integration
- **Not on BYOC**: not available on Bring Your Own Cloud deployments (including custom/non-default integrations)

:::

## How it relates to TanStack Start

When you deploy a TanStack Start project using the Zephyr TanStack Start plugin, Zephyr uploads an **SSR snapshot** (server + client bundles) and configures the SSR Worker to execute the server entrypoint.

See: **[TanStack Start](/meta-frameworks/tanstack-start)**.
11 changes: 10 additions & 1 deletion rspress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ const sidebar: Sidebar = {
{
text: 'Deployment Hooks',
link: '/features/deployment-hooks',
},
{
text: 'Structured File Logs',
link: '/features/file-logging',
},
Expand Down Expand Up @@ -210,6 +212,10 @@ const sidebar: Sidebar = {
text: 'Rslib',
link: '/meta-frameworks/rslib',
},
{
text: 'TanStack Start',
link: '/meta-frameworks/tanstack-start',
},
],
},
{
Expand Down Expand Up @@ -319,6 +325,10 @@ const sidebar: Sidebar = {
text: 'Architecture',
link: '/reference/architecture',
},
{
text: 'SSR Worker (beta)',
link: '/reference/ssr-worker',
},
{
text: 'IP Allowlists',
link: '/reference/allow-ip-addresses',
Expand Down Expand Up @@ -446,7 +456,6 @@ export default defineConfig({
},
],
}),
// @ts-expect-error Rspress plugin only accounts for stable not beta so there is type issues
withZephyr(),
],
});
Loading