Title: XRss is a simple RSS reader web app built to showcase xtemplate, a new web development tool based on Go&#x27;s html&#x2F;template and Caddy server.<p>The entire site UI for XRss comes from <i>a single HTML template file</i>. This index.html includes everything from SQL queries and route definitions and handlers to htmx state transition attributes and tailwindcss classes, and developing it requires <i>zero build steps</i> (amortized).<p>Check out the source which manages to be at once banal and gnarly: <a href="https:&#x2F;&#x2F;github.com&#x2F;infogulch&#x2F;xrss&#x2F;blob&#x2F;master&#x2F;templates&#x2F;index.html">https:&#x2F;&#x2F;github.com&#x2F;infogulch&#x2F;xrss&#x2F;blob&#x2F;master&#x2F;templates&#x2F;inde...</a><p>xtemplate preloads the whole template structure into memory and builds the router at startup, so responses to matching requests are rendered after a single lookup. Combined with direct queries to sqlite makes for a very snappy experience typically responding in less than 5ms. (Fingers crossed.)<p>There are various places where XRss could be improved (PRs welcome!), but it already delivers on its purpose of demonstrating the plausibility of xtemplate. See the xtemplate readme for an overview of what you can do with it. I think of it as &#x27;PHP but the syntax looks like Go templates&#x27;.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;infogulch&#x2F;caddy-xtemplate">https:&#x2F;&#x2F;github.com&#x2F;infogulch&#x2F;caddy-xtemplate</a><p>Let me know what you think! Does remaking PHP from scratch out of Go templates make me a lunatic? (yes) Is it a good idea anyway? (yes) What kind of web application do you think would be a good fit for a platform like this?
Upvote: