How it’s built
I build it. The machines try to break it.
Every change to this site has to get past the same automated checks I set up for clients’ sites before it can go live.
Every change, checked
What happens before a change goes live
GitHub Actions runs these in order. If any one fails, nothing is deployed.
Typecheck
Every file is checked with TypeScript’s strictest settings, including the templates and the contact form’s Worker.
Build
Astro turns the pages into plain HTML, Zod checks every piece of content against its schema, and the CV is printed to PDF.
Browser tests
67 Playwright tests, each run on a desktop and a phone: links, layout at phone widths, the security policy, the contact form, the CV and more.
Contact form tests
60 Vitest tests run the form’s Worker inside Cloudflare’s own runtime: spam checks, limits, bad input and the email it sends.
Lighthouse
Lighthouse checks the home page, /work/protect-flat-roofing/, /cv/, /contact/: at least 90 for performance, and 95 for accessibility, best practices and SEO.
Image check
Every image in the repository is checked for hidden metadata, such as the location a phone records.
Preview
The tested build goes to a password-protected preview site, never indexed by search engines.
Live
A launch check makes sure every claim on the site has been confirmed and every client has agreed to their case study, then the same tested build goes live.
The stack
What it’s made with
Languages
- TypeScript
- Typed JavaScript: all of this site's code, and the browser side of the Shopify apps
- HTML and CSS
- Hand-written, accessible pages and layouts, with no CSS framework
Websites and front end
Back end
- Node.js
- Build, test and image tooling
- Cloudflare Workers
- Serves this site, and runs its contact form as a TypeScript function
Hosting and cloud services
- Cloudflare Turnstile
- Spam checks on contact forms, with no cookies or puzzles
- Cloudflare Email Routing
- Delivers this site's enquiries to Paul's inbox
- Cloudflare Web Analytics
- Visitor numbers with no cookies, so no consent banner
Testing and quality
- GitHub Actions
- Tests every change, and deploys only when everything passes
- Playwright
- Browser tests on desktop and phone, and drawing images and PDFs
- Vitest
- Unit tests for the contact form, run in Cloudflare's own runtime
- Lighthouse CI
- Speed, accessibility and SEO budgets that a change has to meet
- Content-Security-Policy
- Only the site's own scripts and styles are allowed to run
Tools
- Git and GitHub
- Version control, issues and CI
- VS Code
- Web development
- Wrangler
- Cloudflare's command-line tool: local runs, types and deploys
Choices
Why it’s built this way
Plain pages, not a server
The pages are built once and served as files, so there’s nothing to patch, nothing to hack and nothing to slow them down.
Cloudflare
Free hosting on a network close to every visitor, with the contact form running as a small TypeScript function next to the pages.
No cookies
Visitor numbers come from Cloudflare Web Analytics, which stores nothing on your device. So there’s no cookie banner.
Nothing from other sites
The fonts are served from this site, and Cloudflare’s spam check only loads once you start on the contact form.
Light and dark
The site follows your device’s setting, or the switch in the header. A test checks that the text on every page is easy to read in both.