Self-hosted WaniKani backend. Own your data, zero API calls after migration.
Migrate your WaniKani progress once β all data lives in your own Turso SQLite databases β every request stays on your infra. Works with forked clients on web, iOS, and Android.
Runs entirely on free tiers β Vercel Hobby + Turso Starter. No credit card needed.
No deploy needed β use the public instance to test:
| URL | |
|---|---|
| API | openkani.vercel.app |
| Web client | kanji-school.vercel.app |
Go to kanji-school.vercel.app, enter your WaniKani API key, and start using it immediately. Deploy your own instance later if you want full control.
There is no other open-source, self-hosted WaniKani backend with API v2 compatibility. Here's how alternatives compare:
| OpenKani | WaniKani | Anki | Kanji Koohii | KaniWani | |
|---|---|---|---|---|---|
| Self-hosted | β | β | β (sync server) | β | β |
| WK API v2 compatible | β | β (source) | β | β | Partial |
| Structured kanji curriculum | β | β | β | RTK only | β (reverse only) |
| SRS built-in | β | β | β | β | β |
| Per-user isolated DB | β | β | β | β | β |
| Mobile clients | β | β | β | β | β |
| Free forever | β | β ($9/mo) | β | β | β |
| Migrate existing progress | β | β | β | β | β |
Key differentiators:
- One-time migration β import all WK data, never call their API again
- Per-user SQLite β each user gets an isolated Turso database, not shared tables
- Drop-in clients β forked KanjiSchool (web), Tsurukame (iOS), Smouldering Durtles (Android) point at your backend
- Free deployment β Vercel free tier + Turso free tier (100 DBs, 9GB storage)
sequenceDiagram
participant C as Client
participant B as OpenKani API
participant W as WaniKani API
participant T as Turso
C->>B: POST /v2/migrate {api_key}
B->>W: Fetch all user data
W-->>B: subjects, assignments, reviews...
B->>T: Create per-user DB (seeded from template)
B->>T: Bulk insert all data
B-->>C: {token, counts}
Note over C,W: After migration β WaniKani API never called again
C->>B: GET /v2/subjects (Bearer token)
B->>T: Query user's DB
T-->>B: Results
B-->>C: WK API v2 format response
Prerequisites: Bun >= 1.0, Turso CLI
# 1. Setup Turso (one-time)
turso auth api-tokens mint openkani # platform API token
turso group create openkani # DB group
turso group tokens create openkani # group auth token
turso db create wani-template --group openkani
turso db create wani-registry --group openkani
# 2. Clone & configure
git clone https://github.com/sarmientoF/OpenKani.git
cd OpenKani
bun install
cp .env.example .env # fill in Turso creds
# 3. Push schemas & run
bun run db:push:template
bun run db:push:registry
bun run dev # http://localhost:3000Full setup details in docs/SETUP.md
Set VITE_API_URL to your deployed API URL (e.g. https://openkani.vercel.app).
Both run on Vercel's free Hobby plan. See docs/SETUP.md for env var details.
| App | Platform | Submodule |
|---|---|---|
| KanjiSchool | Web (React) | apps/kanji-school |
| Tsurukame | iOS (Swift) | apps/tsurukame |
| Smouldering Durtles | Android (Java) | apps/smouldering_durtles |
git submodule update --init --recursiveBackend: Bun Β· Hono Β· Drizzle ORM Β· Turso (per-user libSQL) Β· Zod
Web: React 18 Β· Vite Β· Redux Toolkit Β· Ant Design Β· Dexie (IndexedDB)
Hosting: Vercel (Node.js via @vercel/hono)
- Web client (KanjiSchool)
- iOS client release (Tsurukame fork)
- Android client release (Smouldering Durtles fork)
- Open Claw plugin support
- Setup & Deployment β full env var reference, Turso setup, Vercel config
- API Reference β all endpoints, request/response formats
- Architecture β per-user DB pattern, schema design, migration flow
- Contributing β dev setup, PR guidelines
