Spaces:
Sleeping
Add database management: Supabase persistence, teacher profiles, admin dashboard
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
Publishing for review.
Deploying database management to production.