Skip to content

sarmientoF/OpenKani

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ¦€ OpenKani

Self-hosted WaniKani backend. Own your data, zero API calls after migration.

MIT License Bun Hono Turso Vercel

KanjiSchool Dashboard


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.

Try it now

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.

Why OpenKani?

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)

How it works

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
Loading

Quick start

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:3000

Full setup details in docs/SETUP.md

Deploy to Vercel

API

Deploy with Vercel

Web client

Deploy with Vercel

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.

Clients

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 --recursive

Stack

Backend: 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)

Roadmap

  • Web client (KanjiSchool)
  • iOS client release (Tsurukame fork)
  • Android client release (Smouldering Durtles fork)
  • Open Claw plugin support

Docs

License

MIT

About

πŸ¦€ Self-hosted WaniKani backend. Migrate once, own your data β€” zero API calls after. Runs on Vercel + Turso free tiers.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors