AI-powered local German learning platform — book reader, spaced-repetition vocab, grammar roadmap, conversation scenarios, and writing practice with examiner-level AI correction. Runs entirely on your computer.
TypeScript
15
13 commits
updated Jul 6, 2026
DeutschPath is a local-first German learning platform that runs entirely on your computer.
Upload real German books, annotate words and grammar, chat with an AI tutor,
practice writing, and have full voice conversations — no subscription, no data leaving your machine.
📖 Smart Book ReaderUpload any German PDF — text-based or scanned. Highlight a word to get instant analysis, or a phrase to identify the grammar rule. One click saves it to your study list. A persistent AI tutor chat lets you ask questions about anything on the current page.
|
🗂 Spaced Repetition VocabularyYour saved words are reviewed using the SM-2 algorithm — the same method used by Anki. The app automatically schedules each word for the optimal review moment.
|
📚 Grammar RoadmapA structured A1 → C2 grammar roadmap with 15 pre-built rules. Each rule has its own AI tutor that gives exercises, corrects answers in real time, and advances you when you're ready.
|
🎭 Conversation ScenariosPractice real German in 10 role-play scenarios — grocery store, restaurant, bank, doctor, job interview, and more. The AI agent stays in character and adapts to your CEFR level.
|
✍️ Writing PracticeSelect a topic by level and type (essay, email, story, exam prompt), write in German, and get detailed AI feedback with a scored diff view.
|
📐 Cases Reference & PracticeA complete German case reference covering all articles, adjective endings, and personal pronouns — with a fill-in-the-blank practice mode and live scoring.
|
AI explanations are delivered in your chosen language(s) — pick English only, a second language only, or both. Configurable in Settings:
| 🇮🇷 Persian | 🇸🇦 Arabic | 🇷🇺 Russian | 🇫🇷 French | 🇪🇸 Spanish | 🇹🇷 Turkish | 🇨🇳 Chinese | 🇯🇵 Japanese |
| 🇰🇷 Korean | 🇵🇹 Portuguese | 🇮🇹 Italian | 🇵🇱 Polish | 🇳🇱 Dutch | 🇸🇪 Swedish | 🇺🇦 Ukrainian | 🇬🇧 English |
No installation wizard. Just double-click.
|
🍎 macOS
|
🪟 Windows
|
The launcher:
DeutschPath uses Google's Gemini API. The free tier covers regular personal use.
AQ. in current AI Studio versions)Free tier limits (as of June 2026): 10 requests/min · 250,000 tokens/min · 250 requests/day for Gemini 2.5 Flash text. The TTS model (
gemini-2.5-flash-preview-tts) has no free tier — voice features (auto-play in scenarios and the reader) are billed at paid rates. Keep auto-play off if you want to stay on the free tier.
When you have finished using the platform and want to exit, do NOT simply close the tab. First, shut down the platform by clicking the button in the top right corner, and only then close the tab.
| Category | Tool / Library | Version | Purpose |
|---|---|---|---|
| UI Framework | Next.js | 15 | App Router, server components, routing |
| UI Runtime | React | 19 | Component rendering |
| Language | TypeScript | 5 (strict) | Type safety across the frontend |
| Styling | Tailwind CSS | 3 | Utility-first CSS, dark mode |
| State | Zustand | — | Global UI state (user level, languages) |
| Icons | lucide-react | — | SVG icon set |
| API Framework | FastAPI | 0.111 | REST API, async request handling |
| Language | Python | 3.10+ | Backend runtime |
| ORM | SQLAlchemy | 2 | Database models and queries |
| Server | Uvicorn | — | ASGI server for FastAPI |
| Database | SQLite | — | Local file database, zero config |
| AI — text | Google Gemini 2.5 Flash | — | Analysis, chat, OCR, grammar, writing |
| AI — voice | Gemini 2.5 Flash TTS Preview | — | Neural TTS, PCM16 audio output |
| PDF — text | pdfplumber | — | Text extraction from native PDFs |
| PDF — scanned | Gemini Vision | — | OCR fallback for image-based PDFs |
| Speech input | Web Speech API | browser | Microphone input in scenarios |
| Spaced repetition | SM-2 algorithm | — | Vocabulary review scheduling |
| Image processing | Pillow | — | Launcher icon generation (.icns / .ico) |
| Launcher | Python http.server + subprocess | — | Cross-platform app launcher |
╔══════════════════════════════════════════════════════════════════╗
║ USER'S MACHINE ║
║ ║
║ ┌───────────────────────────────────────────────────────────┐ ║
║ │ Browser (localhost:3000) │ ║
║ │ Next.js 15 · React 19 · TypeScript │ ║
║ │ │ ║
║ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ ║
║ │ │ Reader │ │ Vocab / │ │ Grammar │ │ Writing │ │ ║
║ │ │ + Chat │ │ Flashcd │ │ Roadmap │ │ Practice │ │ ║
║ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ ║
║ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ ║
║ │ │Scenarios │ │ Cases │ │Dashboard │ │ Settings │ │ ║
║ │ │+ Voice │ │ & Drills │ │& Progress│ │& API Key │ │ ║
║ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ ║
║ └────────────────────────┬──────────────────────────────────┘ ║
║ │ HTTP/JSON (fetch) ║
║ ┌────────────────────────▼──────────────────────────────────┐ ║
║ │ FastAPI (localhost:8000) │ ║
║ │ │ ║
║ │ Routers Services │ ║
║ │ ├─ /books (reader,OCR) ├─ ai_service.py │ ║
║ │ ├─ /words (vocab, SM-2) │ └─ all Gemini calls │ ║
║ │ ├─ /grammar (roadmap) ├─ pdf_service.py │ ║
║ │ ├─ /scenarios (chat) │ └─ pdfplumber + OCR │ ║
║ │ ├─ /writing (feedback) ├─ tts_service.py │ ║
║ │ ├─ /tts (audio out) └─ usage_tracker.py │ ║
║ │ ├─ /settings (key, stats) └─ usage.json │ ║
║ │ └─ /users (profile) │ ║
║ └──────────┬─────────────────────────┬──────────────────────┘ ║
║ │ │ ║
║ ┌──────────▼──────────┐ │ HTTPS ║
║ │ SQLite Database │ │ ║
║ │ deutschpath.db │ ╔─────────▼──────────────────╗ ║
║ │ │ ║ Google Gemini API ║ ║
║ │ Books · Words │ ║ ║ ║
║ │ Grammar · Sessions │ ║ gemini-2.5-flash ║ ║
║ │ Writing · Profile │ ║ (text · vision · chat) ║ ║
║ │ Annotations │ ║ ║ ║
║ └─────────────────────┘ ║ gemini-2.5-flash-tts ║ ║
║ ║ (neural voice output) ║ ║
║ ╚════════════════════════════╝ ║
╚══════════════════════════════════════════════════════════════════╝
_get_client() in ai_service.py initialises the Gemini SDK on first use. If no API key is set it raises a friendly error shown in the Settings UI — the app starts cleanly without a key.database.py runs CREATE TABLE IF NOT EXISTS plus a _migrate_sqlite() pass on every startup to add new columns to existing tables without wiping data. No Alembic, no migration files.usage.json because they have very different per-token prices ($0.30/$2.50 vs $0.50/$10.00 per 1M). The Settings page shows both breakdowns and links to AI Studio for accurate real-time figures.gemini-2.5-flash-preview-tts (PCM16 audio wrapped in a WAV header server-side). There is no browser speechSynthesis fallback — consistent quality over silent degradation.dir="ltr" unicode-bidi: isolate so word order renders correctly in both directions simultaneously.Backend
cd backend
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # add your GEMINI_API_KEY
uvicorn main:app --reload --port 8000
Frontend
cd frontend
npm install
npm run dev
backend/.env
GEMINI_API_KEY=your_key_here
FRONTEND_URL=http://localhost:3000
frontend/.env.local (copy from .env.local.example)
NEXT_PUBLIC_API_URL=http://localhost:8000
NEXT_PUBLIC_USER_ID=demo-user-001
DeutschPath/
├── backend/
│ ├── main.py # FastAPI app entry point — mounts all routers
│ ├── models.py # SQLAlchemy ORM models
│ ├── database.py # SQLite engine, init_db(), auto-migration, seeding
│ ├── seed_data.py # 15 grammar rules (A1→C2) + 10 scenarios
│ ├── requirements.txt
│ ├── routers/
│ │ ├── books.py # PDF upload, OCR, page text, reader chat, transcription
│ │ ├── words.py # Vocabulary CRUD, SM-2 review, batch analysis
│ │ ├── grammar.py # Grammar roadmap, exercises, mastery, AI practice chat
│ │ ├── scenarios.py # Scenario listing, conversation sessions
│ │ ├── writing.py # Writing topics, AI analysis, session history
│ │ ├── tts.py # Gemini TTS endpoint → WAV response
│ │ ├── settings.py # API key, usage stats, backup/restore
│ │ └── users.py # User profile, daily goal, stats
│ └── services/
│ ├── ai_service.py # All Gemini calls (analysis, chat, OCR, TTS, transcription)
│ ├── pdf_service.py # PDF text extraction (pdfplumber + Gemini OCR fallback)
│ ├── tts_service.py # gTTS stub (unused — kept for reference)
│ └── usage_tracker.py # Token/cost tracking per call type → usage.json
├── frontend/
│ └── src/
│ ├── app/ # Next.js pages: reader · vocabulary · grammar · writing
│ │ # scenarios · cases · dashboard · settings · contact
│ ├── components/
│ │ ├── layout/ # TabNav, ConfirmLeaveDialog, LevelBadge
│ │ ├── reader/ # PDFViewer, TextPanel, AnalysisTable,
│ │ │ # WordExplanationCard, GrammarExplanationCard, BookUpload
│ │ ├── vocabulary/ # FlashCard, QuizGame
│ │ └── writing/ # WritingTopicCard, DiffView
│ ├── hooks/
│ │ └── useTheme.ts # Dark/light mode (persisted in localStorage)
│ └── lib/
│ ├── api.ts # All fetch calls to the backend (single source of truth)
│ ├── store.ts # Zustand store — userLevel, translationLanguages, UI state
│ ├── languages.ts # 16 supported languages with RTL flags
│ └── speak.ts # Browser TTS wrapper (legacy, not used for main TTS)
├── launcher.py # Cross-platform launcher — mini HTTP progress server + subprocess
├── DeutschPath.app/ # macOS app bundle — double-click to launch
├── DeutschPath.bat # Windows first-run setup (auto-installs Python + Node.js)
├── DeutschPath.vbs # Windows silent launcher (no terminal window)
└── frontend/public/
├── logo.png # App logo — source for .icns (Mac) and .ico (Windows)
├── background.png # README banner and Contact page background
└── profile.png # Author photo (Contact page)
DeutschPath started as a hobby weekend project — born out of personal frustration with existing German learning tools that are either too expensive, too gamified, or don't let you learn from real books. It is free and open source.
If it saves you time or makes learning German a little less painful, consider buying a coffee — it keeps the weekend sessions going.
Dual License: AGPL v3 + Commercial — see LICENSE for the full text.
By submitting a pull request you agree that your contribution may also be distributed under a commercial license by the project owner.
Made by Saber Jelodari
AI responses are generated by Gemini and may occasionally contain mistakes — always verify important German.
TypeScript
57.0%
Python
36.8%
Batchfile
2.1%
HTML
2.0%
Shell
1.2%
AI-powered local German learning platform — book reader, spaced-repetition vocab, grammar roadmap, conversation scenarios, and writing practice with examiner-level AI correction. Runs entirely on your computer.
TypeScript
15
13 commits
updated Jul 6, 2026
DeutschPath is a local-first German learning platform that runs entirely on your computer.
Upload real German books, annotate words and grammar, chat with an AI tutor,
practice writing, and have full voice conversations — no subscription, no data leaving your machine.
📖 Smart Book ReaderUpload any German PDF — text-based or scanned. Highlight a word to get instant analysis, or a phrase to identify the grammar rule. One click saves it to your study list. A persistent AI tutor chat lets you ask questions about anything on the current page.
|
🗂 Spaced Repetition VocabularyYour saved words are reviewed using the SM-2 algorithm — the same method used by Anki. The app automatically schedules each word for the optimal review moment.
|
📚 Grammar RoadmapA structured A1 → C2 grammar roadmap with 15 pre-built rules. Each rule has its own AI tutor that gives exercises, corrects answers in real time, and advances you when you're ready.
|
🎭 Conversation ScenariosPractice real German in 10 role-play scenarios — grocery store, restaurant, bank, doctor, job interview, and more. The AI agent stays in character and adapts to your CEFR level.
|
✍️ Writing PracticeSelect a topic by level and type (essay, email, story, exam prompt), write in German, and get detailed AI feedback with a scored diff view.
|
📐 Cases Reference & PracticeA complete German case reference covering all articles, adjective endings, and personal pronouns — with a fill-in-the-blank practice mode and live scoring.
|
AI explanations are delivered in your chosen language(s) — pick English only, a second language only, or both. Configurable in Settings:
| 🇮🇷 Persian | 🇸🇦 Arabic | 🇷🇺 Russian | 🇫🇷 French | 🇪🇸 Spanish | 🇹🇷 Turkish | 🇨🇳 Chinese | 🇯🇵 Japanese |
| 🇰🇷 Korean | 🇵🇹 Portuguese | 🇮🇹 Italian | 🇵🇱 Polish | 🇳🇱 Dutch | 🇸🇪 Swedish | 🇺🇦 Ukrainian | 🇬🇧 English |
No installation wizard. Just double-click.
|
🍎 macOS
|
🪟 Windows
|
The launcher:
DeutschPath uses Google's Gemini API. The free tier covers regular personal use.
AQ. in current AI Studio versions)Free tier limits (as of June 2026): 10 requests/min · 250,000 tokens/min · 250 requests/day for Gemini 2.5 Flash text. The TTS model (
gemini-2.5-flash-preview-tts) has no free tier — voice features (auto-play in scenarios and the reader) are billed at paid rates. Keep auto-play off if you want to stay on the free tier.
When you have finished using the platform and want to exit, do NOT simply close the tab. First, shut down the platform by clicking the button in the top right corner, and only then close the tab.
| Category | Tool / Library | Version | Purpose |
|---|---|---|---|
| UI Framework | Next.js | 15 | App Router, server components, routing |
| UI Runtime | React | 19 | Component rendering |
| Language | TypeScript | 5 (strict) | Type safety across the frontend |
| Styling | Tailwind CSS | 3 | Utility-first CSS, dark mode |
| State | Zustand | — | Global UI state (user level, languages) |
| Icons | lucide-react | — | SVG icon set |
| API Framework | FastAPI | 0.111 | REST API, async request handling |
| Language | Python | 3.10+ | Backend runtime |
| ORM | SQLAlchemy | 2 | Database models and queries |
| Server | Uvicorn | — | ASGI server for FastAPI |
| Database | SQLite | — | Local file database, zero config |
| AI — text | Google Gemini 2.5 Flash | — | Analysis, chat, OCR, grammar, writing |
| AI — voice | Gemini 2.5 Flash TTS Preview | — | Neural TTS, PCM16 audio output |
| PDF — text | pdfplumber | — | Text extraction from native PDFs |
| PDF — scanned | Gemini Vision | — | OCR fallback for image-based PDFs |
| Speech input | Web Speech API | browser | Microphone input in scenarios |
| Spaced repetition | SM-2 algorithm | — | Vocabulary review scheduling |
| Image processing | Pillow | — | Launcher icon generation (.icns / .ico) |
| Launcher | Python http.server + subprocess | — | Cross-platform app launcher |
╔══════════════════════════════════════════════════════════════════╗
║ USER'S MACHINE ║
║ ║
║ ┌───────────────────────────────────────────────────────────┐ ║
║ │ Browser (localhost:3000) │ ║
║ │ Next.js 15 · React 19 · TypeScript │ ║
║ │ │ ║
║ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ ║
║ │ │ Reader │ │ Vocab / │ │ Grammar │ │ Writing │ │ ║
║ │ │ + Chat │ │ Flashcd │ │ Roadmap │ │ Practice │ │ ║
║ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ ║
║ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ ║
║ │ │Scenarios │ │ Cases │ │Dashboard │ │ Settings │ │ ║
║ │ │+ Voice │ │ & Drills │ │& Progress│ │& API Key │ │ ║
║ │ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ ║
║ └────────────────────────┬──────────────────────────────────┘ ║
║ │ HTTP/JSON (fetch) ║
║ ┌────────────────────────▼──────────────────────────────────┐ ║
║ │ FastAPI (localhost:8000) │ ║
║ │ │ ║
║ │ Routers Services │ ║
║ │ ├─ /books (reader,OCR) ├─ ai_service.py │ ║
║ │ ├─ /words (vocab, SM-2) │ └─ all Gemini calls │ ║
║ │ ├─ /grammar (roadmap) ├─ pdf_service.py │ ║
║ │ ├─ /scenarios (chat) │ └─ pdfplumber + OCR │ ║
║ │ ├─ /writing (feedback) ├─ tts_service.py │ ║
║ │ ├─ /tts (audio out) └─ usage_tracker.py │ ║
║ │ ├─ /settings (key, stats) └─ usage.json │ ║
║ │ └─ /users (profile) │ ║
║ └──────────┬─────────────────────────┬──────────────────────┘ ║
║ │ │ ║
║ ┌──────────▼──────────┐ │ HTTPS ║
║ │ SQLite Database │ │ ║
║ │ deutschpath.db │ ╔─────────▼──────────────────╗ ║
║ │ │ ║ Google Gemini API ║ ║
║ │ Books · Words │ ║ ║ ║
║ │ Grammar · Sessions │ ║ gemini-2.5-flash ║ ║
║ │ Writing · Profile │ ║ (text · vision · chat) ║ ║
║ │ Annotations │ ║ ║ ║
║ └─────────────────────┘ ║ gemini-2.5-flash-tts ║ ║
║ ║ (neural voice output) ║ ║
║ ╚════════════════════════════╝ ║
╚══════════════════════════════════════════════════════════════════╝
_get_client() in ai_service.py initialises the Gemini SDK on first use. If no API key is set it raises a friendly error shown in the Settings UI — the app starts cleanly without a key.database.py runs CREATE TABLE IF NOT EXISTS plus a _migrate_sqlite() pass on every startup to add new columns to existing tables without wiping data. No Alembic, no migration files.usage.json because they have very different per-token prices ($0.30/$2.50 vs $0.50/$10.00 per 1M). The Settings page shows both breakdowns and links to AI Studio for accurate real-time figures.gemini-2.5-flash-preview-tts (PCM16 audio wrapped in a WAV header server-side). There is no browser speechSynthesis fallback — consistent quality over silent degradation.dir="ltr" unicode-bidi: isolate so word order renders correctly in both directions simultaneously.Backend
cd backend
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # add your GEMINI_API_KEY
uvicorn main:app --reload --port 8000
Frontend
cd frontend
npm install
npm run dev
backend/.env
GEMINI_API_KEY=your_key_here
FRONTEND_URL=http://localhost:3000
frontend/.env.local (copy from .env.local.example)
NEXT_PUBLIC_API_URL=http://localhost:8000
NEXT_PUBLIC_USER_ID=demo-user-001
DeutschPath/
├── backend/
│ ├── main.py # FastAPI app entry point — mounts all routers
│ ├── models.py # SQLAlchemy ORM models
│ ├── database.py # SQLite engine, init_db(), auto-migration, seeding
│ ├── seed_data.py # 15 grammar rules (A1→C2) + 10 scenarios
│ ├── requirements.txt
│ ├── routers/
│ │ ├── books.py # PDF upload, OCR, page text, reader chat, transcription
│ │ ├── words.py # Vocabulary CRUD, SM-2 review, batch analysis
│ │ ├── grammar.py # Grammar roadmap, exercises, mastery, AI practice chat
│ │ ├── scenarios.py # Scenario listing, conversation sessions
│ │ ├── writing.py # Writing topics, AI analysis, session history
│ │ ├── tts.py # Gemini TTS endpoint → WAV response
│ │ ├── settings.py # API key, usage stats, backup/restore
│ │ └── users.py # User profile, daily goal, stats
│ └── services/
│ ├── ai_service.py # All Gemini calls (analysis, chat, OCR, TTS, transcription)
│ ├── pdf_service.py # PDF text extraction (pdfplumber + Gemini OCR fallback)
│ ├── tts_service.py # gTTS stub (unused — kept for reference)
│ └── usage_tracker.py # Token/cost tracking per call type → usage.json
├── frontend/
│ └── src/
│ ├── app/ # Next.js pages: reader · vocabulary · grammar · writing
│ │ # scenarios · cases · dashboard · settings · contact
│ ├── components/
│ │ ├── layout/ # TabNav, ConfirmLeaveDialog, LevelBadge
│ │ ├── reader/ # PDFViewer, TextPanel, AnalysisTable,
│ │ │ # WordExplanationCard, GrammarExplanationCard, BookUpload
│ │ ├── vocabulary/ # FlashCard, QuizGame
│ │ └── writing/ # WritingTopicCard, DiffView
│ ├── hooks/
│ │ └── useTheme.ts # Dark/light mode (persisted in localStorage)
│ └── lib/
│ ├── api.ts # All fetch calls to the backend (single source of truth)
│ ├── store.ts # Zustand store — userLevel, translationLanguages, UI state
│ ├── languages.ts # 16 supported languages with RTL flags
│ └── speak.ts # Browser TTS wrapper (legacy, not used for main TTS)
├── launcher.py # Cross-platform launcher — mini HTTP progress server + subprocess
├── DeutschPath.app/ # macOS app bundle — double-click to launch
├── DeutschPath.bat # Windows first-run setup (auto-installs Python + Node.js)
├── DeutschPath.vbs # Windows silent launcher (no terminal window)
└── frontend/public/
├── logo.png # App logo — source for .icns (Mac) and .ico (Windows)
├── background.png # README banner and Contact page background
└── profile.png # Author photo (Contact page)
DeutschPath started as a hobby weekend project — born out of personal frustration with existing German learning tools that are either too expensive, too gamified, or don't let you learn from real books. It is free and open source.
If it saves you time or makes learning German a little less painful, consider buying a coffee — it keeps the weekend sessions going.
Dual License: AGPL v3 + Commercial — see LICENSE for the full text.
By submitting a pull request you agree that your contribution may also be distributed under a commercial license by the project owner.
Made by Saber Jelodari
AI responses are generated by Gemini and may occasionally contain mistakes — always verify important German.
TypeScript
57.0%
Python
36.8%
Batchfile
2.1%
HTML
2.0%
Shell
1.2%