Applicant Submission Flow
The applicant submission flow is designed to be a streamlined, user-friendly experience that captures essential candidate information while performing automated resume analysis in the background.
Application Form Overview
The primary entry point for candidates is the application form located at the root path (/). This form is built using React Hook Form and Zod for robust client-side validation, ensuring that only complete and correctly formatted data reaches the database.
Data Fields and Validation
Applicants are required to provide the following information:
| Field | Type | Validation Rules | | :--- | :--- | :--- | | Full Name | Text | 2–100 characters | | Date of Birth | Date | Required | | Email Address | Email | Valid format, max 255 characters | | Highest Degree | Select | Must select from predefined list (e.g., Bachelor's, Master's) | | Years of Experience | Number | Range: 0 to 50 years | | Preferred Course | Select | Must select from available JLPT or Business courses | | Comments | Textarea | Optional, max 1000 characters | | Resume (CV) | File | PDF only, maximum size 5MB |
Submission Step-by-Step
1. Data Entry and Validation
As the user fills out the form, the system provides real-time feedback. If an invalid email is entered or a required field is skipped, the FormMessage components (via shadcn-ui) display specific error messages.
2. Resume Upload
The application specifically requests a PDF version of the candidate's CV. Upon selection, the system validates:
- MIME Type: Must be
application/pdf. - File Size: Must not exceed the 5MB limit defined in
MAX_FILE_SIZE.
3. Data Processing
When the user clicks "Submit Application", the following sequence occurs:
- File Storage: The PDF is uploaded to the Supabase
cvsstorage bucket with a unique timestamped filename. - Database Record: A new entry is created in the
applicantstable containing the personal details and the path to the uploaded file. - Status Initialization: The application status is automatically set to
pending.
4. Automated Resume Parsing
Immediately after the database record is created, the system triggers an edge function:
// Background CV parsing trigger
supabase.functions.invoke("parse-cv", {
body: {
applicantId: applicantData.id,
cvFilePath: fileName,
},
})
This process is non-blocking; the user does not have to wait for the parsing to finish to see the success message. The edge function extracts text from the PDF and performs keyword matching against a library of technical and linguistic terms (e.g., "JLPT N2", "React", "Python").
Post-Submission Experience
Upon successful submission, the UI transitions to a confirmation state:
- Success Screen: A high-visibility confirmation page (using the
CheckCircleicon andanimate-scale-inanimation) informs the candidate that their application was received. - Background Updates: Once the background
parse-cvfunction completes, the applicant's record in the dashboard will be updated with a Keyword Match Score and a list of Matched Keywords, ready for administrative review. - Notifications: If configured, the system prepares the entry for the
send-status-notificationworkflow, which administrators can trigger later during the review process.