<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[FSRS, boss fights and a K8s cluster]]></title><description><![CDATA[Build notes from yamiyomi, a solo Japanese reading and flashcard site: Nuxt 4, Go, FSRS spaced repetition, self-hosted Kubernetes and DevOps lessons.]]></description><link>https://gottfriedgenin.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6b12ac9cac125e2daa4b013d/a19ddd37-c323-4817-a081-5bad2b9b0c70.png</url><title>FSRS, boss fights and a K8s cluster</title><link>https://gottfriedgenin.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Dec 2026 21:30:40 GMT</lastBuildDate><atom:link href="https://gottfriedgenin.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[I built Japanese flashcards that fight back: Nuxt 4, Go, FSRS and a self-hosted Kubernetes cluster]]></title><description><![CDATA[How I built yamiyomi: furigana stored in content, FSRS with a cap on early intervals, boss fights in reviews, and a crawler OOM bug.]]></description><link>https://gottfriedgenin.hashnode.dev/i-built-japanese-flashcards-that-fight-back-nuxt-4-go-fsrs-and-a-self-hosted-kubernetes-cluster</link><guid isPermaLink="true">https://gottfriedgenin.hashnode.dev/i-built-japanese-flashcards-that-fight-back-nuxt-4-go-fsrs-and-a-self-hosted-kubernetes-cluster</guid><category><![CDATA[Language Learning]]></category><category><![CDATA[Japanese,]]></category><category><![CDATA[Kubernetes]]></category><category><![CDATA[Devops]]></category><category><![CDATA[Japan]]></category><dc:creator><![CDATA[Gottfried Genin]]></dc:creator><pubDate>Fri, 04 Dec 2026 12:32:11 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b12ac9cac125e2daa4b013d/90fd66fc-6b6c-432a-9f08-60d4833cf4ce.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Plain flashcards get boring. I kept skipping mine, so I built <a href="https://yamiyomi.com">yamiyomi</a>.</p>
<p>It's a Japanese reading site where words you save turn into pixel-art decks, complete with levels and boss fights for vocabulary you thought you'd already mastered.</p>
<p>I'm a DevOps engineer in Germany and this is a solo side project. This post is the build story: the stack, the parts that were harder than expected, and the one bug that kept killing my pods.</p>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/b1v2apt3u6endr0cvaey.jpg" alt="Homepage" /></p>
<h2>What it does</h2>
<ul>
<li><strong>Read real Japanese.</strong> About 480 news stories and long-form articles, with furigana over every kanji and a JLPT tag under every word. No account needed to read.</li>
<li><strong>Click any word</strong> to see its reading and meaning, then add it to a deck with an example sentence and audio. You can follow a word down a rabbit hole: look up its kanji, explore the radicals, find similar words, or discover other kanji with the same reading.</li>
<li><strong>Review with spaced repetition</strong>, but in themed decks: weather, tech, music and arts, dialects. Each deck is a pixel-art world with levels.</li>
<li><strong>Boss fights.</strong> Words you already know get pulled back as challenges: fill the gap, pick the right kanji, read it aloud.</li>
</ul>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/11t7jbou7177sp6db2od.jpg" alt="News page" />
<img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/46f5gr66sl20q9pf20qk.jpg" alt="Reading with furigana and a word lookup" /></p>
<h2>The stack</h2>
<table>
<thead>
<tr>
<th>Layer</th>
<th>Choice</th>
</tr>
</thead>
<tbody><tr>
<td>Frontend</td>
<td>Nuxt 4 (Vue 3.5), SSR, Tailwind CSS v4, Pinia, reka-ui</td>
</tr>
<tr>
<td>API</td>
<td>Go 1.26, chi v5, Postgres via pgx v5</td>
</tr>
<tr>
<td>Data access</td>
<td>sqlc (no ORM), goose migrations</td>
</tr>
<tr>
<td>API contract</td>
<td>OpenAPI first: <code>openapi.yaml</code> -&gt; oapi-codegen, validated with kin-openapi</td>
</tr>
<tr>
<td>SRS</td>
<td>FSRS via go-fsrs</td>
</tr>
<tr>
<td>Infra</td>
<td>arm64 Docker images, self-hosted Kubernetes, GitOps with ArgoCD, Cloudflare Tunnel in front</td>
</tr>
<tr>
<td>CI</td>
<td>GitHub Actions on self-hosted runners</td>
</tr>
</tbody></table>
<p>I'm a DevOps engineer, so naturally I spent quite a bit of time on the infrastructure. No managed platform, no Vercel. Images are built for arm64, ArgoCD syncs the cluster from Git, and a Cloudflare Tunnel means nothing on the cluster is exposed directly to the internet.</p>
<p>OpenAPI-first with oapi-codegen plus sqlc means both ends of the Go service are generated: the HTTP handlers from the spec, the queries from SQL. I maintain the OpenAPI spec and SQL queries myself. The generated code keeps the handlers and database layer in sync.</p>
<h2>Furigana: no tokenizer at runtime</h2>
<p>The obvious approach would be to run a morphological analyser over each article and generate furigana automatically. But Japanese readings can depend heavily on context, and the analyser won't always get them right. A wrong reading is arguably worse than no reading at all, because learners will trust it.</p>
<p>So readings are part of the content. Every compound is written inline in the Markdown source:</p>
<pre><code class="language-text">[投資]{とうし:investment}
</code></pre>
<p>A validator fails the build if any kanji in an article isn't covered. A dictionary (UniDic) is only used offline, to find new words worth curating. Never to decide what the reader sees.</p>
<p>JLPT levels per word come from Jonathan Waller's JLPT lists (CC BY). Learners can hide furigana globally, or only for levels they already know: hide N5 and N4 readings, keep N3 and up.</p>
<p>Content lives in its own Git repo. The API shallow-clones it and reloads on an HMAC-signed webhook, with polling as a fallback. Publishing an article is a <code>git push</code>.</p>
<h2>Spaced repetition: FSRS, with one guard rail</h2>
<p>Reviews run on <a href="https://github.com/open-spaced-repetition">FSRS</a> via go-fsrs, with default parameters. The rating buttons show Anki-style previews of the next interval.</p>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/1yaruw8wvc8fzs9gyfr3.jpg" alt="Review card, weather deck" /></p>
<p>I also added a small safeguard of my own. A card that keeps landing in short, sub-day steps is clearly not sticking yet, but FSRS will still offer a 4-day interval after three 10-minute reviews in a row. So I cap the jump by how many sub-day reviews it took: after one, <em>Good</em> can go at most 3 days out; after two, 2 days; from three on, 1 day (<em>Easy</em> gets one extra day each time). It's ten lines of Go, and it stopped words I was clearly struggling with from vanishing for half a week.</p>
<p>Each deck has its own look. The tech deck is a cyberpunk city, music and arts is an old Edo-style street:</p>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/vithkd332r835l62vn9x.jpg" alt="Tech deck review" /></p>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/94a039ktxubitwnu59vt.jpg" alt="Music and arts review card" /></p>
<h2>Decks with levels</h2>
<p>A deck is split into levels of 25 words, easiest and most common first. Every fifth level has no new words. It's a boss.</p>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/2pe04ufc00wqf8algkxp.jpg" alt="Music and arts deck map with levels" /></p>
<p>The boss's HP scales with how many weak words you have in that deck, with a floor of 20. You start with 3 hearts, plus one for every level you've fully learned, up to 7. Learning the earlier levels properly literally makes the boss easier.</p>
<h2>Boss fights inside normal reviews</h2>
<p>The second kind of boss shows up in normal reviews. When a word you know comes due, it may come back as a challenge instead of a plain card. The longer its current interval, the more likely: 0% under 5 days, 15% at 5 days, rising to 50% at 30 days and beyond. Words you "know" are exactly the ones you stop paying attention to, so those are the ones that get tested.</p>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/pakcz85nyezh5u2z69m5.jpg" alt="Boss: pick the right kanji" /></p>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/kvh7d5rgx599i2lnwvc4.jpg" alt="Boss: fill the gap" /></p>
<p>I also wanted to prevent two things:</p>
<ul>
<li><strong>The roll is seeded</strong> by card and due time. Reloading the page doesn't reroll which cards are challenges, so you can't refresh your way out of a boss.</li>
<li><strong>A miss counts as <em>Again</em>.</strong> Fail the challenge and the word goes back into short-term review, the same as forgetting it on a normal card.</li>
</ul>
<p>Some bosses are drawn on paper scrolls:</p>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/gmmsk17qzcglq9d6cskn.jpg" alt="Boss scroll, read the word" /></p>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/bqn0ngismgh6a1s1pvvz.jpg" alt="Boss scroll, read the word" /></p>
<h2>A dialect deck on a real map</h2>
<p>The dialects deck sits on a 3D-looking map of Japan with 9 regions. It's not a live WebGL scene. At build time a script renders the map in headless Chromium with WebGL, from OpenStreetMap and elevation data, and exports AVIF/WebP layers. The same step generates the polygons you tap. The browser gets images and a few drifting wave and cloud sprites, so it stays light on phones.</p>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/scv3ykokxi8w1dvuyqaz.jpg" alt="Dialect map of Japan" /></p>
<p><img src="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/eqlvc98xt1zqdtp79pav.jpg" alt="Kansai region, zoomed" /></p>
<p>Every dialect form in the deck needs a real web source. The rule in the brief is "never invent forms".</p>
<h2>The bug: crawlers ate my memory</h2>
<p>I didn't notice a memory problem during normal use. It started when search engine crawlers began discovering the site: the web pods kept getting OOM-killed.</p>
<p>Nuxt's SWR route cache and the payload cache were unbounded. Every page a crawler visited added roughly 80 KB, and a kanji page is about 180 KB. There are thousands of kanji pages. Users never visit all of them; crawlers do. Memory climbed until the pod hit its 396 MB heap limit and died.</p>
<p>The fix was boring: both caches are now LRU caches capped at 500 entries. The lesson is the one I give other people at work: <strong>a cache with no size limit is a memory leak with good intentions.</strong></p>
<h2>Where AI is used</h2>
<p>AI does a lot of the content work, and I'd rather say so plainly:</p>
<ul>
<li><strong>News articles</strong> are drafted by an AI agent from the last 24 hours of news, including furigana, English per paragraph and a quiz. The furigana validator and my own review sit after it.</li>
<li><strong>Example sentences, similar words and dialect cards</strong> are curated by an agent from written briefs, then checked by a second agent.</li>
<li><strong>The podcast</strong> is built from an AI audio overview, with intro and outro read by synthetic voices, and Whisper for the word-level transcript timings.</li>
<li><strong>The code, infra and game design</strong> are mine, built with AI coding assistants along the way.</li>
</ul>
<p>What AI does <em>not</em> do is decide readings on the fly. Every reading a learner sees is stored in the content and validated.</p>
<h2>What's next</h2>
<p>More decks, more bosses, and a proper mobile app. If you're learning Japanese from N3 upward, especially if you use it at work, I'd love feedback: <a href="https://yamiyomi.com">yamiyomi.com</a>. Reading needs no account.</p>
<p>If you've built something with FSRS, or have opinions about generating vs. storing furigana, tell me in the comments.</p>
]]></content:encoded></item></channel></rss>