Skip to content

Replace dead StackBlitz embed with a self-hosted, name-gated terminal - #11

Merged
craig-o-curtis merged 3 commits into
mainfrom
chore/fix-landing-page
Sep 12, 2026
Merged

craig-o-curtis merged 3 commits into
mainfrom
chore/fix-landing-page

Conversation

@craig-o-curtis

Copy link
Copy Markdown
Contributor

What

Replaces the dead StackBlitz embed on the GitHub Pages landing page with a
terminal we build and host ourselves, gated behind a name prompt so the page
doesn't publish anyone's CV to crawlers or casual visitors.

Before: an iframe pointing at stackblitz.com/edit/run-cv, which now
renders editor-only — no terminal, demo broken. Two "Contact Architect"
buttons also put both full names in the page source.

After: docs/index.html shows npx run-cv ___ and a [ RUN ] button.
Typing a known name boots that person's CV in the same CRT-framed monitor;
anything else shows run-cv's own ACCESS DENIED screen. The LinkedIn
buttons are gone — contact info lives on the terminal's own contact screen,
behind the gate.

How

Ported scripts/run-cv-web/ from craig-o-curtis.github.io — esbuild
bundles a Node CLI for the browser with hand-written shims, memfs holds the
markdown, Ink renders into xterm.js — and pointed it at this repo's own
src/cli.tsx instead of the npm package, so the page tracks main.

The anonymity layer is new work on top of that blueprint:

  • Each human's markdown never enters terminal.js. It's written at build
    time to docs/run-cv/h/<sha256(salt + name)>/payload.json and fetched
    only once a visitor types a name that hashes to that path.
  • A miss fetches nothing, seeds nothing, and the terminal boots anyway —
    run-cv's own catch renders ACCESS DENIED. No custom error UI needed.
  • shared/human-hash.ts is the one hash implementation, imported by both
    the Node builder and the browser page, so they cannot drift apart.
  • ?h=<hash> supports a shareable deep link that skips the prompt.

Is this an npm release?

No. Nothing under src/ (the actual CLI) changed, package.json's
version and dependencies are untouched, and everything this PR adds
lives outside the "files": ["dist", "README.md"] the npm package ships —
docs/, scripts/run-cv-web/, and public/*.pdf. No version bump, no
publish.

Other changes bundled in

  • Deploy moves to GitHub Actions (.github/workflows/pages.yml).
    docs/run-cv/ is generated at build time and gitignored rather than
    committed — the legacy branch-builder Pages setup can't do that.
    Requires a manual step after merge: flip the repo's Pages source from
    "Deploy from a branch" to "GitHub Actions"
    (gh api -X PUT repos/northguild/run-cv/pages -f build_type=workflow),
    done after this merges so the workflow exists first.
  • The two themed CV PDFs (terminal/vintage, previously
    Playwright-generated at publish time) are now committed to public/
    alongside the existing ATS ones — build:pdfs has never run in CI, and
    playwright-core ships no browser to run it with.
  • ci.yml gains typecheck and build:web steps, and chore/** in
    its branch filters — this branch previously ran no CI at all.
  • Two mechanical fixes needed to bundle our own TSX source rather than a
    pre-built npm package: the import.meta.url rewrite now covers every
    file under src/ (not just the entry — cvParser.ts and App.tsx also
    read their own location), and esbuild's JSX runtime is set to
    "automatic".

Testing

213 tests (147 from the blueprint + 66 new), pnpm typecheck, pnpm lint
all pass. Verified in a real browser (Playwright + Chrome) against a local
server that mirrors the Pages path layout exactly
(scripts/run-cv-web/preview.mjs — npx serve docs is wrong here, it
gets the /run-cv/run-cv/ prefix wrong):

  • Landing page boots to the prompt with no name anywhere in the served HTML/JS
  • Wrong name → ACCESS DENIED, no payload fetched
  • Correct name → CV boots, arrows navigate, q quits, Restart returns to
    the prompt (not back into a CV)
  • All three PDF downloads work per human (ATS + both themes)
  • ?h= deep link boots without typing
  • curling terminal.js and index.html — zero name occurrences

🤖 Generated with Claude Code

The landing page iframed stackblitz.com/edit/run-cv, which now renders
editor-only with no terminal — the demo has been broken. Also removes
the two LinkedIn buttons, the last plaintext names on the page.

Ports the browser build from craig-o-curtis.github.io/scripts/run-cv-web:
esbuild bundles our own src/cli.tsx (not the npm package, so the page
tracks HEAD), memfs holds the CV markdown, Ink renders into xterm.js.
No server, no shell.

On top of that port, since this repo is public: the page boots to an
`npx run-cv ___` prompt with an empty in-memory filesystem. Each
human's markdown is written at build time to h/<sha256(salt+name)>/
payload.json and fetched only once a visitor types a name that hashes
to it. A miss seeds nothing and falls through to run-cv's own ACCESS
DENIED screen. terminal.js and index.html carry zero names — verified
by an integration test, not just by eye.

Also:
- Both build-scoped fixes needed to bundle from source rather than a
  published package: the import.meta.url rewrite now covers every
  file under src/, not just the entry (cvParser.ts and App.tsx read
  their own location too); esbuild's JSX runtime is set to "automatic"
  so React resolves at runtime.
- The two themed CV PDFs (terminal/vintage) move from playwright-core
  generation in dist/pdf/ to committed files in public/, alongside the
  existing ATS ones — build:pdfs has never run in CI and playwright-core
  ships no browser binary, so these can't be regenerated on every deploy.
- Deploy moves off the legacy branch builder onto GitHub Actions
  (.github/workflows/pages.yml); docs/run-cv/ is generated and
  gitignored rather than committed.
- ci.yml gains typecheck + build:web steps and chore/** in its branch
  filters (this branch previously ran no CI at all).

147 tests from the blueprint plus 66 new ones covering the gate, the
hash, the payload split, and an integration assertion that the built
bundle names nobody.
@craig-o-curtis craig-o-curtis added the enhancement New feature or request label Sep 12, 2026
@craig-o-curtis
craig-o-curtis merged commit 6719fce into main Sep 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant