AI-powered study assistant for Ghanaian students β Telegram bot with quizzes, flashcards, mock exams, and study plans
# StudyAI Ghana π€π
An AI-powered personal study assistant that lives inside Telegram.
**ChatGPT + Quizlet + Exam Practice + Personal Tutor** β for university and
senior high school students, built for Ghana first and designed to expand
worldwide.
> This repository contains **Phase 1 (MVP)**: onboarding, AI tutor, quiz
> generation/taking/scoring, progress tracking, referral attribution,
> premium gating, admin commands, and the full database schema.
---
## β¨ What it does
| Feature | Status |
|---|---|
| `/start` onboarding & student profile (school, level, program, subjects) | β
Phase 1 |
| `/ask` β AI tutor with beginner/intermediate/advanced modes | β
Phase 1 |
| `/quiz` β generate quizzes (subject β topic β difficulty β count) | β
Phase 1 |
| Quiz taking with instant β
/β feedback + explanations | β
Phase 1 |
| Quiz scoring, strong/weak topics, recommendations | β
Phase 1 |
| `/progress` β dashboard: streak, accuracy, subjects, recommended topic | β
Phase 1 |
| XP / levels / daily streaks (gamification foundations) | β
Phase 1 |
| `/premium` plan gating + free-plan daily limits | β
Phase 1 |
| Referral system with rewards + anti-abuse checks | β
Phase 1 |
| `/stats`, `/grant`, `/revoke` admin commands (role-gated) | β
Phase 1 |
| `/notes` β upload PDF/TXT/DOCX/MD β summarize, quiz from material, ask, study guide | β
Phase 2 (partial) |
| Mock exams, photo/OCR notes, flashcards, study plans | π Phase 2 |
| Leaderboard, payments (Telegram Stars), admin web panel | π Phase 3 |
| Telegram Mini App dashboard | π Phase 4 |
## π Architecture
```
studyai-ghana/
βββ app/
β βββ main.py # bot entry point (polling or webhook)
β βββ config.py # pydantic-settings env config
β βββ logging_setup.py
β βββ bot/ # aiogram 3
β β βββ dispatcher.py # middlewares + routers + error handling
β β βββ states.py # FSM states
β β βββ keyboards.py # inline keyboard builders
β β βββ tex β¦