← Back to work
Featured projectAstro · Effect · Alchemy · Cloudflare Workers · D1 · TypeScript

This Site — Astro + Effect + Alchemy Rebuild

A ground-up rebuild of this portfolio: Astro 7 SSR on a single Cloudflare Worker via Alchemy, an Effect Schema-driven entity system that generates the D1 schema, HttpApi, and admin forms from one source of truth, and a database-composed public site editable entirely through /admin.

The previous version of this site ran a separate Hono worker against a hand-maintained D1 schema. This rebuild collapses that into one Alchemy stack: Astro 7 SSR runs inside the Cloudflare Worker itself via `Cloudflare.Website.Astro`, with D1, KV, and R2 bound directly. Every content type — projects, posts, skills, experience, testimonials, and the pages/blocks that compose the public site — is defined once as an Effect Schema entity. That single definition drives the generated D1 migration, the HttpApi surface, and the admin CRUD form for that entity, so adding a field never means touching four files by hand. The public site itself is data-defined: pages are rows, and each page is an ordered list of blocks resolved against a block-type registry, so the homepage, /work, and /writing archives are composed and reordered from `/admin` rather than hand-edited in a template. Cloudflare Access gates the admin path, with an app-level identity check as defense in depth independent of the edge gate.