Spaces:
Configuration error
Configuration error
|
Download database/README.md from rockysreenivasa/MathTutor: direct link, hf CLI and curl.
- Browser
- Download file 967 Bytes
-
https://huggingface.co/spaces/rockysreenivasa/MathTutor/resolve/main/database/README.md
- Command line
-
hf download hf://spaces/rockysreenivasa/MathTutor/database/README.md
-
curl -L -o README.md https://huggingface.co/spaces/rockysreenivasa/MathTutor/resolve/main/database/README.md
967 Bytes
MathMind AI β Database Setup
Steps
- Go to your Supabase Dashboard β SQL Editor
- Run the scripts in order:
01_schema.sqlβ creates all 6 tables + triggers02_rls.sqlβ enables Row Level Security03_seed.sqlβ inserts 5 badge definitions
Tables Created
| Table | Purpose |
|---|---|
profiles |
Student grade + streak (extends auth.users) |
sessions |
One row per tutor session |
practice_attempts |
Practice problem responses |
test_results |
Mini-test scores and pass/fail |
badges |
Badge definitions |
student_badges |
Badges earned by each student |
Notes
- RLS is enabled β students can only read/write their own data
- Service role key used by FastAPI backend bypasses RLS (server-side only β never expose to client)
- Auto-trigger creates a
profilesrow (grade=8 default) on every new signup - Student must update their grade in the app after signup