This starter includes:
- Backend: Node.js + Express + Supabase Auth + Supabase DB + Supabase Storage
- Frontend: React + Vite + Tailwind CSS + Axios + React Router
- Auth roles:
student,faculty,hod,admin,superadmin - Workflow:
- Student submission → Faculty → HOD → Admin
- Faculty submission → HOD → Admin
- HOD submission → Admin
- 16 R&D tables with dynamic forms
- Submission logs timeline
- Department based filtering
- Faculty can add students
- HOD can add faculty
- Admin analytics
- Export to Excel / PDF
- Supabase Storage file upload support
You did not provide the exact 16 R&D table names, so this starter uses these 16 academic R&D tables:
- publications
- patents
- projects
- books
- book_chapters
- conferences
- workshops
- seminars
- certifications
- awards
- consultancies
- grants
- collaborations
- internships_guided
- phd_guidance
- events_organized
Each table has a common structure plus a flexible data jsonb field so you can extend fields without changing the backend architecture.
Create a new Supabase project from the Supabase dashboard.
Open Supabase SQL Editor and run:
supabase/schema.sql
This creates:
- departments
- profiles
- submissions
- submission_items
- submission_logs
- all 16 R&D tables
- storage bucket
rd-files
cd backend
cp .env.example .env
npm install
npm run devcd frontend
cp .env.example .env
npm install
npm run devPORTSUPABASE_URLSUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYFRONTEND_URLSUPABASE_STORAGE_BUCKET
VITE_API_BASE_URLVITE_SUPABASE_URLVITE_SUPABASE_ANON_KEY
You can create your first admin or superadmin in two ways:
- Use Supabase dashboard Auth → Add user, then insert matching row in
profiles - Use the backend signup endpoint with:
- role
studentonly for public signup
- role
- Use
adminorsuperadmincreated manually first, then create others from UI/API
- Backend uses Supabase service role and applies authorization in Express.
- JWT validation is done using Supabase Auth
getUser(token). - Signed URLs are generated for uploaded files on fetch.
- Frontend is intentionally minimal but functional.
POST /api/auth/signupPOST /api/auth/loginGET /api/auth/me
POST /api/users/studentsPOST /api/users/facultyGET /api/usersGET /api/users/assigned-students
GET /api/records/meta/tablesGET /api/records/:tableNameGET /api/records/:tableName/:idPOST /api/records/:tableNamePUT /api/records/:tableName/:idDELETE /api/records/:tableName/:id
POST /api/submissions/submit/:tableNameGET /api/submissionsGET /api/submissions/:idPOST /api/submissions/approve/:idPOST /api/submissions/reject/:id
GET /api/analytics/summary
This project follows current Supabase guidance that Auth uses JWTs, auth.getUser() can retrieve the authenticated user, and admin auth methods require a service_role key. It also follows Supabase guidance to keep application user data in public tables linked to auth.users, and to use Storage for file uploads. citeturn769903search2turn769903search3turn769903search6turn769903search7turn769903search14