This document describes the new interview creation and management system for HireVision.
The interview system allows recruiters to:
- Create custom interviews with multiple questions
- Invite candidates via email with unique 6-digit codes
- Track interview participation and completion
Candidates can:
- Receive email invitations with interview codes
- Add interviews to their dashboard using the code
- Complete interviews and have their responses analyzed
-
interviews - Main interview records
id(UUID, Primary Key)title(VARCHAR) - Interview titledescription(TEXT) - Optional descriptionrecruiter_id(UUID) - Reference to recruitercompany_number(VARCHAR) - Company identifierstatus(VARCHAR) - active/inactive/completedcreated_at,updated_at(TIMESTAMP)
-
interview_questions - Questions for each interview
id(UUID, Primary Key)interview_id(UUID) - Reference to interviewquestion(TEXT) - Question textorder_index(INTEGER) - Question ordercreated_at(TIMESTAMP)
-
interview_invites - Candidate invitations
id(UUID, Primary Key)interview_id(UUID) - Reference to interviewemail(VARCHAR) - Candidate emailinvite_code(VARCHAR(6)) - Unique 6-digit codestatus(VARCHAR) - pending/accepted/completed/expiredcreated_at,accepted_at,completed_at(TIMESTAMP)
-
interview_participants - Track who has access to interviews
id(UUID, Primary Key)interview_id(UUID) - Reference to interviewuser_id(UUID) - Reference to candidatestatus(VARCHAR) - active/completed/withdrawnjoined_at,completed_at(TIMESTAMP)
-
NewInterview.tsx - Modal for creating interviews
- Step 1: Define interview title, description, and questions
- Step 2: Add candidate email addresses
- Step 3: Review and create interview
-
Dashboard.tsx - Updated with "New Interview" button
- Added
onNewInterviewprop and handler - Integrated with NewInterview modal
- Added
-
AddInterviewModal.tsx - Modal for adding interviews with codes
- Accepts 6-digit interview codes
- Validates codes and adds user to interview participants
- Pre-fills code if provided via URL parameter
-
Dashboard - Updated with "Add Interview" button
- Handles URL parameters for interview codes
- Auto-opens AddInterviewModal when code is present
- POST /send-interview-invite
- Sends email invitations with 6-digit codes
- Parameters:
email,invite_code,interview_title,recruiter_name
- POST /invite - Enhanced for general candidate invitations
-
Create Interview
- Click "New Interview" button on dashboard
- Enter interview title and description
- Add custom questions (reorderable)
- Add candidate email addresses
- Review and create
-
Send Invitations
- System generates unique 6-digit codes
- Sends email invitations to candidates
- Codes are stored in database
-
Receive Invitation
- Gets email with interview code
- Email contains instructions and code
-
Add Interview
- If logged in: Click "Add Interview" button
- If not logged in: Sign up, then add interview
- Enter 6-digit code
- System validates and grants access
-
Complete Interview
- Access interview from dashboard
- Record video responses to questions
- Submit for analysis
- URL:
/signup?code=123456 - Automatically redirects to dashboard with code after signup
- URL:
/candidates/dashboard?code=123456 - Automatically opens AddInterviewModal with pre-filled code
- Row Level Security (RLS) - Database-level access control
- Unique Codes - 6-digit codes are unique and secure
- Status Tracking - Invites and participation are tracked
- Access Control - Users can only access their own interviews
Subject: Interview Invitation: [Interview Title]
Hello,
You have been invited to participate in an interview: [Interview Title]
Your unique interview code is: [6-digit code]
To access your interview:
1. Visit: http://localhost:3000/candidates
2. If you have an account, log in and use the 'Add Interview' button
3. If you don't have an account, sign up and then use the 'Add Interview' button
4. Enter your interview code: [6-digit code]
Please complete your interview within the specified timeframe.
Best regards,
[Recruiter Name]
-
Database Setup
- Run the SQL script in
database_schema.sql - This creates all necessary tables and policies
- Run the SQL script in
-
Environment Variables
- Ensure email configuration is set up in backend
EMAIL_USERandEMAIL_PASSWORDfor SMTP
-
Frontend Integration
- Components are already integrated into existing pages
- No additional setup required
// Recruiter clicks "New Interview" button
// Fills out form with:
// - Title: "Frontend Developer Assessment"
// - Questions: ["Tell me about your experience with React", "Describe a challenging project"]
// - Candidates: ["candidate1@example.com", "candidate2@example.com"]
// System creates interview and sends invitations// Candidate receives email with code "123456"
// Visits dashboard and clicks "Add Interview"
// Enters code "123456"
// System validates and grants access to interview- Invalid Codes - Shows error message for invalid/expired codes
- Duplicate Access - Prevents adding same interview multiple times
- Email Failures - Logs errors but continues processing other invites
- Database Errors - Graceful error handling with user feedback
- Interview Templates - Pre-defined question sets
- Bulk Invitations - Upload CSV of candidate emails
- Interview Scheduling - Set time limits and deadlines
- Analytics Dashboard - Track interview completion rates
- Reminder Emails - Automatic follow-ups for incomplete interviews