Teach Somali speakers english
# Teach - English Learning App for Somali Speakers
An AI-powered English learning platform designed for Somali-speaking students. Features structured lessons, quizzes, pattern drills, and an AI tutor that explains concepts in Somali using real-time translation.
## Architecture
```
Frontend (React + Vite) :3000
|
Backend (FastAPI) :8000
|
+-- NLLB Translation :8001 (Docker - Somali/English translation)
+-- Qwen AI :8010 (Docker - English tutoring explanations)
+-- PostgreSQL :5432 (Docker - user progress)
```
### How the AI Tutor Works
```
User clicks "Get Help in Somali":
English text --> NLLB (eng_to_som) --> Somali translation displayed
English text --> Qwen --> English explanation --> NLLB (eng_to_som) --> Somali explanation
User types a follow-up in Somali:
Somali input --> NLLB (som_to_eng) --> English --> Qwen --> English reply --> NLLB (eng_to_som) --> Somali reply
```
## Prerequisites
- **Node.js** (v18+)
- **Python** (3.10+)
- **Docker Desktop** with GPU support enabled
- **NVIDIA GPU** with 16GB+ VRAM (e.g. RTX 5070 Ti)
- **NVIDIA Container Toolkit** (included with Docker Desktop)
- NLLB LoRA model files at `C:\Users\pscad\Documents\somali-nllb-training\nllb-somali-english-v3`
## Project Structure
```
Teach/
├── app/ # React frontend (Vite + Tailwind)
│ └── src/components/
│ └── AITutorModal.jsx # AI tutor chat interface
├── backend/
│ ├── main.py # FastAPI backend (API endpoints)
│ ├── requirements.txt # Python dependencies
│ ├── units.json # Unit definitions
│ └── unit-1/ # Lesson JSON files
│ ├── lesson-1.json
│ ├── lesson-2.json
│ └── lesson-3.json
├── services/
│ ├── nllb/ # NLLB translation service
│ │ ├── Dockerfile
│ │ └── app.py
│ └── database/
│ ├── docker-compose.yml # PostgreSQL (standalone)
│ └── init.sql
└── docker-compose.yml # Q …