← All projects In progress

johnheim.dev

This site. Static pages served from Cloudflare's edge, plus a small Worker that answers curl, checks for spam and stores contact messages in a SQL database.

The johnheim.dev home page in dark mode. The headline sits beside a terminal window showing the real response to curl johnheim.dev.

Why build it this way

A portfolio is the one project every reviewer is guaranteed to see. I wanted mine to show backend and infrastructure work, not only a nice layout.

How it works

Astro turns Markdown and components into plain HTML at build time. Cloudflare serves those files from the data center closest to each visitor, so most pages never run any server code.

A small Cloudflare Worker handles the few routes that need logic:

  • GET / checks who is asking. Browsers get the homepage. Terminals like curl get a plain-text card.
  • POST /api/contact validates the form, checks the Turnstile token to stop bots, and saves the message to D1, Cloudflare’s SQLite database.
  • GET /api/edge reports which data center answered, which the footer shows.

The full write-up, with a diagram, is on the How this site works page.

Try it

curl johnheim.dev