craigthompson.dev

$ cat case-studies/this-site.md

This site, run like a production system

// this site · craigthompson.dev · [github.com/Craga89/portfolio](https://github.com/Craga89/portfolio)

This site, run like a production system

It’s a small site, but it’s built and run the way I’d run a product. Everything lives in one public repository, every change goes through automated quality gates, and the AI feature has tests of its own. The results below come live from the latest CI runs.

Latest results
  • Lighthouse
    loads on the live site
    performance, accessibility and best practices, mobile and desktop
    from the latest CI run
  • WCAG 2.2 AA suite
    loads on the live site
    axe-core in every page state, plus keyboard, focus, reflow and motion checks
    from the latest CI run
  • ask.sh answer tests
    loads on the live site
    right facts, nothing invented, no prompt injection
    from the latest CI run · see the tests
How a visit works
  • the page Browser GitHub Pages static, prerendered, works offline
  • ask.sh Browser Cloudflare Worker rate-limited per visitor, and capped within the free daily AI allowance Workers AI three models, each a fallback for the one before; answers only from this site
  • counts Browser Cloudflare Worker D1 anonymous question log and visit counts
  • agents AI agent in the browser WebMCP or MCP the same tools, on the page or on the Worker: profile, career, files, search and ask.sh
  • translation Browser its built-in Translator API, when the visitor wants another language on the device 38 languages, right-to-left included; nothing is sent anywhere
What every change goes through
  1. qualitylint, format and type checks, and unit tests with a coverage threshold
  2. buildprerender the page, self-host fonts, resize images, print cv.pdf, write the contact card and the ask.sh index
  3. testend-to-end tests on a desktop and a phone, the WCAG 2.2 AA suite and a screenshot comparison against approved baselines
  4. deployGitHub Pages, only when every gate passes, stamped with the commit; then Lighthouse thresholds
  5. workerdeploy, a smoke test, then the ask.sh answer tests
  6. weeklyevery check again, plus a dead-link check, visit and question stats, and the open-source counts
# in practice
  • The same gates I’d put on a product: a change that hurts accessibility, performance or the visuals fails its check.
  • The AI feature is tested like any other code, for the right facts, invented ones and prompt injection.
  • Anonymous counts instead of tracking: no cookies, no IP addresses, nothing that identifies a visitor.
  • It runs on the free tiers of GitHub Pages and Cloudflare.

$ ls case-studies/

Search and jump