Colophon
How this site works
Most pages are plain HTML served from the Cloudflare data center nearest you. A small Worker runs only for the few requests that need logic.
The pieces
- Astro builds every page to HTML ahead of time. Projects are Markdown files with typed front matter.
- Cloudflare Workers static assets serves that HTML from the edge. No server, nothing to patch.
- A Worker runs first for
/and/api/*. Everything else skips it. - Turnstile checks that the contact form was sent by a person, without a puzzle.
- D1, Cloudflare's SQLite database, stores contact messages.
- Workers Builds deploys every push to the main branch on GitHub.
The curl card
When a request for / comes from a terminal tool, the Worker answers with plain text instead of HTML.
It checks the User-Agent header, or an Accept header that asks for text.
curl johnheim.dev The card is built from the same data file as the homepage, so the two can't drift apart. Its last line names the Cloudflare data center that answered.
The contact form
The form posts straight to /api/contact with no custom JavaScript. The Worker validates each field,
quietly drops anything that filled in a hidden decoy field, and verifies the Turnstile token with Cloudflare. It
then saves the message with a parameterized SQL insert and redirects back with a success or error message.
Small touches
- Press Ctrl K or / on any page to open the command palette.
- Light and dark themes follow your system, and the toggle remembers your choice.
- Fonts are self-hosted, so pages make no requests to third-party font services.
- The 3D sculpt on the About page is drawn with the plain canvas API, with no 3D library.