From 6ba53b44f36f66f340d5608963c9639955afa706 Mon Sep 17 00:00:00 2001 From: Matthew Berman <748450+mberman84@users.noreply.github.com> Date: Sun, 21 Jun 2026 18:14:43 -0700 Subject: [PATCH] Route database pages through here.now proxy --- .github/workflows/ci.yml | 1 + AGENTS.md | 14 +++++----- scripts/check.mjs | 31 +++++++++++++++------- site/.herenow/proxy.json | 44 ++++++++++++++++++++++++++++++ worker/src/loop-routes.js | 19 ++++++++++--- worker/test/loop-routes.test.js | 47 +++++++++++++++++++++++++++++++++ worker/wrangler.jsonc | 11 +------- 7 files changed, 137 insertions(+), 30 deletions(-) create mode 100644 site/.herenow/proxy.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e745259..41d3636 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,7 @@ jobs: node --check site/script.js node scripts/check.mjs python3 -m json.tool site/.herenow/data.json >/dev/null + python3 -m json.tool site/.herenow/proxy.json >/dev/null python3 -m json.tool scripts/seo-geo-query-benchmark.json >/dev/null git diff --check diff --git a/AGENTS.md b/AGENTS.md index d48eac7..22c4154 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -129,12 +129,14 @@ curl -sS "https://here.now/api/v1/publishes/{slug}/data/weekly_signups?limit=50" private bootstrap bundle, verify all canonical database surfaces, and only then deploy the content-free here.now shell. Never publish the empty shell before the database catalog is active. -- The exact Worker routes at `signals.forwardfuture.ai/loop-library` and - `signals.forwardfuture.ai/loop-library/*` render database content and pass - site-shell assets through to the explicit `PUBLIC_ORIGIN_URL` here.now - hostname. Update that variable if the backing Site changes. Verify the - canonical URL for database content and the backing here.now Site for the - static shell before reporting success. +- The here.now Site proxy manifest routes the mounted homepage, loop pages, + catalogs, feed, sitemap, and public catalog API to the Worker. The Worker + renders database content and reads the static homepage shell from the + explicit `PUBLIC_SHELL_URL`; other shell assets remain on the backing Site. + Update `PUBLIC_ORIGIN_URL`, `PUBLIC_SHELL_URL`, and the proxy manifest if the + backing Site or Worker hostname changes. Verify the canonical URL for + database content and the backing here.now Site for the static shell before + reporting success. - After a production content deployment, submit `https://signals.forwardfuture.ai/loop-library/sitemap.xml` in Google Search Console and Bing Webmaster Tools. Verify that the custom domain's root diff --git a/scripts/check.mjs b/scripts/check.mjs index 6f6043e..947ad05 100644 --- a/scripts/check.mjs +++ b/scripts/check.mjs @@ -15,6 +15,7 @@ const [ css, browserScript, dataSource, + proxySource, workerSource, loopRoutesSource, catalogStoreSource, @@ -33,6 +34,7 @@ const [ readFile(path.join(siteRoot, "styles.css"), "utf8"), readFile(path.join(siteRoot, "script.js"), "utf8"), readFile(path.join(siteRoot, ".herenow", "data.json"), "utf8"), + readFile(path.join(siteRoot, ".herenow", "proxy.json"), "utf8"), readFile(path.join(workerRoot, "src", "index.js"), "utf8"), readFile(path.join(workerRoot, "src", "loop-routes.js"), "utf8"), readFile(path.join(workerRoot, "src", "catalog-store.js"), "utf8"), @@ -50,6 +52,7 @@ const workerPackage = JSON.parse(workerPackageSource); const workerLock = JSON.parse(workerLockSource); const wrangler = JSON.parse(wranglerSource); const dataManifest = JSON.parse(dataSource); +const proxyManifest = JSON.parse(proxySource); const structuredDataMatch = html.match( /