Offline PWA for African learners with AI-powered adaptive lessons
# SieraLingo - Offline PWA for African Learners
An offline-first Progressive Web App for adult literacy education, featuring AI-powered adaptive learning using WebLLM.
## Features
- **Fully Offline**: Works without internet after first load
- **AI-Powered Assessment**: Cognitive profiling to personalize learning
- **Adaptive Lessons**: AI generates lessons based on learner profile
- **Bilingual Support**: English and Krio languages
- **Mobile-First**: Optimized for low-end smartphones
- **PWA**: Installable on any device
## Tech Stack
- Pure HTML, CSS, JavaScript (no frameworks)
- WebLLM for in-browser AI inference
- IndexedDB for local storage
- Service Worker for offline caching
## Models Used
The app uses two AI models via WebLLM:
1. **Assessment Agent** (Qwen2.5-0.5B-Instruct)
- ~200 MB download
- Analyzes learner responses
- Generates cognitive profile
2. **Tutor Agent** (Phi-3.5-mini-instruct)
- ~1.3 GB download
- Generates adaptive lessons
- Provides Krio translations
## Project Structure
```
sieralingo/
├── index.html # Home screen
├── assessment.html # Assessment page
├── lesson.html # Lesson page
├── settings.html # Settings page
├── app.js # Main app + WebLLM integration
├── db.js # IndexedDB helper
├── assessment.js # Assessment logic
├── lesson.js # Lesson logic
├── settings.js # Settings logic
├── sw.js # Service worker
├── manifest.json # PWA manifest
├── css/
│ └── style.css # Styles
├── models/ # Model files (optional)
│ ├── .gitkeep
│ └── README.md
└── webllm/ # WebLLM files (loaded from CDN)
```
## Deployment to GitHub Pages
### Step 1: Create a GitHub Repository
1. Go to github.com and sign in
2. Click "New repository"
3. Name it `sieralingo` (or any name you prefer)
4. Select "Public"
5. Click "Create repository"
### Step 2: Upload Files
Option A - Using Git CLI:
```bash
cd sieralingo
git init
git …