Add database management: Supabase persistence, teacher profiles, admin dashboard

#1
by kuanz - opened
taboola-cz org

Database management: Supabase persistence, teacher profiles, admin dashboard

Durable data foundation for analytics + cross-quiz student tracking, built on top of Yu's 73c0cf0.

Storage: Supabase Postgres via SQLAlchemy 2.0 async + asyncpg. All tables isolated in a dedicated classlens schema (the Supabase project is shared with another live app — public is never touched). Alembic migrations applied on container startup.

New model: teachers (email/full_name/school/is_admin), first-class students (matched across quizzes by normalized name), quizzes, raw_files (Supabase Storage), parsed_data, student_results (per-student-per-quiz analytics backbone), prompts, reports (linked to quiz + student).

Features: teacher registration captures name + school; ADMIN_EMAILS bootstrap; raw uploads archived to Storage; Save-to-DB on report generation + explicit POST /api/sessions/{id}/save-to-db; admin API /api/admin/* (stats, users, sessions, per-student cross-quiz timeline); in-app ē®”ē†å¾Œå° dashboard gated by is_admin.

Verified: end-to-end Supabase round-trip; 82 backend tests pass; ruff clean; frontend builds + type-checks.

šŸ¤– Generated with Claude Code

taboola-cz org

Publishing for review.

kuanz changed pull request status to open
taboola-cz org

Deploying database management to production.

kuanz changed pull request status to merged

Sign up or log in to comment