Content Collections

Blog & Architecture Notes

These posts are Markdown files in src/content/blog, typed and validated by the Content Layer API, and serialized to static HTML at build time.

•#telemetry#workerd#cloudflare#sse#debugging

Real-Time Edge Telemetry & Mitigating workerd IPC Panics

Deep dive into building a multi-browser Server-Sent Events (SSE) trace console and diagnosing Cloudflare workerd IPC socket disconnections during local dev.

Read article →
•#neon#postgres#cloudflare#edge-database#serverless

Neon Serverless Postgres & REST Data API on Cloudflare Workers

How to run stateless HTTP/2 REST database queries, JWT JWKS authentication, and S3 Object Storage on edge workers without TCP connection pooling overhead.

Read article →
•#caching#cloudflare#performance

Route caching on Cloudflare with cacheCloudflare()

How Astro's new platform-agnostic cache API maps to Cloudflare CDN headers, cache tags, and edge invalidation.

Read article →
•#fetch#performance#patterns

The data-fetching hierarchy in Astro

Choose the cheapest place to fetch: build time, on-demand server, cached endpoint, or the browser. Never just pick the browser.

Read article →
•#astro#hybrid#architecture

Astro v7 and the hybrid mentality

Static-first does not mean static-only. Astro 7 lets every route opt in to the worker, one export at a time.

Read article →
1

getStaticPaths + getCollection

Each '/blog/[slug]' page is generated once at build time. No server, no JavaScript on the client.

const posts = await getCollection('blog');
export async function getStaticPaths() {
  return posts.map((post) => ({ params: { slug: post.id }, props: { post } }));
}