MathTuro is a role-based Learning Management System (LMS) built with static HTML pages, shared JavaScript modules, and Supabase for authentication, database, and storage.
It includes dedicated experiences for:
- Public/guest users
- Students
- Teachers
- Administrators
Primary documentation entrypoint: docs/README.md
New to this repository? Begin with docs/README.md for role-based reading paths.
- Contributor onboarding: docs/quickstart-contributors.md
- Release readiness: docs/production-readiness-checklist.md
- Change history: CHANGELOG.md
- Start Here
- What This Project Does
- Current Feature Coverage
- Tech Stack
- Repository Structure
- Getting Started (Local)
- Supabase Setup
- Database Migrations and SQL Files
- Running and Testing
- Deployment
- Security Notes
- Troubleshooting
- Contributing
- Docs Home
- Project Documentation Index
- Next Documentation Enhancements
MathTuro manages educational content and progress across multiple roles:
- Public pages for discovery, login, registration, and policies
- Student pages for modules, lessons, quizzes, and progress
- Teacher pages for module/content management and submissions review
- Admin pages for users, analytics, settings, and system visibility
The backend is provided by Supabase services and SQL migrations in the database/ folder.
- Browse modules and view lessons
- Access quizzes and track progress
- View dashboard and learning flow pages
- Related docs: docs/access-control-matrix.md, docs/qa-test-matrix.md, docs/data-model-reference.md
- Manage modules, quizzes, videos, and lesson plans
- Review student submissions
- Access reporting and student-progress pages
- Related docs: docs/access-control-matrix.md, docs/api-storage-conventions.md, docs/qa-test-matrix.md
- Manage users and content visibility
- Access activity, analytics, and status pages
- Configure settings and grade/section related pages
- Related docs: docs/access-control-matrix.md, docs/release-process.md, docs/incident-rollback-guide.md
- Landing, about, contact, legal pages
- Authentication pages (login/register/reset)
- Guest modules and tutorial/video related entry points
- Related docs: docs/architecture-diagram.md, docs/qa-test-matrix.md, docs/environment-strategy.md
- HTML5
- CSS (Tailwind CSS usage in pages, plus shared and role-specific styles)
- Vanilla JavaScript
- Supabase Auth
- Supabase PostgreSQL
- Supabase Storage
- Supabase Row Level Security (RLS)
- Node.js scripts via
package.json - Python simple HTTP server for local static hosting
- Vercel configuration via
vercel.json
.
|-- index.html
|-- package.json
|-- vercel.json
|-- README.md
|-- admin/
| |-- dashboard.html
| |-- users.html
| |-- analytics.html
| |-- settings.html
| |-- ...
| `-- assets/
|-- public/
| |-- index.html
| |-- login.html
| |-- register.html
| |-- modules.html
| |-- ...
|-- student/
| |-- dashboard.html
| |-- modules.html
| |-- module-view.html
| |-- lesson-view.html
| |-- quizzes.html
| `-- assets/
|-- teacher/
| |-- dashboard.html
| |-- manage-modules.html
| |-- manage-quizzes.html
| |-- manage-videos.html
| |-- submissions.html
| |-- reports.html
| |-- student-progress.html
| `-- assets/
|-- shared/
| |-- css/
| | `-- base.css
| `-- js/
| |-- config.js
| |-- supabase.js
| |-- auth.js
| |-- modules.js
| |-- uploads.js
| `-- ...
|-- database/
| |-- supabase_complete_setup.sql
| |-- migration_v*.sql
| |-- fix_*.sql
| `-- ...
|-- Logo/
`-- Researchers/
Install:
- Node.js 18+ (recommended)
- Python 3 (for the local static server script)
npm installnpm run devBy default this runs:
python -m http.server 3000Open:
http://localhost:3000/
The root index.html immediately redirects to public/index.html.
Windows fallback examples:
py -m http.server 3000or use VS Code Live Server on index.html.
Supabase credentials are read from:
shared/js/config.js
Update:
SUPABASE_URLSUPABASE_ANON_KEY
Important:
- The anon key is intended for client-side usage, but only safe when RLS policies are correctly enforced.
- Do not expose service role keys in frontend code.
The database/ folder contains setup, migration, restore, and fix scripts.
Suggested execution approach for a fresh environment:
- Run
database/supabase_complete_setup.sqlas baseline. - Apply migration scripts (
migration_v*.sql) in version order. - Apply targeted fix scripts only if relevant to your environment.
- Use seed scripts (for example
SEED_CONTENT_MINIMAL.sql) only when needed.
Notes:
- There are also restore-oriented scripts (
MASTER_DB_RESTORE.sql,POST_RESTORE_VISIBILITY_FIX.sql). - Read each SQL file before executing to avoid conflicting operations in existing environments.
npm run dev: Starts local static server on port 3000npm run build: Copies project intodist/(best-effort script)
- Public flows: login, register, reset password
- Student flows: module view, lesson view, quiz pages
- Teacher flows: module management and submissions review
- Admin flows: users, analytics, settings
- Supabase auth and RLS-protected reads/writes
Vercel configuration is already included in vercel.json.
Current config characteristics:
- Static output
- Route rewrites for
public,student,teacher,admin,shared, and asset folders - Security headers:
X-Content-Type-Options: nosniffX-Frame-Options: DENYX-XSS-Protection: 1; mode=block
Typical deployment flow:
- Push repository to Git provider.
- Import project in Vercel.
- Deploy with repository defaults.
- Validate route rewrites and direct deep links.
- Enforce RLS on all user data tables.
- Keep authorization checks consistent for student/teacher/admin roles.
- Validate upload type and size in both UI and storage policies.
- Avoid placing sensitive secrets in frontend JavaScript.
- Periodically audit old fix scripts before applying in production.
- Confirm you opened
http://localhost:3000/(project root), not a nested file URL. - Verify path references are root-relative or correctly relative.
- Re-check
shared/js/config.jsSupabase URL and anon key. - Verify SQL migrations and RLS policies are applied.
- Validate table/bucket names expected by page scripts.
- Re-check
vercel.jsonrewrite coverage. - Test direct navigation to nested routes (
/student/...,/teacher/...,/admin/...).
- Create a feature branch.
- Keep changes scoped by area (
public,student,teacher,admin,shared,database). - Test affected role flows end-to-end.
- Open a pull request with:
- What changed
- Why it changed
- How it was tested
Start here for role-based reading paths:
The following documentation set is now included:
- Docs Home: docs/README.md
- Architecture diagram: docs/architecture-diagram.md
- Data model reference: docs/data-model-reference.md
- Migration playbook: docs/migration-playbook.md
- Environment strategy: docs/environment-strategy.md
- QA test matrix: docs/qa-test-matrix.md
- Incident and rollback guide: docs/incident-rollback-guide.md
- Access control matrix: docs/access-control-matrix.md
- API and storage conventions: docs/api-storage-conventions.md
- Release process and checklist: docs/release-process.md
- Known limitations: docs/known-limitations.md
- Changelog: CHANGELOG.md
- Contributor quickstart: docs/quickstart-contributors.md
- Production readiness checklist: docs/production-readiness-checklist.md
- Add generated ERD images from the active production-like schema.
- Add executable policy verification scripts for CI.
- Add role-based end-to-end test automation and attach results to releases.
- Add architecture decision records for major changes.