kanji-buddy

Overview

A private kanji trainer: a clone of the WaniKani API, an SRS engine that schedules reviews, and a web app to do them in.

Versionv0.3.0
Live atkanjibuddy.mblrc.me
Repositorygithub.com/mnbayan/kanji-buddy (private)
StackNext.js 15 · React 19 · Drizzle · Neon Postgres 18 · Vercel
Tests162, on an in-process Postgres

Version numbers here

The git tag is the truth: v0.3.0. Note that package.json still reads 0.1.0 — it was never bumped alongside the tags, so don’t trust it. Worth fixing the next time the file is touched.

Why it exists

WaniKani teaches Japanese kanji by spaced repetition, and it is very good. It is also a subscription. The content — the mnemonics, the readings, the level ordering — is theirs and stays theirs; what this rebuilds is the machinery around it: the scheduling, the quizzing, the progress tracking.

The API is a deliberate clone of WaniKani’s public API v2, matching its response envelopes, its pagination and its filters. That was not a stylistic choice. Cloning a specification someone else already thought through removes a hundred small design decisions, and it means any client written against WaniKani — including the mobile apps I might write later — can point at this instead by changing one base URL.

This is private, and stays private

The subject data is WaniKani’s copyrighted content. The repository is private, data/ and public/radicals/ are git-ignored, and there is no sign-up — accounts are minted by hand or by the portal. It is built for one person and a couple of invited friends, and the design leans on that throughout.

The shape of it

browser │ ├── pages React, client-side, talks to its own API │ / dashboard │ /lessons learn a batch, then quiz it │ /reviews the SRS review session │ /levels/[n] browse │ ├── /api/v1/* WaniKani-compatible REST │ subjects, assignments, reviews, review_statistics, │ study_materials, level_progressions, resets, summary, │ user, spaced_repetition_systems, voice_actors │ ├── /api/v1/dashboard one aggregated read (not WaniKani's) ├── /api/v1/internal/* service-to-service: sessions, nudges └── /api/v1/unsubscribe one-click email opt-out Vercel Cron ──daily──▶ /api/v1/internal/nudges ──▶ Resend Portal (mblrc.me) ────▶ /api/v1/internal/sessions

What’s built

AreaState
APIAll 11 WaniKani v2 resources, read and write, with id-cursor pagination, updated_after filtering and ETag/304.
SRS engineBoth WaniKani systems (standard and accelerated), the documented penalty formula, and authentic unlock progression.
Web appDashboard, lesson batches, review sessions, level and type browsing, subject detail pages.
AuthBearer tokens and portal single sign-on, with per-user isolation enforced on every route.
EmailA daily cron that nudges you when work piles up, at most weekly, with one-click unsubscribe.

What’s deliberately absent

  • No sign-up. Access is invite-only, so there is no registration flow, no password reset, no email verification.
  • No payments, no roles, no admin. Two users.
  • No extra study. The dashboard counts recent lessons, mistakes and burned items, but the rows aren’t tappable yet — the self-study quiz behind them was never built.
  • No mnemonic illustrations. They aren’t in the API; only the 22 fields WaniKani actually returns are available.

How to read these pages

Architecture explains the stack and why each piece was chosen; Code map is the tour of the directory tree. If Next.js itself is the unfamiliar part, read Next.js by example before the internals — it explains the framework using this codebase rather than a toy.