Extract the marketing/docs site into agentrelay.com

Merged
WI
4mo ago
+65276-1

Stands up agentrelay.com as the standalone front-door repo. Phase 1 of the
extract → relocate-router → consolidate-domains plan.

What's here

  • relay/web extracted with full git history preserved (git filter-repo,
    347 commits back to the genesis "Add OpenClaw SST app" commit — git blame/log intact).
  • web/ kept as a subdirectory under a workspace root so the router can join as a
    sibling in Phase 2; this also keeps the ../node_modules/.bin/sst CI invocation and
    the guard scripts' repo-root path math unchanged.
  • Ported deploy / preview / remove-stale-previews workflows + AWS/ACM guard
    scripts. App name stays relay-web so existing SST state and PR stages resolve.
  • Added vitest to web devDeps (it was a hoisted root dep in the monorepo).

Verified locally

  • npm install, next build, and 21/21 vitest tests pass standalone.

Incoming on this branch

  • Convert the deploy from sst.aws.Nextjs to OpenNext-on-Cloudflare
    (@opennextjs/cloudflare + sst.cloudflare.Worker, home: "cloudflare") so the
    front door is fully Cloudflare-native with no AWS dependency — following the
    in-house pattern already used by cloud/packages/web.

Not in this PR (later phases / your hand)

  • Wiring the new repo's GitHub Actions secrets/vars.
  • Deleting web/ from the relay monorepo (after this deploys green).
  • Router relocation + domain consolidation onto *.agentrelay.com.

🤖 Generated with Claude Code


Summary by cubic

Extracted the marketing/docs site into a standalone, Cloudflare‑native app for agentrelay.com using OpenNext. Adds richer docs/blog/brand experiences, allowlisted PostHog analytics, and production + per‑PR Cloudflare deployments.

  • New Features

    • web/ Next.js app built with @opennextjs/cloudflare (Wrangler) and Node 22 pinned via .nvmrc; workspace root proxies scripts to web/.
    • Ported and expanded pages: marketing home, docs, blog, Agents gallery (+ use cases), Primitives (auth, file, message, schedule), Pear product, OpenClaw skill (incl. invite), Brand Kit + Theme (adds /brand/theme), Process, Privacy/Terms/Telemetry.
    • Rich sharing and feeds: OG image routes for home/docs/blog and RSS at /feed.xml; stable Pear download redirect at /pear/download.
    • Docs UX: switched all docs links to next/link for client navigation and prefetch; smoother DocsNav scrolling (incl. wheel‑sync); language‑specific spawn options; markdown mirrors (/docs/<slug>.md, /agents.md, llm*.txt).
    • SEO: robots.ts and sitemap.ts tuned (AI crawler allowlist; remove generic /skill/invite, keep /openclaw/skill/invite); site metadata now points at agentrelay.com.
    • Analytics: manual, allowlisted PostHog pageview tracking with NEXT_PUBLIC_POSTHOG_KEY and configurable NEXT_PUBLIC_POSTHOG_HOST (defaults to https://i.agentrelay.com); GitHub stars badge server‑rendered to avoid flashes.
    • Routing hardening: removed public/docs assets to prevent /docs* static routing collisions in previews.
  • CI/CD

    • GitHub Actions build with OpenNext and deploy via Wrangler: production on main, previews on PRs, with concurrency guards and Node 22 cache.
    • Injects NEXT_PUBLIC_POSTHOG_KEY and NEXT_PUBLIC_POSTHOG_HOST at build; preview workflow restricted to same‑repo PRs.