Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

curiousgeorge.dev

George Vlachos's logbook. Astro 7 on Cloudflare Workers, D1 for the living content.

  • Spec: docs/superpowers/specs/2026-10-03-personal-site-redesign-design.md
  • Decisions: docs/adr/
  • Plans: docs/superpowers/plans/

Develop

bun install
bun run db:migrate:local
bun run seed:media --local
bun run seed:snapshots --local
bun run dev

Check everything (what CI runs)

bunx playwright install chromium webkit   # once per machine
bun run check

The admin page

/admin sits behind Cloudflare Access, and the Worker also requires the token's email to be ADMIN_EMAIL (wrangler.jsonc, ADR-0016); the page shows the day the Access session ends, or on its last day the time (until 14:30). Locally, bun run dev:admin skips Access with a test-only build flag that production builds refuse. Saves say "it's on the logbook now" there, because the dev server's cache accepts the purge and does nothing. Against a built Worker under wrangler dev (the end-to-end servers on ports 4331 to 4333) there's no cache to purge, so saves say "the logbook may show the old version for a little while".

Photographs

The photo gallery: /photos, a page for each photograph and a private downloads page that only email addresses George approves can sign in to, with a six-digit code sent to the address, with the owner's photographs and downloads sections in /admin. How the pages, the catalogue, the preparation and the import work: photo gallery guide. The e2e gallery server (4335) gets the six-post photo fixture afresh on every run (scripts/seed-photo-test.mjs), and every local test server passes the fixture signing key explicitly (PHOTO_KEY_VAR in playwright.config.ts), because build:test copies .dev.vars into dist/server. No test server is reused, so stop your own bun run serve before bun run test:e2e (Playwright says the port is already used otherwise).

Decisions: ADR-0020 (amended; revocable signed links), ADR-0033 (downloads require approved email codes), ADR-0022 (amended; area and city only), ADR-0023 (the gallery stays light on phones) and ADR-0024 (test servers never hold the real signing key).

The gallery is live as of 14 October 2026: 458 reviewed photographs are published and four private holds remain hidden. Full-resolution masters stay private. The following checklist records the original launch sequence:

  1. Create the curiousgeorge-photo-prints R2 bucket before this branch deploys, because wrangler.jsonc binds it.
  2. Apply migrations 0005 and 0006 with wrangler d1 migrations apply (bun run db:migrate:remote; the deploy job runs it). Production has never had the photo backend, so both arrive with this merge, along with the owner's JSON photo routes.
  3. Set PHOTO_LINK_SECRET as a fresh Worker secret.
  4. From the Mac, run bun run photos:prepare and then bun run photos:import --remote (the manifest is now version 2).
  5. In /admin, review and publish the photographs, including the 96 RAW candidates.
  6. Issue the first catalogue link from /admin.
  7. Once something is published, run the post-publish check against the live site (the image gate and the photo pages' privacy check, then Lighthouse): PLAYWRIGHT_BASE_URL=https://curiousgeorge.dev bunx playwright test tests/e2e/budgets.spec.ts tests/e2e/privacy.spec.ts -g "images before any scroll|photo pages" --project=chromium and bun run lighthouse https://curiousgeorge.dev/.

Details, and what is still open: the guide's launch steps and the plan 6 follow-ups.

The gallery merges together with prints (plan 7), so George follows the combined launch checklist in the prints guide, which holds these steps too.

Prints

Print ordering is live as of 14 October 2026, following PR #6 and its successful main deployment. PRINTS_OPEN is "true". A photograph's page gets a prints row, the basket lives in the URL, Artelo's Price Check quotes delivery for the buyer's address, Stripe's hosted checkout takes payment, each paid basket becomes one Artelo order and the buyer gets a private order page and a shipped email; George runs it from the orders section of /admin. The first physical sample order remains the proof of real supplier fulfilment and print quality. How it works and how to run it: prints guide.

Photo pages include interactive size and frame previews, built by Claude and checked in Chromium and WebKit. The populated gallery's mobile loading performance remains a separate follow-up.

The e2e suite stands in for Stripe, Artelo, the exchange rate and the mail binding (tests/fixtures/artelo-site.mjs, port 4401) on the prints servers (4337, and 4339 with no exchange rate). Set STRIPE_TEST_SECRET_KEY to a Stripe test key in your shell to also run the one full order through Stripe's test mode (4338); without it that spec is skipped.

Decisions: ADR-0021 (amended; prints sold on the site through Artelo), ADR-0025 (emails fail towards a duplicate), ADR-0026 (one Artelo order through a fence and a lookup) and ADR-0027 (a Stripe event acts only when provably ours).

Snapshots and analytics

The snapshots Worker lives in workers/snapshots/. bun run dev:snapshots runs it on its own, with its own store (.wrangler/snapshots-dev, migrated first) and its own dev registry, so the site's servers never reach it; its nightly run, started with curl http://localhost:8790/__scheduled, captures the lines' real pages into that store. The end-to-end suite runs it beside the site on port 4334, with local Browser Rendering (wrangler downloads Chrome on first use) capturing a fixture site on port 4400. Run scripts under Node 24 (mise exec node@24 -- outside your home directory): wrangler's Chrome download has hung under Node 26.

bun run seed:snapshots --local gives two labelled lines a snapshot in the local store, so the e2e server shows hover cards and the closer look.

The analytics proxy drops events locally, because the PostHog key is a Worker secret only production has. bun run lighthouse [url] measures spec 11's page budgets (median of five mobile runs).

Notes

  • Migrations: always wrangler d1 migrations apply, never wrangler d1 execute --file.
  • Fonts: bun run fonts after adding copy with new characters.
  • Open Graph image: bun run build, then bun run serve, then bun run og.
  • Deploys happen only from GitHub Actions on main, after every check passes; the privacy spec and a media check (every record's audio and cover answer) then run against the live site, followed by a Lighthouse run (a warning, not a failed deploy).
  • / is cached at the edge for five minutes with background refresh, and every deploy purges it (ADR-0010).
  • CI runs the end-to-end suite on one worker (ADR-0009), so the end-to-end step takes about 18 minutes.
  • Media: the starting crate lives in media/ (MP3s and 512px covers from bun run covers); bun run seed:media --local uploads it to the local R2 store, --remote to production (a launch step).
  • Tests run against bun run build:test, which compiles in the listening corner's test hooks; bun run build never contains them.
  • Posters: bun run build:test, then bun run serve, then bun run poster. It renders four (day and night, desktop and phone); rerun it whenever the scene changes, and look at them before committing.
  • Scene long tasks (opt-in, on a GPU): SCENE_PERF=1 bun run test:e2e tests/e2e/scene-perf.spec.ts --project=chromium --headed. It allows one task over 50ms, the environment map's (ADR-0017), and skips itself under software rendering. It was last measured after plan 5's Task 8, when one cold first press showed a long task of about 64ms (none on the next run), so it can still fail on that press; no run since. It needs Playwright's own Chromium (bunx playwright install chromium) for --headed.
  • The admin specs write, so they run against a third server on port 4333 whose store is deleted and migrated afresh on every run, in Chromium only. If a run stops part way, pkill -f "port 4333" before the next.
  • Run one end-to-end suite at a time: two at once oversubscribe the CPU, and headless renderers then stall for seconds (plan 5 measured up to 6.6s).

Security maintenance

Runtime and dependency checks, update PRs and new-service enrolment are documented in .security/README.md. Register every independently locked package root in .security/policy.json.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages