RC RANDOM CHAOS

Static Site with Dynamic Updates for Art Portfolio

· via Hacker News

Original source

I'm quite pleased by the tech architecture of my art website

Hacker News →

The author describes a hybrid approach to building a static art portfolio website that supports dynamic content updates. By leveraging Cloudflare’s R2 storage and CDN, the site generates thumbnails client-side during uploads and stores metadata in a single JSON file. Dynamic pages are generated on-demand via Cloudflare Workers, cached for 30 days, and invalidated globally whenever content changes. This avoids the need for complex build systems while maintaining performance and cost efficiency. Interactive elements like maps and timelines are embedded via client-side JavaScript, relying solely on the metadata JSON for initialization. The solution prioritizes simplicity and resource efficiency over granular cache invalidation, accepting occasional over-caching for ease of maintenance. The architecture uses Astro, integrated with Cloudflare, though the core logic could be implemented without it.

Read the full article

Continue reading at Hacker News →

This is an AI-generated summary. Read the original for the full story.