lector

Latin for "reader"

A self-hosted language learning reader. Read, practice, remember. All on your own terms.

Lector reader view

Lector is a self-hosted language learning reader that combines LingQ-style reading with Clozemaster-style cloze practice, AI-powered writing correction, an LLM tutor, and direct AnkiConnect integration. Import EPUBs or web articles, click words to translate, mine vocabulary, drill sentences, and write journal entries with grammar feedback. All from a single app running on your own hardware.


What it does

📖

EPUB & Markdown Reader

Beautiful Literata serif typography with click-to-translate powered by Claude. Track word states as you read: new, learning, known.

🧩

Cloze Practice

2900+ pre-loaded sentence pairs from Tatoeba, ordered by word frequency. Multiple choice and typing modes with SRS scheduling.

📝

Vocabulary Mining

Save words while reading, track known and learning states. Build your personal vocabulary database as you go.

📦

AnkiConnect

Push cards directly to Anki Desktop from your browser. No proxy, no middleman. Just browser-to-localhost over AnkiConnect.

🌐

Web & Paste Import

Extract articles from any URL via Readability, or paste text directly. Turn anything into reading practice.

🔥

Streaks & Hard Mode

Stay motivated with streak tracking, sound effects, and a hard mode for cloze practice that keeps you honest.

🔊

Text-to-Speech

Optional Google Cloud TTS integration for hearing words and sentences pronounced correctly.

🤖

AI Translation

Claude API or local LLMs (Ollama, Llama, Gemma) for translating uncommon words and phrases on demand. Falls back to a local 2000-word dictionary when offline.

✍️

Writing Journal

Write journal entries in your target language and get AI-powered grammar corrections with inline highlighting, explanations, and before/after comparisons.

💬

LLM Tutor Chat

An always-available AI tutor for asking grammar questions, getting explanations, and practising your target language. Works with Claude or local LLMs.

📊

Statistics Dashboard

Track your CEFR fluency level, vocabulary growth, reading streaks, activity heatmaps, and cloze mastery. See your progress at a glance.

💾

Offline-First Storage

SQLite server-side, IndexedDB client-side. All your data stays local. No cloud accounts, no sync services, no data harvesting.


Supported languages

🇿🇦

Afrikaans → English

2900+ sentence pairs, full dictionary, and word frequency data. The most complete language pack.

🇪🇸

Spanish → English

Coming soon.

🇩🇪

German → English

Coming soon.

The reader itself works with any language. Language packs add sentence banks and dictionaries for cloze practice. Want your language? Open a PR – adding a new language pair is straightforward.


Why self-host

Your data, your server

Your reading history, vocabulary, and progress live in a SQLite file on your hardware. No third-party databases, no analytics, no telemetry.

No subscriptions

Deploy once, learn forever. No monthly fees, no premium tiers, no feature gates. LingQ charges $12.99/mo, Clozemaster Pro is ~$13/mo. Lector is free.

Works offline

The reader, cloze practice, and vocabulary tracking all work without internet. AI translation is the only feature that needs a connection.

Simple backup

One SQLite file, one Docker volume. Back it up however you like: rsync, borg, or just copy it to a USB drive.


See it in action

Lector reader view showing Harry Potter in Afrikaans with word state colors
Reader: EPUB with click-to-translate and word state tracking
Cloze practice with multiple choice options and mastery tracking
Cloze practice: sentence drilling with SRS scheduling
Vocabulary table with word states, translations, and Anki sync
Vocabulary: mined words with known/learning states
Library showing imported Afrikaans books and articles
Library: imported books and web articles
LLM tutor chat showing an Afrikaans grammar conversation
LLM Tutor: ask grammar questions and get detailed explanations

Get started

# Create a directory for Lector
mkdir lector && cd lector

# Create a docker-compose.yml
cat <<EOF > docker-compose.yml
services:
  lector:
    image: ghcr.io/heuwels/lector:latest
    container_name: lector
    restart: unless-stopped
    ports:
      - "3400:3000"
    environment:
      - NODE_ENV=production
    volumes:
      - ./data:/app/data
EOF

# Start it up
docker compose up -d

Then open http://your-server:3400 in your browser. That's it.

See the full documentation for environment variables, AnkiConnect setup, and reverse proxy configuration.