Skip to content

Web-Dev-Codi/DeutschBuddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

108 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

deutschbuddy Logo

๐ŸŽ“ DeutschBuddy

AI-Powered German Language Learning for English Speakers

Achieve conversational fluency with personalized, AI-driven lessons that adapt to your learning pace

Python 3.11+ License: MIT Ollama CEFR A1โ†’B1

Quick Start โ€ข Features โ€ข Architecture โ€ข GPU Setup โ€ข Examples โ€ข Contributing


๐Ÿ“– About

DeutschBuddy helps English speakers achieve conversational fluency in German through personalized, AI-driven lessons that adapt to your learning pace and style. The app focuses on practical language skills you'll actually use in real-world conversations.

๐ŸŽฏ Why DeutschBuddy?

Problem DeutschBuddy Solution
Generic one-size-fits-all lessons Personalized Learning Path adapted to your weaknesses
Forgetting vocabulary quickly Spaced Repetition System for optimal retention
Unclear progression CEFR-Aligned Curriculum (A1 โ†’ B1)
Passive learning Interactive Practice with conversations & quizzes
Waiting for corrections Immediate AI Feedback on grammar & vocabulary
Struggling with German grammar English-Focused lessons addressing common pain points

โš ๏ธ Disclaimer

This project is highly experimental. deutschbuddy is a work in progress and is being actively developed. You may encounter:

  • ๐Ÿ› Bugs and unexpected behavior
  • ๐Ÿ”ง Incomplete features or changing functionality
  • ๐Ÿ“ Evolving curriculum content
  • ๐Ÿ”„ Frequent updates that may break existing workflows

Use at your own risk. This app is intended for learning purposes and should not be considered a complete replacement for formal German language education or professional language tutoring.

If you encounter issues or have suggestions, please open an issue!


โœจ Features

๐Ÿง  AI-Powered Learning

  • Personalized Learning Path: AI curriculum agent analyzes your performance and recommends lessons targeting your specific weaknesses
  • Spaced Repetition System: Automatically schedules vocabulary and grammar reviews at optimal intervals
  • Dual-Layer Curriculum: Static YAML content + dynamic AI guidance for reliable, adaptive learning

๐Ÿ“š Structured Content

  • CEFR-Aligned Levels: Progress through A1 โ†’ A2 โ†’ B1 with confidence
  • Grammar Explanations: Clear explanations with English comparisons
  • Practice Exercises: Interactive quizzes and conversations with instant feedback

๐ŸŽฎ Interactive Interface

  • TUI Dashboard: Beautiful terminal-based interface with keyboard navigation
  • Progress Tracking: Visual mastery scores and completion statistics
  • Review Queue: Targeted practice for vocabulary you're about to forget

๐Ÿš€ Quick Start

Prerequisites

# Python 3.11+
python --version  # Should be 3.11 or higher

# Ollama (https://ollama.ai)
ollama --version

Setup

# 1. Clone the repository
git clone https://github.com/Web-Dev-Codi/deutschbuddy.git
cd deutschbuddy

# 2. Install dependencies with uv
uv sync

# 3. Pull required AI models
ollama pull llama3.1:8b-instruct
ollama pull mistral:7b-instruct

# 4. Launch DeutschBuddy
uv run deutschbuddy

Voilร ! ๐ŸŽ‰ Press l to start your first lesson!


๐Ÿ—๏ธ Architecture

DeutschBuddy uses a dual-layer curriculum system combining static content with dynamic AI guidance:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                       Learner completes lesson                  โ”‚
โ”‚                              โ†“                                  โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚
โ”‚  โ”‚              AI Curriculum Agent                        โ”‚    โ”‚
โ”‚  โ”‚  โ€ข Analyzes performance  โ€ข Identifies knowledge gaps    โ”‚    โ”‚
โ”‚  โ”‚  โ€ข Recommends next lesson โ€ข Adjusts difficulty          โ”‚    โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚
โ”‚                              โ†“                                  โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚
โ”‚  โ”‚           YAML Content Library                          โ”‚    โ”‚
โ”‚  โ”‚  โ€ข A1/ โ€ข A2/ โ€ข B1/ lesson files                         โ”‚    โ”‚
โ”‚  โ”‚  โ€ข Grammar โ€ข Vocabulary โ€ข Exercises                     โ”‚    โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚
โ”‚                              โ†“                                  โ”‚    
โ”‚                    Learner studies โ†’ Repeat                     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

