TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Free realtime planning/scrum poker using Htmx

3 点作者 weiliddat7 个月前
I made this online planning poker tool after not being able to find a simple, free (or not ad-ridden), not buggy version elsewhere.<p>I wanted to explore using Go + HTMX to do a realtime app instead of the typical SPA + websocket approach and I was surprised at how easy it was in this simple use case A few features made this really nice to work with:<p>- Go channels to synchronize long-poll updates for clients of a room (nice that timeouts and request cancellations are also channels)<p>- Partial rendering of templates in Go + HTMX swapping out individual elements for really lightweight updates (&lt;1KB compressed)<p>- Use (abuse?) browser caching mechanisms (Last-Modified + If-Modified-Since) to figure out if there was an update necessary (from the browser&#x27;s perspective) compared to the room state<p>The most puzzling bit was figuring out how to use hx-sync so that any POST request (e.g. clicking on an estimate) should cancel any existing long polling request for updates, since the POST request itself should return an updated version of the room. The semantics are a little hard to grok (what does it mean to sync &quot;on&quot; an element, requests from parent &#x2F; child elements with hx-sync don&#x27;t interact the way I think they should, the examples for drop&#x2F;abort&#x2F;replace don&#x27;t seem right).<p>It was also my first time using fly.io to deploy an app, and flyctl makes it amazingly simple to do it. &quot;Horizontal scaling&quot; is done via associating a room with a fly-machine-id, so you can &quot;visit&quot; different machines via the copied room URL, and I successfully avoided using a shared database.<p>Feel free to use it, ask me anything &#x2F; give me feedback here &#x2F; open an issue on GitHub!<p>Source: <a href="https:&#x2F;&#x2F;github.com&#x2F;weiliddat&#x2F;estimate-work">https:&#x2F;&#x2F;github.com&#x2F;weiliddat&#x2F;estimate-work</a>

暂无评论

暂无评论