Back to articles
A Simple Like System for a Static Blog

A Simple Like System for a Static Blog

via Dev.to WebdevIsaac FEI

I noticed my blog gets many daily visitors but very few comments. Maybe readers don't even notice the discussion section at the bottom. Or perhaps it's the friction: Giscus requires GitHub login, and writing a comment takes effort. I wanted a simpler way to get some reactions—a one-click signal that says "I liked this" without accounts or typing. A like button fits that bill. The system itself is straightforward: one like per visitor per article, stored in a database. The catch: I needed a backend, and I didn't want to spin up a separate project just for this small feature. That's when I remembered I already run a playground project with TanStack Start—a full-stack app on Cloudflare Workers. I could add the like API there. This post covers the motivation, design choices, and implementation. I use TanStack Start + Neon Postgres because that's what I have; you can use any tech stack. The ideas translate. Try the button below. It's wired to the real API for this post. Interactive or embed

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
2 views

Related Articles