Palm Engine needed a place to write down decisions. This site is that place. It is also a test: can a modern tech blog stay on Cloudflare’s free tier?
It can. The site is live. Posts are static files. Comments are one Worker and a D1 table.
Two kinds of request
Opening a post is not a Worker request. Astro emits static HTML. Those files are assets. Assets do not spend the 100k Worker requests per day.
Comments need a database. D1 lives on a Worker. A purely static Astro app cannot take bindings. An Astro SSR adapter would spend a Worker request on every post view. That is waste.
So the split is sharp:
| Path | Who answers |
|---|---|
/, /about, /blog/…, /rss.xml |
Static assets |
/api/comments |
One Worker |
The Worker matches /api/* first. Everything else is a file. A junk URL is the static 404 page, not a Worker.
Comments wait
The comment section does not fetch on page load. It waits until #comments enters the viewport. Most readers never reach it. Those views stay free.
Writes go through Turnstile and a hashed-IP rate limit: one write per minute from the same address. Invalid replies do not burn that window. Email is stored. It is never returned.
Reads live in the Cache API for a short TTL. We do not turn on Worker-level cache.enabled. That would bill the static assets.
The form posts through the Worker. The page never talks to D1 itself. Replies nest one level. The island inserts the comment on the page first, then stamps an error on that row if the Worker refuses it.
What this tree names
Folders say where later work goes. src/content/posts holds Markdown. src/pages stays static. src/worker is the only dynamic code. Shared comment types live in src/lib/comments.ts. RSS, sitemap, and robots are built in src/lib and emitted as static routes.
The mark in the header is the same one as palmengine.org. Favicon and Open Graph files sit in public/. That is not R2.
Search, a PWA, a view counter, an admin UI, and R2 images are not in v1. They stay named absences, not empty folders.
Why write this first
The blog is an experiment about cost and shape. The first post should say that out loud. Later posts will talk about Palm. This one is about the site that holds them.
Comments
Comments load when this section is visible.
To load comments we set a first-party session cookie and record that you opened this section. Name and email stay in this browser after you post.