Building a Personal Publishing Stack on Cloudflare
I've been running a micro.blog for a few years now, but I've always wanted more control over my publishing workflow. The ability to post from multiple sources, syndicate to different platforms, and maintain a unified presence across the web.
The Architecture
The core of the system is a Cloudflare Worker that handles all the API endpoints. It uses D1 for the database, R2 for media storage, and Queues for async tasks like syndication.
The frontend is a SvelteKit app that calls the API. It's deployed to Cloudflare Pages, which gives us automatic SSL and global distribution.
Key Design Decisions
One of the most important decisions was to use ULID for all IDs instead of auto-incrementing integers. This gives us sortable, globally unique IDs that work well in distributed systems.
Another key decision was to implement the CUBE CSS methodology for styling. This keeps the CSS maintainable and avoids the complexity of utility-first frameworks while still being composable.