Complete this guide to set up your Thesis Management System with Supabase.
- ✓ Supabase account created (you already have the project)
- ✓ Supabase URL:
https://svrkqmhyggwggcfrlcoi.supabase.co - ✓ Anon Public Key: Already in
.env.local - ✓ Project is running on http://localhost:3000
- Go to Supabase Dashboard
- Sign in with your account
- Select your project: Thesis Management System
- In Supabase, go to SQL Editor (left sidebar)
- Click New Query
- Copy the entire content from
DATABASE_SCHEMA.sqlfile in your project - Paste it into the SQL Editor
- Click Run button
What this does:
- Creates 6 tables (user_profiles, supervisors, students, projects, supervisor_requests, notifications)
- Adds 30+ Row-Level Security (RLS) policies
- Creates 10+ performance indexes
- Sets up 6 automatic timestamp triggers
- Enables real-time capabilities
- Open New Query in SQL Editor again
- Copy the entire content from
SAMPLE_DATA.sqlfile in your project - Paste it into the SQL Editor
- Click Run button
What this does:
- Creates 3 test users (Student, Supervisor, Admin)
- Creates sample projects
- Adds supervisor data
- Provides test data for development
| Role | Password | |
|---|---|---|
| Student | student@test.com |
password123 |
| Supervisor | supervisor@test.com |
password123 |
| Admin | admin@test.com |
password123 |
- Go to Authentication → Providers in Supabase
- Ensure Email provider is enabled
- Go to Authentication → URL Configuration
- Add to Redirect URLs:
http://localhost:3000/ http://localhost:3000/login http://localhost:3000/student/projects http://localhost:3000/supervisor/requests http://localhost:3000/admin/dashboard
- Go to Authentication → JWT
- Copy your JWT Secret (you'll need this for production deployment)
- Keep it safe - don't share it
- Go to Database → Replication
- Under Replication section, find
notificationstable - Toggle Real-time to ON
- Also enable for
supervisor_requeststable
This allows live notifications without page refresh.
-
Go to http://localhost:3000
-
Try to Register with a new account
- Email:
teststudent@example.com - Password:
Test123!@# - Role: Student
- Department: Computer Science
- Email:
-
If successful:
- You'll see confirmation message
- You can then login with that account
- Dashboard will appear
-
Try logging in with:
- Email:
student@test.com - Password:
password123
- Email:
-
You should be redirected to Student Dashboard
If you want to add project file uploads:
- Go to Storage in Supabase
- Create new bucket:
thesis-uploads - Make it Public or Private (your choice)
- Keep default settings for now
Your .env.local already has:
VITE_SUPABASE_URL=https://svrkqmhyggwggcfrlcoi.supabase.co
VITE_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
VITE_API_URL=http://localhost:3000
For Production add to .env.production:
VITE_SUPABASE_URL=https://svrkqmhyggwggcfrlcoi.supabase.co
VITE_SUPABASE_ANON_KEY=your_key_here
After completing all steps, verify:
- Database schema created (check Tables section in Supabase)
- 6 tables visible: user_profiles, supervisors, students, projects, supervisor_requests, notifications
- RLS policies enabled (check each table's RLS settings)
- Sample data loaded (check row counts)
- Email authentication enabled
- Can register new user at http://localhost:3000/register
- Can login at http://localhost:3000/login
- Student dashboard loads without errors
- Real-time notifications working (optional)
Solution: Run npm install @supabase/supabase-js
Solution:
- Check
.env.localhas correct Supabase URL and key - Verify Supabase project is active
- Restart the dev server:
npm run dev
Solution:
- Go to Supabase Settings
- Copy your Anon Public key
- Add to
.env.local - Restart dev server
Solution:
- This is expected if policies didn't load in Step 2
- Run DATABASE_SCHEMA.sql again completely
Solution:
- Database schema wasn't fully executed
- Run DATABASE_SCHEMA.sql again
- Verify all 6 tables exist in Supabase
- Check Supabase Docs: https://supabase.com/docs
- Check App Logs: Browser Console (F12) and Terminal
- Database Logs: Supabase → Logs → Database
- Auth Logs: Supabase → Logs → Auth
Once completed:
- Your app is fully connected to Supabase
- You can register and login users
- All features are functional
- Ready for production deployment
- Test all features with sample users
- Create your own account for testing
- Customize branding in the code
- Deploy to production (see DEPLOYMENT.md)
Status: ✅ Ready for Supabase Setup