A native desktop Japanese dictionary and HTTP lookup server, built on a data pipeline that ingests over one million entries from JMdict and KANJIDIC.
djp is two things: a Tauri desktop application for offline Japanese dictionary lookups, and a standalone HTTP server (djpserver) that exposes the same dictionary and Anki card creation over a REST API — usable from browser extensions, scripts, or any HTTP client. The core data layer is a SQLite database with normalised tables and composite indexes enabling near-instant term and kanji resolution regardless of dictionary size.
Dictionaries are loaded from the Yomitan zip format, which means any of the hundreds of community-maintained Yomitan dictionaries work out of the box — JMdict, KANJIDIC, pitch accent data, frequency lists, and more. Each source is tracked independently so lookups can return results from multiple dictionaries side-by-side, sorted by a configurable source priority order.
- Multi-source lookup — results from every loaded dictionary are merged at query time and presented grouped by source, ordered by user-defined priority
- Three query modes per entry type — exact match, by reading (hiragana/katakana/romaji), and by meaning (English FTS over the
simple_indexcolumn) - Romaji → kana conversion — a mora-aware parser handles all standard Hepburn variants, including double-consonant gemination (e.g.
kk→っk) and then/vowel ambiguity - Pitch accent — downstep position and devoiced/nasal sound positions stored per reading, displayed inline on search results
- Anki integration — one-click card creation via AnkiConnect with fully configurable field mappings per note type; supports audio, image, and video attachments
- Persistent, user-ordered source list — dictionaries can be reordered and removed at runtime; source priority is persisted in
metadata.jsonalongside the database - Normalised SQLite schema — terms and kanji are stored across purpose-built tables (
TermReadings,KanjiReadings,TermPitch,TermIpa, etc.) rather than as serialised blobs, making the data portable and queryable with standard SQL tools - Yomitan structured content — the full
StructuredContentnode tree (tables, ruby, images, collapsible details) is parsed and rendered as HTML in the frontend
djpserver is a standalone binary in the same workspace. It loads the same SQLite dictionary as the desktop app (shared path via platform directories) and listens on port 6979 by default.
| Method | Path | Description |
|---|---|---|
GET |
/lookup?q=<term> |
Dictionary lookup — returns all kanji and vocabulary matches as JSON |
GET |
/anki/decks |
List all deck names from a running AnkiConnect instance |
GET |
/anki/models |
List all note type names |
GET |
/anki/models/:model/fields |
List field names for a given note type |
POST |
/anki/cards |
Add a card to Anki |
The POST /anki/cards body contains the deck name, a field mapping, and the card data — the server is stateless and requires no prior configuration.
cargo run -p djpserverOverride the port with the PORT environment variable. CORS is permissive by default for browser extension access. Logging is controlled via RUST_LOG (defaults to djpserver=info).
| Layer | Technology |
|---|---|
| Desktop runtime | Tauri 2 |
| Backend | Rust |
| Database | SQLite via rusqlite |
| Serialisation | bincode (entry storage), serde_json (Yomitan parsing) |
| Frontend | React 18 + TypeScript |
| Styling | Tailwind CSS + DaisyUI |
| Build tooling | Vite |
- Rust toolchain (stable)
- Node.js ≥ 18
- Platform dependencies for Tauri — see the Tauri prerequisites guide
cd djp
npm install
npm run tauri devcd djp
npm run tauri buildThe packaged application is written to djp/src-tauri/target/release/bundle/.
djp does not ship with dictionary data. On first launch, open Dictionary Setup and add any Yomitan-format .zip file. The application will parse, index, and persist the data. Yomitan's recommended dictionaries page is a good starting point.
djp connects to AnkiConnect running on localhost:8765. In the Anki screen, select a target deck and note type, then map djp fields to your note's fields. Once configured, any vocabulary result can be sent to Anki in a single click from the Lookup screen.