Skip to content

Setup Guide

Configure the required services and environment variables to run Extract Content.

Configuration Required
This app requires external services to function. Set up the following before deploying.
Cloudflare Browser Rendering
Cloudflare KV (2 namespaces)
Convex (authentication)
Resend (email OTP)
CF
Cloudflare API
Required for Browser Rendering API access
BROWSERWorker SecretRequired
Docs

Browser Rendering binding. Declared in wrangler.jsonc — no API token needed when using the binding.

Example:"browser": { "binding": "BROWSER" }
CLOUDFLARE_ACCOUNT_IDWorker SecretRequired
Docs

Your Cloudflare account ID. Found in the Cloudflare dashboard sidebar.

Example:a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
KV
Cloudflare KV
Key-value storage for caching and rate limiting
CONTENT_CACHEWorker SecretRequired
Docs

KV namespace for caching extracted content. Create in Workers & Pages > KV.

Example:extractcontent-cache
RATE_LIMITWorker SecretRequired
Docs

KV namespace for rate limiting. Create a separate namespace for this.

Example:extractcontent-rate-limit
CX
Convex
Backend for user authentication and data
NEXT_PUBLIC_CONVEX_URLFrontend EnvRequired
Docs

Your Convex deployment URL. Found in Convex dashboard after deploying.

Example:https://your-project.convex.cloud
CONVEX_DEPLOY_KEYWorker SecretOptional
Docs

Convex deploy key for CI/CD. Found in Convex dashboard > Settings.

Example:prod:your-project|abc123...
RS
Resend
Email service for OTP authentication
RESEND_API_KEYConvex EnvRequired
Docs

Resend API key for sending login codes. Get from the Resend dashboard.

Example:re_abc123...
RESEND_FROM_EMAILConvex EnvRequired
Docs

Verified sender email address or domain in Resend.

Example:noreply@yourdomain.com
ALLOW_DEV_OTPConvex EnvOptional

Local development only. Returns the login code in the API response so you can sign in without email. Never set this in production.

Example:true
Setup Steps
1

Enable Cloudflare Browser Rendering

Go to Workers & Pages → Browser Rendering in your Cloudflare dashboard and enable the feature.

2

Create KV Namespaces

Create two KV namespaces: one for content caching and one for rate limiting. Add them to wrangler.jsonc.

3

Set up Convex

Run npx convex dev to initialize and deploy your Convex backend.

4

Configure Resend

Create a Resend account, verify your domain, and add the API key to your Convex environment variables.

5

Deploy

Run npm run deploy to build and deploy to Cloudflare Workers.

wrangler.jsonc KV Bindings
Add these to your wrangler.jsonc file
{
  // ... other config
  "kv_namespaces": [
    {
      "binding": "CONTENT_CACHE",
      "id": "<your-cache-namespace-id>"
    },
    {
      "binding": "RATE_LIMIT", 
      "id": "<your-rate-limit-namespace-id>"
    }
  ]
}
.env.local (Frontend)
Create this file in your project root for local development
# Convex
NEXT_PUBLIC_CONVEX_URL=https://your-project.convex.cloud