<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Roan.dev Blog</title>
    <link>https://roan.dev/blog</link>
    <description>Engineering notes on architecture, frontend craft, and performance decisions.</description>
    <language>en-us</language>
    <managingEditor>Roan van Westerop</managingEditor>
    <lastBuildDate>Wed, 11 Feb 2026 17:10:00 GMT</lastBuildDate>
    <atom:link href="https://roan.dev/blog/rss.xml" rel="self" type="application/rss+xml" />
    <image><url>https://roan.dev/logo.svg</url><title>Roan.dev Blog</title><link>https://roan.dev/</link></image>
    <item>
      <title>What Made This Blog Feel Instant</title>
      <link>https://roan.dev/blog/making-blog-feel-instant</link>
      <guid isPermaLink="true">https://roan.dev/blog/making-blog-feel-instant</guid>
      <pubDate>Wed, 11 Feb 2026 17:10:00 GMT</pubDate>
      <dc:creator>Roan van Westerop</dc:creator>
      <description>Practical notes from shipping prefetching, client-side caching, and animation discipline so blog navigation feels immediate.</description>
      <content:encoded><![CDATA[<p>The API was fast. Like, actually fast. But clicking between blog posts still felt sluggish and I couldn&#39;t figure out why until I sat down and actually looked at it.</p>
<p>The data loading wasn&#39;t the problem. The UI was.</p>
<h2>Cache everything on the client</h2>
<p>Blog posts don&#39;t change while you&#39;re reading them. So the first thing I did was add a simple in-memory cache on the client:</p>
<pre><code class="language-ts">const postCache = new Map&lt;string, BlogPost&gt;();
const indexCache: { data: BlogIndex | null } = { data: null };</code></pre>
<p>First load fetches and stores. Every click after that renders from memory and revalidates in the background. You never load the same post twice in a session.</p>
<h2>Prefetch before the click</h2>
<p>A cache only helps on repeat visits. For the first click to feel fast I needed to prefetch. There are three moments I use:</p>
<ol><li><strong>App load</strong> — fetch the blog index in the background while the hero section is animating in. It&#39;s tiny and nobody notices.</li><li><strong>After the index loads</strong> — speculatively fetch the most recent posts. Most people read the newest one.</li><li><strong>On row hover</strong> — by the time someone moves their cursor and clicks, the post is already in cache.</li></ol>
<p>The hover prefetch is the one that actually matters most. People scan lists before clicking. That scanning time is free network time if you use it.</p>
<h2>Skeletons, not spinners</h2>
<p>On a cold first visit there&#39;s nothing in cache yet. You need to show something while the post loads. I went with a skeleton layout that mirrors the actual post shape — a big block where the title goes, some narrow blocks for meta, a tall block for the body.</p>
<p>When the post arrives it just swaps in. No transition, no crossfade. Immediate.</p>
<p>Adding a fade between skeleton and content looked nice in theory but in practice created this ghosting moment where both were partially visible at the same time. Just getting rid of it was better.</p>
<h2>Less animation, not more</h2>
<p>This is the one I kept getting wrong. I kept thinking the experience felt slow because it needed more polish — better transitions, smoother animations. The opposite was true.</p>
<p>I had a translateX shift on post row hover that was subtly moving content around. Gone. Exit animations that overlapped with the entry of the next view. Gone. Any transition over 250ms. Gone.</p>
<p>The site felt faster immediately. Fast data with slow animation still feels slow. Animation that fights the content doesn&#39;t add polish, it adds friction.</p>
<p>Hover state is now just opacity + underline. That&#39;s enough to tell you something is clickable.</p>
<h2>What ended up shipping</h2>
<ul><li>Blog index renders instantly from prefetched data.</li><li>Post pages render from cache if you hovered first; otherwise skeleton → post.</li><li>RSS feed at <code>/blog/rss.xml</code>.</li><li>Reading time is pre-computed at build time.</li></ul>
<p>Next thing I want to try is prefetching posts that are visible in the viewport, not just on hover.</p>]]></content:encoded>
    </item>
    <item>
      <title>Fast Blog Delivery with Prebuilt Content</title>
      <link>https://roan.dev/blog/fast-blog-delivery-prebuild</link>
      <guid isPermaLink="true">https://roan.dev/blog/fast-blog-delivery-prebuild</guid>
      <pubDate>Tue, 10 Feb 2026 09:00:00 GMT</pubDate>
      <dc:creator>Roan van Westerop</dc:creator>
      <description>How prebuilding Markdown into JSON keeps blog pages instant without adding runtime complexity.</description>
      <content:encoded><![CDATA[<p>I didn&#39;t want to run a database just to store blog posts. That felt like a lot of infrastructure for content that barely changes and only I write.</p>
<p>So I prebuild everything at deploy time instead.</p>
<h2>How it works</h2>
<p>Posts live as plain Markdown files in <code>content/blog/</code>. When I run the build, a Node script walks that directory, parses the frontmatter and body, converts Markdown to HTML, and writes out JSON files into <code>web/public/blog/</code>:</p>
<ul><li><code>index.json</code> — metadata for all posts (title, slug, excerpt, tags, reading time)</li><li><code>posts/{slug}.json</code> — full post with the pre-rendered HTML body</li></ul>
<p>That&#39;s it. The server just serves static files. No rendering happens at request time.</p>
<p>The frontmatter is simple:</p>
<pre><code class="language-markdown">---
title: My post title
slug: my-post-slug
excerpt: One sentence shown in the list.
publishedAt: 2026-02-10T09:00:00Z
tags: [blog, architecture]
---

Post body in Markdown...</code></pre>
<h2>Why ship HTML inside JSON</h2>
<p>The frontend is a single-page app that fetches posts over the API rather than doing full page navigations. Pre-rendering the HTML at build time means the client just receives a payload and drops it in with <code>dangerouslySetInnerHTML</code>. Nothing to process on the client, nothing to process on the server.</p>
<p>Reading time is also pre-computed at build time, so there&#39;s no calculation happening per request or per render.</p>
<p>Post payloads stay small — a few kilobytes. The index is a bit bigger but still one response.</p>
<h2>Caching the easy way</h2>
<p>The Go server loads each JSON file on first request and keeps it in memory. After that it never touches disk again. Pair that with ETag headers and most repeat visits just get a <code>304</code>:</p>
<pre><code class="language-go">if ifNoneMatch := c.Get(&quot;If-None-Match&quot;); ifNoneMatch == etag {
    return c.SendStatus(304)
}</code></pre>
<p>Browsers cache the ETag and send it back automatically. The whole exchange is a few header bytes. No CDN needed, no invalidation to think about.</p>
<h2>The obvious tradeoff</h2>
<p>If I ever need draft previews, scheduled publishing, or want to write posts without deploying — this setup doesn&#39;t cover that. At that point I&#39;d probably migrate the blog service to read from Postgres instead of the filesystem. The API stays the same, only the storage layer changes.</p>
<p>For now though it&#39;s just files in git, and that&#39;s honestly kind of nice.</p>]]></content:encoded>
    </item>
    <item>
      <title>Why I Moved My Portfolio Backend to Go</title>
      <link>https://roan.dev/blog/portfolio-backend-go</link>
      <guid isPermaLink="true">https://roan.dev/blog/portfolio-backend-go</guid>
      <pubDate>Sat, 07 Feb 2026 16:30:00 GMT</pubDate>
      <dc:creator>Roan van Westerop</dc:creator>
      <description>The practical reasons I swapped my old setup for a Go/Fiber backend and what improved immediately.</description>
      <content:encoded><![CDATA[<p>My old backend was fine, I guess. But &quot;fine&quot; for a portfolio is a weird bar to aim for when you&#39;re the one maintaining it. It had a few too many pieces for what the site actually does, and I kept running into small annoyances that weren&#39;t worth fixing individually but added up.</p>
<p>So I rewrote it in Go.</p>
<h2>Why Go specifically</h2>
<p>Honestly, I just wanted a single binary I could drop on a server and run. No runtime to install, no package manager drama, no wondering if the node version matches. You build it, you copy it, you start it. That&#39;s kind of the whole appeal.</p>
<p>I used <a href="https://gofiber.io" target="_blank" rel="noreferrer">Fiber v3</a> for routing. It&#39;s fast and the API is pretty direct — you&#39;re not fighting abstractions to figure out what a request does. For something this small I didn&#39;t need anything heavier.</p>
<h2>Caching without adding infrastructure</h2>
<p>Blog posts don&#39;t change between deploys. So instead of reading JSON off disk on every request, the service loads each file once on first read and keeps it in a <code>sync.Map</code>. After that, every request hits memory.</p>
<p>Combined with ETag headers, repeat visits are basically free — the client sends back the hash, the server says &quot;nothing changed&quot;, and the whole exchange is a few header bytes.</p>
<pre><code class="language-go">if ifNoneMatch := c.Get(&quot;If-None-Match&quot;); ifNoneMatch == etag {
    return c.SendStatus(fiber.StatusNotModified)
}</code></pre>
<p>No Redis, no CDN config, no cache invalidation headaches. For a site this size it&#39;s just not needed.</p>
<h2>The frontend stays React</h2>
<p>I kept React for the frontend because that&#39;s where I&#39;m productive. The split is simple: Go does API, static file serving, and blog delivery. React does everything the user actually sees and interacts with.</p>
<p>The frontend build outputs to <code>web/public</code> and the Go server picks it up directly. Works fine in dev, works the same in prod.</p>
<h2>What actually got better</h2>
<ul><li>Deploys are one command. <code>systemctl restart</code> and it&#39;s up.</li><li>Memory use is tiny and stays tiny. No leaks, no growth over time.</li><li>When something goes wrong, the error tells you exactly where.</li></ul>
<p>It&#39;s not exciting stuff. That&#39;s sort of the point.</p>
<blockquote><p>Performance is usually a product decision before it is an infrastructure decision.</p></blockquote>
<p>For a portfolio the thing that matters most is that it stays up and I don&#39;t have to think about it. Go&#39;s been good at that.</p>]]></content:encoded>
    </item>
  </channel>
</rss>
