Personal portfolio for Ethan Flow, built with Astro and deployed to Cloudflare Workers. Contact mail goes through Resend behind a Turnstile-protected /api/send route.
| Command | What it does |
|---|---|
npm run dev |
Astro dev server (optional local iteration) |
npm run build |
Production static + Worker build into dist/ |
npm run preview |
Build, then serve with wrangler dev (default port 8787; set PORT) |
npm run types |
Regenerate worker-configuration.d.ts from .dev.vars.example |
npm run lint |
npm run types then astro check |
npm run test |
Playwright tests against preview |
npm run deploy |
Build and wrangler deploy |
npm run og |
Regenerate public/og-image.png from /og-card (pass the URL of a running preview) |
npm run icons |
Regenerate the favicon and app icons (the summit mark) in public/ |
npm run hero-blur |
Regenerate the hero's pre-blurred images after replacing the hero photo |
Production secrets are never committed. Set them with Wrangler:
bunx wrangler secret put RESEND_API_KEY
bunx wrangler secret put CONTACT_EMAIL
bunx wrangler secret put TURNSTILE_SECRETFor local wrangler dev, copy .dev.vars.example to .dev.vars (gitignored) and fill in values.
TURNSTILE_HOSTNAMES is a Worker var in wrangler.jsonc, not a secret.
The Netlify site is retired and its DNS records are gone; notifications.ethanflow.dev exists in Resend with its DNS records in Cloudflare.
- Confirm
notifications.ethanflow.devshows Verified in Resend. - Create the Turnstile widget for ethanflow.dev and put its sitekey in
src/data/site.ts(replace the test sitekey). If your workers.dev subdomain is notethan-flow-a33, fixTURNSTILE_HOSTNAMESinwrangler.jsonc. bunx wrangler secret putforRESEND_API_KEY(a sending-only key for that domain),CONTACT_EMAIL, andTURNSTILE_SECRET.bun run deploy(orbunx wrangler deployafter a build).- Attach the ethanflow.dev custom domain to the Worker in Cloudflare (add
wwwtoo if you want it). - Send yourself a note through the register to confirm a real delivery.
src/pages/— routes:index.astroandog-card.astroare prerendered;api/send.tsis the one on-demand Worker route.src/components/— page sections (Hero, Machine, Trail, Camp, Register, Footer).src/data/site.ts— site metadata, links, timeline, and skill data.src/styles/tokens.css— design tokens from the approved Trail design.public/— static assets: the icons (npm run icons),og-image.png(npm run og) and_headers(security headers and the CSP).- Agent and crawler files are generated from the page's own data (
src/data/site.tsand the stories), so they never drift:/index.md(the page as Markdown, linked from<head>),/llms.txt,/llms-full.txt,/robots.txtand/manifest.webmanifest, built bysrc/lib/agent-content.tsandsrc/pages/*.ts. src/content/stories/— the four Camp stories (content collection).tests/— Playwright specs, run against the built Worker at 1440 and 390.