Docs

Framework recipes

FrameworkRecipeProxy option
Next.js App Routernext-approute handler
Next.js Pages Routernext-pagesAPI route
React + Vite (any SPA)react-vitehost function or worker
AstroastroSSR endpoint or worker
WordPresswordpressREST route
Webflow and plain HTMLwebflow-htmlCloudflare Worker or CNAME
Shopifyshopifyapp proxy or worker
Anything elseotherany proxy recipe

Every recipe starts without a proxy – the snippet talks to the 3x API directly and works within minutes. The proxy is an optional second step that protects against ad blockers and keeps visitor separation exact (why).

How recipes are structured

Recipes are written in a fixed format so they can be rendered with real values: the dashboard's install page, GET /v1/setup/instructions, GET /v1/projects/{project}/setup/snippet and the MCP tools setup_get_instructions / setup_generate_snippet all read these pages.

  • Sections, in this order: ## Install, ## Verify, ## Proxy (optional), ## Consent, ## Events.
  • Code fences carry an info string lang path=<file> action=create|edit|append:
    • with a path, the block is file content (create a new file, edit an existing one – the block shows the relevant part, append to the end);
    • sh/bash blocks without a path are commands to run;
    • env/dotenv blocks are environment variables (KEY=VALUE); names containing KEY, SECRET, TOKEN or PASSWORD (without a public prefix such as NEXT_PUBLIC_) are secrets.
  • Placeholders are filled with the project's values:
PlaceholderValueDefault in these docs
{{PUBLISHABLE_KEY}}the project's publishable keypk_3x_YOUR_PUBLISHABLE_KEY
{{API_ORIGIN}}the 3x API originhttps://api.3x.example
{{PROXY_PATH}}first-party proxy path on your site/n3
{{PROXY_KEY_ENV}}env variable holding the proxy keyX3_PROXY_KEY

A test in packages/docs parses every recipe and fails the build when a section, an action or a placeholder is wrong, so the machine-readable form cannot rot.