urthreads: self-hosted comments, likes and moderation for static sites, on Cloudflare Workers and D1

I wanted likes and comments on my own blog and every ready-made option either broke on the free tier or wanted a subscription. I am the only author on the site, so maintaining a whole user flow for it made no sense either. urthreads runs on a Cloudflare Worker with your own D1 database. Setup is one guided command: npm install -g urthreads wrangler login urthreads setup-env That walks you through creating or reusing a D1 database, writes .env and wrangler.toml, initializes the schema, and deploys the Worker. Then you drop two script tags into your templates and you have likes and threaded comments. What it does: - Page likes and comment likes, tracked by path - Threaded comments stored in your own D1, not anyone else's - New comments stay pending until you moderate them, with a denied-keyword list for automatic rejection - A static admin dashboard for moderation, analytics, posts, logs and Worker metadata - CLI tooling for env syncing, admin keys, sessions, dashboard builds, cleanup, stats and D1 checks On the security side, because a comment endpoint is a public write endpoint and I did not want to hand-wave it: - __Host- HttpOnly session cookies for the admin dashboard - A CSRF origin check on every admin mutation - Login rate limited to 5 failed attempts per 15 minutes per IP - Per-IP rate limits on public likes and comments, backed by D1 counters - Optional AES-GCM encryption of commenter emails at rest No tracking, no third-party scripts on your readers, and the data is in a database you own. It also has no runtime dependencies: installing it pulls nothing but the package itself. MIT, on npm as urthreads. github.com/3M1RY33T/urthreads It is running on my own site if you want to try leaving a comment on something: yigityildiz.dev/2026/08/26/urthreads-v1...ocal-dev-and-first-delroy-release.html

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论