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 | |
| 1. Go to your **Supabase Dashboard β SQL Editor** | |
| 2. Run the scripts **in order**: | |
| - `01_schema.sql` β creates all 6 tables + triggers | |
| - `02_rls.sql` β enables Row Level Security | |
| - `03_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 `profiles` row (grade=8 default) on every new signup | |
| - Student must update their grade in the app after signup | |