From 7ef3e0ccc6ff7266927df41021160e6b08628869 Mon Sep 17 00:00:00 2001 From: BenStullsBets Date: Tue, 30 Jun 2026 07:23:57 -0700 Subject: [PATCH] =?UTF-8?q?plan:=20Cloudflare=20static=20publish=20?= =?UTF-8?q?=E2=80=94=20implementation=20plan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- .../2026-06-30-cloudflare-static-publish.md | 706 ++++++++++++++++++ 1 file changed, 706 insertions(+) create mode 100644 docs/superpowers/plans/2026-06-30-cloudflare-static-publish.md diff --git a/docs/superpowers/plans/2026-06-30-cloudflare-static-publish.md b/docs/superpowers/plans/2026-06-30-cloudflare-static-publish.md new file mode 100644 index 0000000..f0630a1 --- /dev/null +++ b/docs/superpowers/plans/2026-06-30-cloudflare-static-publish.md @@ -0,0 +1,706 @@ +# Cloudflare Static Publish — Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Publish the simulator as a fully-static site (no origin server) to `benstull.art/human-experience-simulator` on Cloudflare Pages, with media on R2. + +**Architecture:** Port the only live server logic (`/api/alteration`, the delta=0 random pick) to client JS; serve the read-APIs as baked JSON; point media at a configurable R2 base with CORS; keep the existing graduated prefetch. A Python build script emits `dist/` (Pages) + a media sync tree (R2). The dev FastAPI server stays for localhost/authoring. + +**Tech Stack:** Vanilla JS (UMD modules, `node --test`), Python 3 build script (imports existing `simulator`/`player` builders), Playwright E2E, `wrangler` (Pages + R2), Cloudflare redirect rule. + +## Global Constraints + +- **Path:** app served at `/human-experience-simulator`; apex `benstull.art` **redirects** there. +- **Media base:** `https://static.benstull.art/` (R2 custom domain), public bucket. +- **CORS is load-bearing:** R2 must send `Access-Control-Allow-Origin: https://benstull.art`; `