A secure, modern, and robust examination platform built with React, TypeScript, and Supabase.
- Secure Examination Environment:
- Mandatory Fullscreen mode with a 10-second auto-submit penalty for exiting.
- Server-side grading via PostgreSQL RPC to prevent frontend tampering.
- Sensitive data (correct answers, test cases) isolated in admin-only tables.
- Advanced Admin Dashboard:
- Full CRUD for Exams (MCQ & DSA Coding questions).
- User Management (Role promotion/demotion).
- CSV Exports for Results and User lists.
- Real-time Analytics and Pass-Rate tracking.
- User Experience:
- Live progress tracking and server-synced timers.
- Attempt limits per exam.
- Performance trend visualization.
- Security & Integrity:
- Robust Row Level Security (RLS) policies.
- Automatic profile creation on signup via database triggers.
- Frontend: React 18, Vite, TypeScript, Tailwind CSS.
- UI Components: shadcn/ui, Framer Motion, Lucide Icons.
- Backend/Database: Supabase (PostgreSQL, Auth, RLS).
- State Management: React Context, TanStack Query.
- Node.js (v18+)
- npm or bun
-
Clone the repository
git clone <your-repo-url> cd see-smart-exam-main
-
Install dependencies
npm install
-
Environment Variables Create a
.envfile in the root and add your Supabase credentials:VITE_SUPABASE_URL=your_supabase_project_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Run the application
npm run dev
To set up the database, follow these steps in your Supabase SQL Editor:
- Run the entire content of
supabase_schema.sqlto create the tables, triggers, and the secure grading function. - Ensure you have an administrator. You can promote any user to admin by running:
UPDATE profiles SET role = 'admin' WHERE email = 'your-email@example.com';
The following temporary files were used during the security migration and have been consolidated into supabase_schema.sql and this README.md:
UPDATE_RLS_POLICIES.mdFIX_USER_RESULTS_COLUMNS.mdFIX_EXAMS_MAX_ATTEMPTS.md
This project is for educational and professional examination purposes.