Full website with real student / agent / admin accounts and a real database, built with React + Vite, styled with Bootstrap, and backed by Supabase (free tier covers this comfortably).
Why Supabase instead of a Netlify function like the Compliance Ledger app: logins and
registrations need to work for the public, and a serverless function proxy is the
right shape for a secret API key — but auth + a database is better handled by a
managed service. Supabase's public "anon" key is designed to be exposed in the
browser; access is controlled by the row-level-security rules in supabase/schema.sql,
not by hiding the key.
- Go to https://supabase.com → sign up (free) → New project.
- Pick a name, a database password (save it somewhere), and a region close to your users.
- Wait ~2 minutes for it to provision.
- In your Supabase project, open SQL Editor → New query.
- Open
supabase/schema.sqlfrom this folder, paste its full contents in, and click Run. This creates theprofiles,student_registrations,agent_registrations, andinstitution_enquiriestables, the trigger that creates a profile automatically on sign-up, and the row-level-security rules that keep each user's data private (and let admins see everything). - Then open
supabase/schema_v2_student_tools.sql, paste it into a new query, and click Run. This adds the three student-dashboard tools: the resume builder, IELTS/English learning-resource progress tracker, and the visa compliance checklist. Safe to run any time after step 2 — it doesn't touch anything from schema.sql. - Then open
supabase/schema_v3_courses.sql, paste it into a new query, and click Run. This adds thecourse_enrolmentstable used by the IELTS Prep course page.
By default Supabase requires users to confirm their email before they can log in. For a live site, leave this on. For quick local testing: Authentication → Providers → Email → toggle off "Confirm email".
Project Settings → API. You need:
- Project URL →
VITE_SUPABASE_URL - anon public key →
VITE_SUPABASE_ANON_KEY
(Never use the service_role key here — that one must never reach the browser.)
- Deploy or run the site locally and sign up once through the Admin Login button
using your own email (role tabs default to student/agent for sign-up; admin accounts
are promoted manually, on purpose — see below).
- Actually easiest: sign up through the Student tab first with your own email, just to create the account.
- Back in Supabase SQL Editor, run:
update profiles set role = 'admin' where email = 'you@example.com';
- Log out and back in on the site — you'll now land on the admin dashboard, which lists every student, agent, and institution registration and lets you change their status.
- Push this folder to a GitHub/GitLab/Bitbucket repo.
- Netlify → Add new site → Import an existing project → pick the repo.
- Build settings (already set via
netlify.toml):- Build command:
npm run build - Publish directory:
dist
- Build command:
- Site configuration → Environment variables, add:
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEY
- Deploy.
npm install -g netlify-cli
cd ycc-website
npm install
netlify login
netlify init
netlify env:set VITE_SUPABASE_URL https://your-project-ref.supabase.co
netlify env:set VITE_SUPABASE_ANON_KEY your-anon-key
netlify deploy --prodcp .env.example .env # then fill in your real Supabase URL + anon key
npm install
npm run dev- Real: sign-up, login, logout, sessions, role-based dashboards, registration data stored in Postgres, row-level security, admin approve/reject workflow, a resume builder with print/PDF export, free IELTS/English resource tracking, and a student visa compliance checklist — all saved per-student in the database.
- Still simple, on purpose: no password reset UI yet (Supabase supports it — ask if you want it added), no file uploads for documents, institution enquiries don't require an account (by design, so institutions can reach you with zero friction) and are visible only to admins.
- The contact form at the bottom of the homepage still uses
FormSubmit to email
mzhbd@gmx.co.ukdirectly — no database needed for a one-off "get in touch" message.
src/
supabaseClient.js Supabase client (reads env vars)
AuthContext.jsx Tracks the logged-in user + their role
App.jsx Shell: navbar, home/dashboard routing, auth modal
components/
Navbar.jsx, Footer.jsx
AuthModal.jsx Login / sign-up, role-aware
RegistrationForms.jsx Student / agent / institution forms (write to Supabase)
student-tools/
ResumeBuilder.jsx Form + live preview, print/PDF export, saved to Supabase
LearningResources.jsx Curated free IELTS/English links + progress tracking
VisaChecklist.jsx Generic visa compliance checklist + progress tracking
pages/
Home.jsx Marketing site: hero, destinations, about, get started
Courses.jsx IELTS Prep course page: modules, lessons, pricing, enrolment
Dashboard.jsx Role-based: student/agent see their own record,
admin sees & manages everyone's
supabase/
schema.sql Run once in the Supabase SQL editor
schema_v2_student_tools.sql Run second — resume/learning/visa tables
schema_v3_courses.sql Run third — course_enrolments table