How this site is built: static Next.js on Cloudflare Workers
This site sells Next.js templates, so it is built the same way the templates are. Here is the stack, and the reasons behind each choice.
The stack
- Next.js with the App Router and TypeScript in strict mode
- Tailwind CSS and shadcn/ui for styling, with light and dark mode
- MDX for blog posts: Markdown files in the repo, checked when the site builds
- Cloudflare Workers for hosting, serving the files only (no server code)
Why there is no server
Every page is turned into plain HTML when the site builds. Next.js calls this a static export. One line in the config switches it on:
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// Pre-render every page to static HTML in `out/`.
output: "export",
};
export default nextConfig;After pnpm build, the out/ folder holds the whole website. Any host that can serve files can serve it.
What you get
- Speed: the page is ready before the visitor asks for it.
- Fewer things to break: no server code, no database, nothing to patch at 2 a.m.
- Low cost: static hosting is free on most platforms.
What you give up
Anything that must run per visitor, like a login or a form that saves data, needs another service. On this site, the waitlist form talks to an email tool and the contact form to a form service. Neither needs my own server.
How a blog post is checked
Each post starts with a few fields: title, description, date, and an optional draft flag. When the site builds, a small schema checks them. A typo in a field name or a missing date stops the build with a message naming the file, so a broken post never goes live.
A draft is visible on my computer while I write, and it simply does not exist in the live site.
That is the whole setup: plain files in, plain HTML out.