YAML Curriculum Files (Content Library)

Location Purpose
data/curriculum/A1/ Beginner: greetings, articles, present tense
data/curriculum/A2/ Elementary: past tenses, modal verbs, cases
data/curriculum/B1/ Intermediate: passive, Konjunktiv II, complex clauses

AI Curriculum Agent (Learning Strategist)

Responsibilities:

  • ๐Ÿ“Š Analyze learner performance and mastery scores
  • ๐ŸŽฏ Recommend optimal next lessons based on individual needs
  • ๐Ÿ“ˆ Track CEFR level progression (A1 โ†’ A2 โ†’ B1)
  • ๐Ÿ”„ Provide personalized paths based on strengths/weaknesses

๐ŸŽฎ Examples

Personalized Recommendation

๐Ÿ’ก Recommended Next Lesson: A1-GRM-015 (Accusative Prepositions)

Why this lesson?
โ€ข You've mastered nominative case (95% accuracy)
โ€ข Accusative prepositions need practice (62% accuracy)
โ€ข Builds on your existing knowledge

Spaced Repetition Review

๐Ÿ“‹ Review Queue: 3 cards due

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Word         โ”‚ Last Review    โ”‚ Next Review   โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ der Apfel    โ”‚ 2 days ago     โ”‚ NOW           โ”‚
โ”‚ sprechen     โ”‚ 5 days ago     โ”‚ NOW           โ”‚
โ”‚ das Haus     โ”‚ 1 day ago      โ”‚ Tomorrow      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โš™๏ธ GPU Setup on Linux (NVIDIA / AMD / Intel)

DeutschBuddy uses Ollama for local model inference, so Linux GPU acceleration depends on the backend Ollama supports for your hardware:

  • NVIDIA: CUDA backend, Compute Capability 5.0+, driver 531+
  • AMD: ROCm backend for supported Radeon / Radeon Pro / Instinct GPUs
  • Intel: Vulkan backend on Linux, currently experimental in Ollama
  • Fallback: CPU mode if no supported GPU backend is available

Linux Distro Coverage

The app is not limited to Ubuntu or Arch. It can run with GPU acceleration on the major Linux distro families as long as the correct vendor drivers and runtime libraries are installed:

  • Ubuntu / Debian: Ubuntu 22.04+, Debian 12+, with Ollama plus vendor CUDA / ROCm / Vulkan packages
  • Fedora / RHEL: Fedora, RHEL, Rocky, AlmaLinux, with Ollama plus vendor driver repositories or distro packages
  • Arch-based: Arch, Manjaro, EndeavourOS, with current GPU drivers and Vulkan utilities
  • openSUSE: Tumbleweed and Leap, with Ollama plus vendor drivers and Vulkan utilities
  • Other Linux distros: any modern systemd-based distro with the matching kernel driver, userspace runtime, and ollama serve
๐Ÿ“ฆ Step 1: Install Ollama on Linux (click to expand)
curl -fsSL https://ollama.com/install.sh | sh
ollama -v
๐ŸŸฉ NVIDIA GPUs (CUDA) (click to expand)

Install the current NVIDIA driver / CUDA stack for your distro, then verify detection:

nvidia-smi
ollama serve
  • Ollama supports NVIDIA GPUs with Compute Capability 5.0+
  • Recommended if you have GeForce RTX, RTX A-series, Quadro RTX, Tesla, or newer supported cards
  • If you have multiple NVIDIA GPUs, you can limit visibility with CUDA_VISIBLE_DEVICES

๐Ÿ“– NVIDIA CUDA downloads: developer.nvidia.com/cuda-downloads

๐ŸŸฅ AMD GPUs (ROCm) (click to expand)

Install ROCm for your distro, then verify detection:

