API & Data Docs

Supabase REST endpoints and data model.

Supabase automatically gives REST endpoints for platform tables. This page documents how HMG Academy can use them safely with RLS.

GET /rest/v1/hmg_courses?select=* GET /rest/v1/hmg_enrollments?student_id=eq.{id} POST /rest/v1/hmg_booking_requests PATCH /rest/v1/hmg_assignments?id=eq.{id}

Important

  • Use Supabase anon key only with correct RLS policies.
  • Never expose service role key in frontend.
  • Use Auth sessions for role-based access.
  • No paid AI API is required.