I've been building GoMe Nihongo, a Japanese learning app (Expo React Native for iOS/Android) with a free browser companion on Astro + Cloudflare Workers.
Learning kanji one isolated flashcard at a time gets messy fast, so I wanted radical breakdowns, stroke order, and handwriting practice inside the mobile app, plus an instant browser Kanji Atlas for all 2,384 characters that loads without a login wall or a database hit on every click.
Here are three things that worked well in the build.
1. Mixing open Japanese datasets cleanly
Instead of scraping textbooks, the base data comes from open sources tracked with per-row source and license fields:
- EDRDG (
KANJIDIC2,KRADFILE,JMdict) for readings, vocabulary, and radical parts (like親 = 立 + 木 + 見). - KanjiVG for SVG stroke paths, which powers both the Trace/Freehand handwriting screen in the mobile app and the web Kana Chart.
- Unicode Unihan for extra cross-language data across our 5 UI locales (
en,vi,id,th,my). - Tatoeba for reference sentences.
2. Splitting 2,384 kanji details into 32 static JSON buckets
In the web Kanji Atlas, shipping example words and mnemonics for every character in the initial HTML made the page way too heavy. Querying Postgres on every node tap also felt overkill for read-only data.
So Astro pre-shards the detail payloads into 32 static JSON files at build time:
// web/src/pages/assets/kanji-atlas/[bucket].json.js export function getStaticPaths() { const buckets = Array.from({ length: 32 }, () => ({})); for (const { e, d } of kanji) { const bucket = e.jp.codePointAt(0) % buckets.length; buckets[bucket][e.jp] = { examples: topExamplesByLevel(e.jp), ...(d.mn ? { mnemonic: d.mn } : {}), }; } return buckets.map((data, bucket) => ({ params: { bucket: String(bucket) }, props: { data }, })); } First load only sends lightweight node coordinates, radicals, and JLPT badges. Clicking a character resolves char.codePointAt(0) % 32, fetches one small CDN-cached file, and caches it in memory.
3. Serving ~15,900 extra dictionary entries via 256 Worker shards
Pre-rendering 15,900 extended JMdict entries across 5 languages as static HTML would blow past Cloudflare Workers Assets' 100k file cap.
Instead, the build outputs 256 JSON shards (s/000.json–s/255.json) plus Astro-rendered HTML layout shells. When a request hits an extended word, the Worker reads just one shard, runs the same wordEntry() renderer used by static pages, and stores the result in caches.default with a versioned weak ETag.
Links if you want to try it
- App (iOS & Android): gomenihongo.com/en · App Store · Google Play (freemium, optional Pro from $2/month)
- Kanji Atlas (no sign-up): https://gomenihongo.com/en/dictionary/kanji-map/
- Kana Stroke-Order Chart: https://gomenihongo.com/en/kana/
- 60s Kanji Reading Challenge: https://gomenihongo.com/en/practice-tests/speed-challenge/
- Mini Practice Tests: https://gomenihongo.com/en/practice-tests/
If you're learning Japanese or building with Astro + Cloudflare Workers, let me know what feels rough or what you'd improve!