rocm-smi
ollama serve
  • Best path for supported AMD Radeon RX, Radeon Pro, and Instinct GPUs on Linux
  • If your GPU is close to a supported ROCm target but not recognized, you can try an override

Example for an RX 7800 XT:

export HSA_OVERRIDE_GFX_VERSION=11.0.2
ollama serve

๐Ÿ“– AMD ROCm Linux install guide: rocm.docs.amd.com

๐ŸŸฆ Intel GPUs and additional Vulkan-capable GPUs (click to expand)

On Linux, Ollama also has experimental Vulkan support, which is the most relevant path for Intel GPUs and some additional AMD setups.

Install your distro's Vulkan driver stack and verification tools, then run:

export OLLAMA_VULKAN=1
vulkaninfo --summary
ollama serve
  • Best fit for Intel Arc and other Linux systems where Vulkan is the available acceleration path
  • Vulkan support in Ollama is still experimental, so stability may vary more than CUDA or ROCm
  • If you need to restrict Vulkan devices, use GGML_VK_VISIBLE_DEVICES

๐Ÿ“– Intel Linux GPU docs: dgpu-docs.intel.com

โœ… Step 2: Verify your backend (click to expand)

Use the command that matches your GPU vendor:

# NVIDIA
nvidia-smi

# AMD
rocm-smi

# Intel / Vulkan
vulkaninfo --summary

Environment Variables

  • CUDA_VISIBLE_DEVICES: limit NVIDIA GPUs visible to Ollama
  • ROCR_VISIBLE_DEVICES: limit AMD GPUs visible to Ollama
  • HSA_OVERRIDE_GFX_VERSION: override AMD GFX target for unsupported-but-similar AMD GPUs
  • OLLAMA_VULKAN: enable Vulkan backend
  • GGML_VK_VISIBLE_DEVICES: limit Vulkan-visible GPUs
  • OLLAMA_GPU_OVERHEAD: reserve VRAM headroom if you hit OOM
  • OLLAMA_NUM_GPU: control GPU offload, though auto-detection is usually fine

Linux Notes

  • NVIDIA: if GPU detection breaks after suspend/resume, reloading nvidia_uvm may help
  • AMD: on some distros, the ollama user may need access to the render group
  • Intel / Vulkan: install both Vulkan drivers and vulkaninfo tooling for your distro
  • All vendors: if GPU setup is incomplete, Ollama will still run on CPU

๐Ÿ’ก 16 GB VRAM class GPUs such as the RX 7800 XT or RTX 4070 Ti-class cards are usually a strong fit for llama3.1:8b and mistral:7b locally.


๐Ÿ“Š CEFR Levels

DeutschBuddy follows the Common European Framework of Reference for Languages:

Level Badge Description Lessons
A1 ๐ŸŸข Beginner โ€” greetings, articles, present tense 20 lessons
A2 ๐ŸŸก Elementary โ€” Perfekt, modals, cases 15 lessons
B1 ๐Ÿ”ต Intermediate โ€” passive, Konjunktiv II, complex clauses 10 lessons

โŒจ๏ธ Keyboard Shortcuts

Global

Key Action
q Quit
h Home (dashboard)
? Toggle help
Ctrl+R Review queue
Esc Back / Close

Home Dashboard

Key Action
l Start lesson
p View progress
r Review vocabulary
s Settings

๐Ÿ”ง Settings

Press s from home or navigate to Settings in the sidebar.

Setting Description Default
Curriculum model AI for lesson recommendations llama3.1:8b-instruct
Interaction model AI for quizzes & tutoring mistral:7b-instruct
Ollama host Ollama instance URL http://localhost:11434

Settings are persisted to config/settings.toml.


๐Ÿค Contributing

Contributions are welcome! ๐ŸŽ‰

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Development Setup

# Clone your fork
git clone https://github.com/YOUR_USERNAME/deutschbuddy.git
cd deutschbuddy

# Install in dev mode
uv sync --dev

# Run tests (if available)
uv run pytest

๐Ÿ“– See CONTRIBUTING.md for detailed guidelines.


๐Ÿ“š Additional Resources


๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with โค๏ธ for German learners everywhere

โฌ†๏ธ Back to top