AI-CS Mentor — An AI-powered Ethiopian Computer Science Exit Exam preparation platform featuring an AI tutor, course-based quizzes, flashcards, realistic mock exams, and exam-focused learning resources.
# AI-CS Mentor — Phase 1 MVP
AI Computer Science Exit Exam Mentor for Ethiopian BSc CS students. This scaffold covers
Phase 1 from the master spec: **auth, course system, notes upload, a basic AI tutor
(direct LLM calls — RAG comes in Phase 2), and quizzes with auto-grading and progress
tracking.**
## Stack
- **Backend:** FastAPI + SQLAlchemy 2.0 + PostgreSQL + Alembic + JWT auth
- **Frontend:** React 18 + TypeScript + Vite + Tailwind + React Router
- **AI:** Anthropic API (Claude), called directly per-message for now; Phase 2 adds a
vector DB (Chroma/Pinecone/Weaviate) and RAG over uploaded materials
## Project layout
```
backend/
app/
core/ # config, DB session, JWT + password hashing
models/ # SQLAlchemy tables (see "Database schema" below)
schemas/ # Pydantic request/response models
api/routes/ # auth, users, courses, materials, quizzes, attempts, progress, tutor
alembic/ # migrations (env.py already wired to the models)
frontend/
src/
api/ # axios client + typed endpoint functions
context/ # AuthContext (JWT storage, current user)
components/ # AppLayout, ProtectedRoute, MasteryRing, ExamCountdown
pages/ # Login, Register, Dashboard, Courses, CourseDetail, Quiz, Tutor,
# Materials, Profile, Admin
```
## Database schema (Phase 1)
`departments` → `courses` (many-to-one; this is what makes adding a second degree
program later an admin action, not a code change)
`users` → `learning_materials`, `attempts`, `ai_conversations`, `student_progress`
`courses` → `topics` → `learning_materials`, `questions`
`quizzes` ↔ `questions` via `quiz_questions`
`attempts` → `attempt_answers` (grading + score lives on `attempts`)
`ai_conversations` → `ai_messages` (this *is* the tutor's memory — Phase 2 adds a
rolling summary back onto `users.strengths_summary` / `weaknesses_summary`)
Coding challenges and subscriptions (Phase 3 in the spec) aren't modeled yet — add them
as their own `models/` files + Alembic revision when you get there, rath …