Teaching assistant app for schools in Uganda-project Teach for All Hackaton
# TFA Africa — AI-Powered Education Platform
An AI-powered platform helping TFA Africa teachers manage 40+ students with vastly different learning levels. Uses Gemini Flash as the LLM interpretation layer on top of a rule-based intelligence engine that works offline.
## Architecture
```
┌─────────────────────────────────────────────┐
│ Layer 4 — Delivery │
│ Teacher Portal (PWA) Student Portal (Web) │
└──────────────────┬──────────────────────────┘
│
┌──────────────────▼──────────────────────────┐
│ Layer 3 — LLM Interpretation │
│ Gemini Flash: quiz gen, lesson plans, │
│ career narratives, gap explanations │
└──────────────────┬──────────────────────────┘
│
┌──────────────────▼──────────────────────────┐
│ Layer 2 — Intelligence Engine (no LLMs) │
│ Gap Detector · Competency Clusterer │
│ Career Matcher · Intervention Flags │
└──────────────────┬──────────────────────────┘
│
┌──────────────────▼──────────────────────────┐
│ Layer 1 — Data Collection │
│ FastAPI · PostgreSQL · Redis │
└─────────────────────────────────────────────┘
```
## Tech Stack
| Layer | Technology |
|---|---|
| Backend API | Python + FastAPI |
| Database | PostgreSQL 15 |
| Cache | Redis 7 |
| LLM | Google Gemini Flash |
| Intelligence Engine | Python + scikit-learn + NetworkX |
| Teacher Portal | React 18 + Vite + Tailwind CSS (PWA) |
| Student Portal | React 18 + Vite + Tailwind CSS |
| Server | Single server via Nginx + Docker Compose |
## Features
### Teacher Portal (`/teacher`)
- **Dashboard** — competency heatmap, at-risk alerts, class average
- **Student Profiles** — per-student gap analysis, AI-generated explanations, career cards
- **Quiz Builder** — AI-generates quizzes in EN/FR/SW/RW adapted to student level
- **Lesson Planner** — full lesson plans with objectives, examples, vocabulary
- **Submit Results** — batch score entry table, triggers intelligence engine
### St …